Try to prevent players from taking stuff belonging to armor stands
This commit is contained in:
@@ -3,6 +3,7 @@ package de.anura.core.events;
|
||||
import de.anura.core.API.Errors;
|
||||
import de.anura.core.AnuraCore;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.ArmorStand;
|
||||
import org.bukkit.entity.Chicken;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Player;
|
||||
@@ -45,6 +46,10 @@ public class PlayerInteractE implements Listener {
|
||||
plugin.golfBall.put(P, b);
|
||||
|
||||
}
|
||||
} else if (event.getRightClicked() instanceof ArmorStand && plugin.getConfig().getBoolean("no-change-blocks")) {
|
||||
if (!event.getPlayer().hasPermission("core.rules.blocks.interact")) {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
} catch(Throwable e) {
|
||||
Errors.reportException(e);
|
||||
|
||||
Reference in New Issue
Block a user