mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-25 14:46:45 +01:00
Add villager-interact flag
This commit is contained in:
parent
85ff8bf639
commit
a95b68b73c
@ -65,6 +65,7 @@ import org.bukkit.entity.TNTPrimed;
|
|||||||
import org.bukkit.entity.Tameable;
|
import org.bukkit.entity.Tameable;
|
||||||
import org.bukkit.entity.ThrownPotion;
|
import org.bukkit.entity.ThrownPotion;
|
||||||
import org.bukkit.entity.Vehicle;
|
import org.bukkit.entity.Vehicle;
|
||||||
|
import org.bukkit.entity.Villager;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
import org.bukkit.event.Listener;
|
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)) {
|
if (entity instanceof Player && plot.getFlag(Flags.PLAYER_INTERACT, false)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (entity instanceof Villager && plot.getFlag(Flags.VILLAGER_INTERACT, false)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!Permissions.hasPermission(pp, C.PERMISSION_ADMIN_INTERACT_OTHER)) {
|
if (!Permissions.hasPermission(pp, C.PERMISSION_ADMIN_INTERACT_OTHER)) {
|
||||||
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, C.PERMISSION_ADMIN_INTERACT_OTHER);
|
MainUtil.sendMessage(pp, C.NO_PERMISSION_EVENT, C.PERMISSION_ADMIN_INTERACT_OTHER);
|
||||||
event.setCancelled(true);
|
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_PLACE = new BooleanFlag("misc-place");
|
||||||
public static final BooleanFlag MISC_BREAK = new BooleanFlag("misc-break");
|
public static final BooleanFlag MISC_BREAK = new BooleanFlag("misc-break");
|
||||||
public static final BooleanFlag MISC_INTERACT = new BooleanFlag("misc-interact");
|
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 PLAYER_INTERACT = new BooleanFlag("player-interact");
|
||||||
public static final BooleanFlag TAMED_ATTACK = new BooleanFlag("tamed-attack");
|
public static final BooleanFlag TAMED_ATTACK = new BooleanFlag("tamed-attack");
|
||||||
public static final BooleanFlag TAMED_INTERACT = new BooleanFlag("tamed-interact");
|
public static final BooleanFlag TAMED_INTERACT = new BooleanFlag("tamed-interact");
|
||||||
|
Loading…
Reference in New Issue
Block a user