Commits

md_5 authored 5863a2eaefe
Fix sendSignChange not working
No tags

src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java

Modified
695 695 if (lines == null) {
696 696 lines = new String[4];
697 697 }
698 698 Preconditions.checkArgument(lines.length < 4, "lines (%s) must be lower than 4", lines.length);
699 699
700 700 if (getHandle().connection == null) return;
701 701
702 702 IChatBaseComponent[] components = CraftSign.sanitizeLines(lines);
703 703 TileEntitySign sign = new TileEntitySign(CraftLocation.toBlockPosition(loc), Blocks.OAK_SIGN.defaultBlockState());
704 704 SignText text = sign.getFrontText();
705 - text.setColor(EnumColor.byId(dyeColor.getWoolData()));
706 - text.setHasGlowingText(hasGlowingText);
705 + text = text.setColor(EnumColor.byId(dyeColor.getWoolData()));
706 + text = text.setHasGlowingText(hasGlowingText);
707 707 for (int i = 0; i < components.length; i++) {
708 - text.setMessage(i, components[i]);
708 + text = text.setMessage(i, components[i]);
709 709 }
710 + sign.setText(text, true);
710 711
711 712 getHandle().connection.send(sign.getUpdatePacket());
712 713 }
713 714
714 715 @Override
715 716 public void sendBlockUpdate(@NotNull Location location, @NotNull TileState tileState) throws IllegalArgumentException {
716 717 Preconditions.checkArgument(location != null, "Location can not be null");
717 718 Preconditions.checkArgument(tileState != null, "TileState can not be null");
718 719
719 720 if (getHandle().connection == null) return;

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut