Added NAME_TAG flag

Closes #390.
It was previously protected by PLACE_BLOCKS... o_O ???
This commit is contained in:
Florian CUNY 2018-12-16 10:18:39 +01:00
parent ee4a0d7cfc
commit 532ae6ffdc
2 changed files with 2 additions and 1 deletions

View File

@ -40,7 +40,7 @@ public class EntityInteractListener extends FlagListener {
}
// Name tags
if (e.getPlayer().getInventory().getItemInMainHand().getType().equals(Material.NAME_TAG)) {
checkIsland(e, e.getRightClicked().getLocation(), Flags.PLACE_BLOCKS);
checkIsland(e, e.getRightClicked().getLocation(), Flags.NAME_TAG);
}
}
}

View File

@ -52,6 +52,7 @@ public class Flags {
public static final Flag ARMOR_STAND = new FlagBuilder().id("ARMOR_STAND").icon(Material.ARMOR_STAND).listener(new EntityInteractListener()).build();
public static final Flag RIDING = new FlagBuilder().id("RIDING").icon(Material.GOLDEN_HORSE_ARMOR).build();
public static final Flag TRADING = new FlagBuilder().id("TRADING").allowedByDefault(true).icon(Material.EMERALD).build();
public static final Flag NAME_TAG = new FlagBuilder().id("NAME_TAG").icon(Material.NAME_TAG).build();
// Breeding
public static final Flag BREEDING = new FlagBuilder().id("BREEDING").icon(Material.CARROT).listener(new BreedingListener()).build();