mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-12 04:20:41 +00:00
Fixing up NPE bug in jails (implemented in Dev2.9.163)
This commit is contained in:
parent
08642ada20
commit
aa43703094
1 changed files with 6 additions and 3 deletions
|
@ -221,12 +221,15 @@ public class Jails extends AsyncStorageObjectHolder<com.earth2me.essentials.sett
|
|||
return;
|
||||
}
|
||||
final Entity damager = event.getDamager();
|
||||
if (damager.getType() == EntityType.PLAYER)
|
||||
{
|
||||
final User user = ess.getUser(damager);
|
||||
if (user.isJailed())
|
||||
if (user != null && user.isJailed())
|
||||
{
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
|
||||
public void onPlayerInteract(final PlayerInteractEvent event)
|
||||
|
|
Loading…
Reference in a new issue