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