Added FROST_WALKER flag

#183
It was previously protected by PLACE_BLOCKS.
This commit is contained in:
Florian CUNY 2018-12-09 17:07:12 +01:00
parent 28e62d087d
commit 58ded638f2
3 changed files with 8 additions and 1 deletions

View File

@ -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);
}
}

View File

@ -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();

View File

@ -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]"