mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-22 02:25:57 +01:00
fix: NPC.isProtected() should be passed to the combust event (#3158)
This commit is contained in:
parent
16b8407ebf
commit
f8107a8f8b
@ -327,8 +327,11 @@ public class EventListen implements Listener {
|
|||||||
} else {
|
} else {
|
||||||
npcCombustEvent = new NPCCombustEvent(event, npc);
|
npcCombustEvent = new NPCCombustEvent(event, npc);
|
||||||
}
|
}
|
||||||
|
if (npc.isProtected()) {
|
||||||
|
npcCombustEvent.setCancelled(true);
|
||||||
|
}
|
||||||
Bukkit.getPluginManager().callEvent(npcCombustEvent);
|
Bukkit.getPluginManager().callEvent(npcCombustEvent);
|
||||||
if (npcCombustEvent.isCancelled() || npc.isProtected()) {
|
if (npcCombustEvent.isCancelled()) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user