mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-12-25 10:37:59 +01:00
Added FROST_WALKER flag
#183 It was previously protected by PLACE_BLOCKS.
This commit is contained in:
parent
28e62d087d
commit
58ded638f2
@ -90,7 +90,7 @@ public class PlaceBlocksListener extends FlagListener {
|
||||
public void onBlockForm(EntityBlockFormEvent e) {
|
||||
if (e.getNewState().getType().equals(Material.FROSTED_ICE) && e.getEntity() instanceof Player) {
|
||||
setUser(User.getInstance((Player)e.getEntity()));
|
||||
checkIsland(e, e.getBlock().getLocation(), Flags.PLACE_BLOCKS);
|
||||
checkIsland(e, e.getBlock().getLocation(), Flags.FROST_WALKER);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -59,6 +59,9 @@ public class Flags {
|
||||
public static final Flag BREAK_BLOCKS = new FlagBuilder().id("BREAK_BLOCKS").icon(Material.STONE).listener(new BreakBlocksListener()).build();
|
||||
public static final Flag PLACE_BLOCKS = new FlagBuilder().id("PLACE_BLOCKS").icon(Material.GRASS).listener(new PlaceBlocksListener()).build();
|
||||
|
||||
// Frost walker - uses the place block listener
|
||||
public static final Flag FROST_WALKER = new FlagBuilder().id("FROST_WALKER").icon(Material.ICE).build();
|
||||
|
||||
// Block interactions - all use BlockInteractionListener()
|
||||
public static final Flag ANVIL = new FlagBuilder().id("ANVIL").icon(Material.ANVIL).listener(new BlockInteractionListener()).build();
|
||||
public static final Flag BEACON = new FlagBuilder().id("BEACON").icon(Material.BEACON).build();
|
||||
|
@ -697,6 +697,10 @@ protection:
|
||||
description: "Toggle crushing"
|
||||
name: "Turtle Eggs"
|
||||
hint: "Turtle eggs cannot be crushed!"
|
||||
FROST_WALKER:
|
||||
description: "Toggle Frost Walker enchantment"
|
||||
name: "Frost Walker"
|
||||
hint: "Frost Walker cannot be used here"
|
||||
locked: "&cThis island is locked!"
|
||||
protected: "&cIsland protected: [description]"
|
||||
spawn-protected: "&cSpawn protected: [description]"
|
||||
|
Loading…
Reference in New Issue
Block a user