mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2024-11-25 15:35:11 +01:00
Fixed allowonnpc not doing anything
This commit is contained in:
parent
149b055860
commit
aa56f2cb46
@ -94,8 +94,10 @@ public class WatcherTriggers extends PluginDependent implements Listener {
|
||||
Arrow arrow = (Arrow) event.getDamager();
|
||||
LivingEntity victim = (LivingEntity) event.getEntity();
|
||||
|
||||
if (victim.hasMetadata("NPC")) {
|
||||
return;
|
||||
if (!allowOnNPC) {
|
||||
if (victim.hasMetadata("NPC")) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (attacker instanceof Player && !AntigriefManager.canInjure((Player) attacker, victim)) {
|
||||
@ -160,8 +162,10 @@ public class WatcherTriggers extends PluginDependent implements Listener {
|
||||
|
||||
LivingEntity victim = (LivingEntity) event.getEntity();
|
||||
|
||||
if (victim.hasMetadata("NPC")) {
|
||||
return;
|
||||
if (!allowOnNPC) {
|
||||
if (victim.hasMetadata("NPC")) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (attacker instanceof Player && !AntigriefManager.canInjure((Player) attacker, victim)) {
|
||||
@ -261,8 +265,10 @@ public class WatcherTriggers extends PluginDependent implements Listener {
|
||||
LivingEntity attacker = (LivingEntity) event.getDamager();
|
||||
LivingEntity victim = (LivingEntity) event.getEntity();
|
||||
|
||||
if (victim.hasMetadata("NPC")) {
|
||||
return;
|
||||
if (!allowOnNPC) {
|
||||
if (victim.hasMetadata("NPC")) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (attacker instanceof Player && !AntigriefManager.canInjure((Player) attacker, victim)) {
|
||||
|
Loading…
Reference in New Issue
Block a user