mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-06 02:35:49 +01:00
SPIGOT-6692: Add sendSignChange overload with a hasGlowingText parameter
By: Brokkonaut <hannos17@gmx.de>
This commit is contained in:
parent
4beaa19a39
commit
4a49f6bf8b
1 changed files with 7 additions and 1 deletions
|
@ -572,11 +572,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|||
|
||||
@Override
|
||||
public void sendSignChange(Location loc, String[] lines) {
|
||||
sendSignChange(loc, lines, DyeColor.BLACK);
|
||||
sendSignChange(loc, lines, DyeColor.BLACK);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendSignChange(Location loc, String[] lines, DyeColor dyeColor) {
|
||||
sendSignChange(loc, lines, dyeColor, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendSignChange(Location loc, String[] lines, DyeColor dyeColor, boolean hasGlowingText) {
|
||||
if (getHandle().connection == null) {
|
||||
return;
|
||||
}
|
||||
|
@ -594,6 +599,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|||
IChatBaseComponent[] components = CraftSign.sanitizeLines(lines);
|
||||
TileEntitySign sign = new TileEntitySign(new BlockPosition(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()), Blocks.OAK_SIGN.getBlockData());
|
||||
sign.setColor(EnumColor.fromColorIndex(dyeColor.getWoolData()));
|
||||
sign.setHasGlowingText(hasGlowingText);
|
||||
for (int i = 0; i < components.length; i++) {
|
||||
sign.a(i, components[i]);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue