mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-24 17:22:55 +01:00
SPIGOT-4742: Make Sign Colorable
By: md_5 <git@md-5.net>
This commit is contained in:
parent
c9a23d73a0
commit
c3e41306a8
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…
Add table
Reference in a new issue