Added DROPPER flag

#401
This commit is contained in:
Florian CUNY 2018-12-28 10:49:40 +01:00
parent 70d8d04ee5
commit b5620e25e7
3 changed files with 7 additions and 2 deletions

View File

@ -164,7 +164,6 @@ public class BlockInteractionListener extends FlagListener {
case YELLOW_SHULKER_BOX:
case SHULKER_BOX:
case FLOWER_POT:
case DROPPER:
case HOPPER:
case HOPPER_MINECART:
checkIsland(e, loc, Flags.CHEST);
@ -172,6 +171,9 @@ public class BlockInteractionListener extends FlagListener {
case DISPENSER:
checkIsland(e, loc, Flags.DISPENSER);
break;
case DROPPER:
checkIsland(e, loc, Flags.DROPPER);
break;
case ACACIA_DOOR:
case BIRCH_DOOR:
case DARK_OAK_DOOR:

View File

@ -40,13 +40,15 @@ public class InventoryListener extends FlagListener {
}
else if (inventoryHolder instanceof Chest
|| inventoryHolder instanceof Hopper
|| inventoryHolder instanceof Dropper
|| inventoryHolder instanceof ShulkerBox) {
checkIsland(e, e.getInventory().getLocation(), Flags.CHEST);
}
else if (inventoryHolder instanceof Dispenser) {
checkIsland(e, e.getInventory().getLocation(), Flags.DISPENSER);
}
else if (inventoryHolder instanceof Dropper) {
checkIsland(e, e.getInventory().getLocation(), Flags.DROPPER);
}
else if (inventoryHolder instanceof Furnace) {
checkIsland(e, e.getInventory().getLocation(), Flags.FURNACE);
}

View File

@ -69,6 +69,7 @@ public final class Flags {
public static final Flag BREWING = new Flag.Builder("BREWING", Material.BREWING_STAND).build();
public static final Flag CHEST = new Flag.Builder("CHEST", Material.CHEST).build();
public static final Flag DISPENSER = new Flag.Builder("DISPENSER", Material.DISPENSER).build();
public static final Flag DROPPER = new Flag.Builder("DROPPER", Material.DROPPER).build();
public static final Flag DOOR = new Flag.Builder("DOOR", Material.OAK_DOOR).defaultSetting(true).build();
public static final Flag TRAPDOOR = new Flag.Builder("TRAPDOOR", Material.OAK_TRAPDOOR).defaultSetting(true).build();
public static final Flag CRAFTING = new Flag.Builder("CRAFTING", Material.CRAFTING_TABLE).defaultSetting(true).build();