mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-24 00:56:38 +00:00
working FabricSign
This commit is contained in:
@@ -24,12 +24,11 @@ public class BukkitSign extends BukkitBlockState implements Sign {
|
||||
((org.bukkit.block.Sign) getHandle()).setLine(index, line);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void applyState(String state) {
|
||||
SerialState.parse(state).forEach((k, v) -> {
|
||||
if(!v.startsWith("text")) throw new IllegalArgumentException("Invalid property: " + k);
|
||||
setLine(Integer.parseInt(k) + 1, v.substring(4));
|
||||
if(!k.startsWith("text")) throw new IllegalArgumentException("Invalid property: " + k);
|
||||
setLine(Integer.parseInt(k.substring(4)), v);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user