Skip to content

Commit

Permalink
fix dragon attacking creative player (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
leumasme authored Oct 21, 2024
1 parent e6a0d6b commit 41407f7
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,9 @@ public List<EntityPlayer> getViablePlayers() {
EntityPlayer.class,
AxisAlignedBB.getBoundingBox(-160D, -32D, -160D, 160D, 512D, 160D));

if (players.size() > 1) {
for (Iterator<EntityPlayer> iter = players.iterator(); iter.hasNext();) {
EntityPlayer player = iter.next();
if (player.capabilities.isCreativeMode || player.isDead) iter.remove();
}
for (Iterator<EntityPlayer> iter = players.iterator(); iter.hasNext();) {
EntityPlayer player = iter.next();
if (player.capabilities.isCreativeMode || player.isDead) iter.remove();
}

return players;
Expand Down

0 comments on commit 41407f7

Please sign in to comment.