SPIGOT-4742: Make Sign Colorable
Dieser Commit ist enthalten in:
Ursprung
42f88f72b5
Commit
76a855c8ce
@ -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);
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren