mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-01-07 08:58:27 +01:00
Add cake protection flag (#986)
Implements #987. * Add cake protection flag * Improved CONTAINER flag description
This commit is contained in:
parent
595de7a602
commit
0d5ff1eaf4
@ -290,6 +290,9 @@ public class BlockInteractionListener extends FlagListener {
|
|||||||
case SWEET_BERRY_BUSH:
|
case SWEET_BERRY_BUSH:
|
||||||
checkIsland(e, player, loc, Flags.BREAK_BLOCKS);
|
checkIsland(e, player, loc, Flags.BREAK_BLOCKS);
|
||||||
break;
|
break;
|
||||||
|
case CAKE:
|
||||||
|
checkIsland(e, player, loc, Flags.CAKE);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
if (stringFlags.containsKey(type.name())) {
|
if (stringFlags.containsKey(type.name())) {
|
||||||
Optional<Flag> f = BentoBox.getInstance().getFlagsManager().getFlag(stringFlags.get(type.name()));
|
Optional<Flag> f = BentoBox.getInstance().getFlagsManager().getFlag(stringFlags.get(type.name()));
|
||||||
|
@ -109,6 +109,7 @@ public final class Flags {
|
|||||||
public static final Flag REDSTONE = new Flag.Builder("REDSTONE", Material.REDSTONE).mode(Flag.Mode.ADVANCED).build();
|
public static final Flag REDSTONE = new Flag.Builder("REDSTONE", Material.REDSTONE).mode(Flag.Mode.ADVANCED).build();
|
||||||
public static final Flag SPAWN_EGGS = new Flag.Builder("SPAWN_EGGS", Material.COW_SPAWN_EGG).build();
|
public static final Flag SPAWN_EGGS = new Flag.Builder("SPAWN_EGGS", Material.COW_SPAWN_EGG).build();
|
||||||
public static final Flag ITEM_FRAME = new Flag.Builder("ITEM_FRAME", Material.ITEM_FRAME).mode(Flag.Mode.ADVANCED).build();
|
public static final Flag ITEM_FRAME = new Flag.Builder("ITEM_FRAME", Material.ITEM_FRAME).mode(Flag.Mode.ADVANCED).build();
|
||||||
|
public static final Flag CAKE = new Flag.Builder("CAKE", Material.CAKE).build();
|
||||||
/**
|
/**
|
||||||
* Prevents players from interacting with the Dragon Egg.
|
* Prevents players from interacting with the Dragon Egg.
|
||||||
* @since 1.3.1
|
* @since 1.3.1
|
||||||
|
@ -663,11 +663,16 @@ protection:
|
|||||||
description: "Toggle button use"
|
description: "Toggle button use"
|
||||||
name: "Buttons"
|
name: "Buttons"
|
||||||
hint: "No button use allowed"
|
hint: "No button use allowed"
|
||||||
|
CAKE:
|
||||||
|
description: "Cake eating disabled"
|
||||||
|
name: "Cakes"
|
||||||
|
hint: "Toggle cake interaction"
|
||||||
CONTAINER:
|
CONTAINER:
|
||||||
name: "Containers"
|
name: "Containers"
|
||||||
description: |-
|
description: |-
|
||||||
&aToggle interaction with chests,
|
&aToggle interaction with chests,
|
||||||
&ashulker boxes and flower pots.
|
&ashulker boxes and flower pots,
|
||||||
|
&acomposters and barrels.
|
||||||
|
|
||||||
&7Other containers are handled
|
&7Other containers are handled
|
||||||
&7by dedicated flags.
|
&7by dedicated flags.
|
||||||
|
Loading…
Reference in New Issue
Block a user