mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-02-05 15:02:06 +01:00
parent
5cddfca3b7
commit
d339444feb
@ -111,7 +111,7 @@ public class BlockInteractionListener extends FlagListener {
|
||||
private void checkClickedBlock(Event e, Location loc, Material type) {
|
||||
// Handle pots
|
||||
if (type.name().startsWith("POTTED")) {
|
||||
checkIsland(e, loc, Flags.CHEST);
|
||||
checkIsland(e, loc, Flags.CONTAINER);
|
||||
return;
|
||||
}
|
||||
switch (type) {
|
||||
@ -164,7 +164,7 @@ public class BlockInteractionListener extends FlagListener {
|
||||
case YELLOW_SHULKER_BOX:
|
||||
case SHULKER_BOX:
|
||||
case FLOWER_POT:
|
||||
checkIsland(e, loc, Flags.CHEST);
|
||||
checkIsland(e, loc, Flags.CONTAINER);
|
||||
break;
|
||||
case DISPENSER:
|
||||
checkIsland(e, loc, Flags.DISPENSER);
|
||||
|
@ -40,7 +40,7 @@ public class InventoryListener extends FlagListener {
|
||||
}
|
||||
else if (inventoryHolder instanceof Chest
|
||||
|| inventoryHolder instanceof ShulkerBox) {
|
||||
checkIsland(e, e.getInventory().getLocation(), Flags.CHEST);
|
||||
checkIsland(e, e.getInventory().getLocation(), Flags.CONTAINER);
|
||||
}
|
||||
else if (inventoryHolder instanceof Dispenser) {
|
||||
checkIsland(e, e.getInventory().getLocation(), Flags.DISPENSER);
|
||||
|
@ -67,7 +67,7 @@ public final class Flags {
|
||||
public static final Flag BEACON = new Flag.Builder("BEACON", Material.BEACON).build();
|
||||
public static final Flag BED = new Flag.Builder("BED", Material.RED_BED).build();
|
||||
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 CONTAINER = new Flag.Builder("CONTAINER", 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 HOPPER = new Flag.Builder("HOPPER", Material.HOPPER).build();
|
||||
|
@ -439,10 +439,15 @@ protection:
|
||||
description: "Toggle button use"
|
||||
name: "Buttons"
|
||||
hint: "No button use allowed"
|
||||
CHEST:
|
||||
description: "Toggle chest access"
|
||||
name: "Chests"
|
||||
hint: "Chest access disabled"
|
||||
CONTAINER:
|
||||
name: "Containers"
|
||||
description: |-
|
||||
&aToggle interaction with chests,
|
||||
&ashulker boxes and flower pots.
|
||||
|
||||
&7Other containers are handled
|
||||
&7by dedicated flags.
|
||||
hint: "Container access disabled"
|
||||
DISPENSER:
|
||||
name: "Dispensers"
|
||||
description: "Toggle dispenser interaction"
|
||||
|
Loading…
Reference in New Issue
Block a user