Skip to content

Commit

Permalink
Fixes bug where player dies in non-game world
Browse files Browse the repository at this point in the history
  • Loading branch information
tastybento committed Aug 6, 2019
1 parent 86a4386 commit c8dc2bb
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ public void onDeath(final PlayerDeathEvent event) {
final Player player = event.getEntity();
final UUID playerUUID = player.getUniqueId();
final User user = User.getInstance(playerUUID);

if (user.hasPermission(plugin.getIWM().getAddon(user.getWorld()).get().getPermissionPrefix() + "island.flybypass")) return;
if (plugin.getIWM().getAddon(user.getWorld()).map(a -> user.hasPermission(a.getPermissionPrefix() + "island.flybypass")).orElse(false)) return;
disableFly(user);
}

Expand Down

0 comments on commit c8dc2bb

Please sign in to comment.