Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
Ursprung
fd98aa1b69
Commit
d5ab00c2c2
@ -57,7 +57,7 @@ public class AttributesCopyCommand extends SWCommand {
|
||||
if (block == null) return;
|
||||
ItemStack mainHand = player.getInventory().getItemInMainHand();
|
||||
if (!isSame(block, mainHand)) {
|
||||
BauSystem.MESSAGE.send("ATTRIBUTE_COPY_NOT_SAME", player);
|
||||
BauSystem.MESSAGE.send("ATTRIBUTES_CANT_COPY", player);
|
||||
return;
|
||||
}
|
||||
BlockData blockData = block.getBlockData();
|
||||
@ -90,6 +90,12 @@ public class AttributesCopyCommand extends SWCommand {
|
||||
private boolean isSame(Block block, ItemStack itemStack) {
|
||||
if (block.getType() == itemStack.getType()) return true;
|
||||
if (itemStack.getType() == Material.REDSTONE && block.getType() == Material.REDSTONE_WIRE) return true;
|
||||
if (itemStack.getType() == Material.PLAYER_HEAD && block.getType() == Material.PLAYER_WALL_HEAD) return true;
|
||||
if (itemStack.getType() == Material.ZOMBIE_HEAD && block.getType() == Material.ZOMBIE_WALL_HEAD) return true;
|
||||
if (itemStack.getType() == Material.CREEPER_HEAD && block.getType() == Material.CREEPER_WALL_HEAD) return true;
|
||||
if (itemStack.getType() == Material.DRAGON_HEAD && block.getType() == Material.DRAGON_WALL_HEAD) return true;
|
||||
if (itemStack.getType() == Material.SKELETON_SKULL && block.getType() == Material.SKELETON_WALL_SKULL) return true;
|
||||
if (itemStack.getType() == Material.WITHER_SKELETON_SKULL && block.getType() == Material.WITHER_SKELETON_WALL_SKULL) return true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren