Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
iXanadu13 committed Mar 20, 2024
1 parent b759530 commit 1d6559d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,8 @@ public static boolean canRespawn(final World world){
*/
public static EnderDragon getEnderDragon(final World world){
if(world.getEnvironment() != World.Environment.THE_END){
return world.getEntitiesByClass(EnderDragon.class).iterator().next();
Iterator<EnderDragon> iterator = world.getEntitiesByClass(EnderDragon.class).iterator();
return iterator.hasNext()?iterator.next():null;
}
if(Version.mcMainVersion >= 16){
DragonBattle battle = world.getEnderDragonBattle();
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: EnderDragon
version: 2.5.0
version: 2.5.1
main: pers.xanadu.enderdragon.EnderDragon
author: Xanadu13
api-version: 1.13
Expand Down

0 comments on commit 1d6559d

Please sign in to comment.