mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-21 18:15:51 +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 {
|
||||
npcCombustEvent = new NPCCombustEvent(event, npc);
|
||||
}
|
||||
if (npc.isProtected()) {
|
||||
npcCombustEvent.setCancelled(true);
|
||||
}
|
||||
Bukkit.getPluginManager().callEvent(npcCombustEvent);
|
||||
if (npcCombustEvent.isCancelled() || npc.isProtected()) {
|
||||
if (npcCombustEvent.isCancelled()) {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user