working FabricSign

This commit is contained in:
dfsek committed 2021-02-23 17:29:39 -07:00
1 parent 9c2b844290
commit 533380107b
4 files changed
+30 -12

No files matched your search

@@ -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);
});
}
}