Add support for Modded entities

(non Hostile|Animal|Tamed|Veichle|Player|Villager|Misc entity)
This commit is contained in:
Petrus 2018-12-27 19:57:13 -02:00
parent e3192f0dcc
commit 70f0814292
2 changed files with 4 additions and 0 deletions

View file

@ -2244,6 +2244,9 @@ public class PlayerEvents extends PlotListener implements Listener {
}
} else if (!plot.isAdded(pp.getUUID())) {
Entity entity = event.getRightClicked();
if (entity instanceof Creature && plot.getFlag(Flags.CREATURE_INTERACT, false)) {
return;
}
if (entity instanceof Monster && plot.getFlag(Flags.HOSTILE_INTERACT, false)) {
return;
}

View file

@ -79,6 +79,7 @@ public final class Flags {
public static final BooleanFlag ANIMAL_INTERACT = new BooleanFlag("animal-interact");
public static final BooleanFlag HOSTILE_ATTACK = new BooleanFlag("hostile-attack");
public static final BooleanFlag HOSTILE_INTERACT = new BooleanFlag("hostile-interact");
public static final BooleanFlag CREATURE_INTERACT = new BooleanFlag("creature-interact");
public static final BooleanFlag MOB_PLACE = new BooleanFlag("mob-place");
public static final BooleanFlag MOB_BREAK = new BooleanFlag("mob-break");
public static final BooleanFlag FORCEFIELD = new BooleanFlag("forcefield");