Skip to content

Commit

Permalink
fix ender man can tp into dom
Browse files Browse the repository at this point in the history
  • Loading branch information
ColdeZhang committed Dec 18, 2024
1 parent e935858 commit 5d2138d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,10 @@ public void onEnderManEscape(EntityTeleportEvent event) {
}
DominionDTO dom = Cache.instance.getDominionByLoc(entity.getLocation());
checkFlag(dom, Flags.ENDER_MAN, event);
if (event.getTo() != null) {
DominionDTO domTo = Cache.instance.getDominionByLoc(event.getTo());
checkFlag(domTo, Flags.ENDER_MAN, event);
}
}

@EventHandler(priority = EventPriority.HIGHEST) // monster_spawn
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,10 @@ public void onEnderManEscape(EntityTeleportEvent event) {
}
DominionDTO dom = Cache.instance.getDominionByLoc(entity.getLocation());
checkFlag(dom, Flags.ENDER_MAN, event);
if (event.getTo() != null) {
DominionDTO domTo = Cache.instance.getDominionByLoc(event.getTo());
checkFlag(domTo, Flags.ENDER_MAN, event);
}
}

@EventHandler(priority = EventPriority.HIGHEST) // monster_spawn
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,10 @@ public void onEnderManEscape(EntityTeleportEvent event) {
}
DominionDTO dom = Cache.instance.getDominionByLoc(entity.getLocation());
checkFlag(dom, Flags.ENDER_MAN, event);
if (event.getTo() != null) {
DominionDTO domTo = Cache.instance.getDominionByLoc(event.getTo());
checkFlag(domTo, Flags.ENDER_MAN, event);
}
}

@EventHandler(priority = EventPriority.HIGHEST) // monster_spawn
Expand Down

0 comments on commit 5d2138d

Please sign in to comment.