mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-04 14:04:49 +01:00
SPIGOT-4742: Make Sign Colorable
This commit is contained in:
parent
42f88f72b5
commit
76a855c8ce
1 changed files with 12 additions and 0 deletions
|
@ -1,8 +1,10 @@
|
|||
package org.bukkit.craftbukkit.block;
|
||||
|
||||
import net.minecraft.server.ChatComponentText;
|
||||
import net.minecraft.server.EnumColor;
|
||||
import net.minecraft.server.IChatBaseComponent;
|
||||
import net.minecraft.server.TileEntitySign;
|
||||
import org.bukkit.DyeColor;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.Sign;
|
||||
|
@ -55,6 +57,16 @@ public class CraftSign extends CraftBlockEntityState<TileEntitySign> implements
|
|||
this.editable = editable;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DyeColor getColor() {
|
||||
return DyeColor.getByWoolData((byte) getSnapshot().f().getColorIndex());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setColor(DyeColor color) {
|
||||
getSnapshot().a(EnumColor.fromColorIndex(color.getWoolData()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applyTo(TileEntitySign sign) {
|
||||
super.applyTo(sign);
|
||||
|
|
Loading…
Reference in a new issue