mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2024-12-23 00:15:06 +00:00
Add villager-interact flag
This commit is contained in:
parent
85ff8bf639
commit
a95b68b73c
2 changed files with 5 additions and 0 deletions
|
@ -65,6 +65,7 @@ import org.bukkit.entity.TNTPrimed;
|
|||
import org.bukkit.entity.Tameable;
|
||||
import org.bukkit.entity.ThrownPotion;
|
||||
import org.bukkit.entity.Vehicle;
|
||||
import org.bukkit.entity.Villager;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.Listener;
|
||||
|
@ -1966,6 +1967,9 @@ public class PlayerEvents extends PlotListener implements Listener {
|
|||
if (entity instanceof Player && plot.getFlag(Flags.PLAYER_INTERACT, false)) {
|
||||
return;
|
||||
}
|
||||
if (entity instanceof Villager && plot.getFlag(Flags.VILLAGER_INTERACT, false)) {
|
||||
return;
|
||||
}
|
||||
if (!Permissions.hasPermission(pp, C.PERMISSION_ADMIN_INTERACT_OTHER)) {
|
||||
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, C.PERMISSION_ADMIN_INTERACT_OTHER);
|
||||
event.setCancelled(true);
|
||||
|
|
|
@ -68,6 +68,7 @@ public final class Flags {
|
|||
public static final BooleanFlag MISC_PLACE = new BooleanFlag("misc-place");
|
||||
public static final BooleanFlag MISC_BREAK = new BooleanFlag("misc-break");
|
||||
public static final BooleanFlag MISC_INTERACT = new BooleanFlag("misc-interact");
|
||||
public static final BooleanFlag VILLAGER_INTERACT = new BooleanFlag("villager-interact");
|
||||
public static final BooleanFlag PLAYER_INTERACT = new BooleanFlag("player-interact");
|
||||
public static final BooleanFlag TAMED_ATTACK = new BooleanFlag("tamed-attack");
|
||||
public static final BooleanFlag TAMED_INTERACT = new BooleanFlag("tamed-interact");
|
||||
|
|
Loading…
Reference in a new issue