+ Added ability to hide as a Flower Pot. #18.
This commit is contained in:
parent
56b02fdafa
commit
da006a7e7b
@ -38,11 +38,14 @@ public class OnInventoryClickEvent implements Listener {
|
||||
if (inv.getName().contains("DisguiseBlocks")) {
|
||||
if (event.getCurrentItem() != null) {
|
||||
if (!event.getCurrentItem().getType().isBlock()) {
|
||||
if (!event.getCurrentItem().getType()
|
||||
.equals(Material.FLOWER_POT_ITEM)) {
|
||||
event.setCancelled(true);
|
||||
MessageM.sendFMessage(player,
|
||||
ConfigC.error_setNotABlock);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
} else if (inv.getName().startsWith("\u00A7r")) {
|
||||
|
@ -42,10 +42,14 @@ public class OnInventoryCloseEvent implements Listener {
|
||||
for (ItemStack item : inv.getContents()) {
|
||||
if (item != null) {
|
||||
if (!item.getType().equals(Material.PAPER)) {
|
||||
if (item.getType().equals(Material.FLOWER_POT_ITEM)) {
|
||||
blocks.add(new ItemStack(Material.FLOWER_POT));
|
||||
} else {
|
||||
blocks.add(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
arena.disguiseBlocks = blocks;
|
||||
save(arena);
|
||||
|
Loading…
x
Reference in New Issue
Block a user