mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-26 17:05:01 +00:00
Fixes FS-314
This commit is contained in:
parent
af710edc88
commit
3b61ba408f
@ -163,15 +163,12 @@ public class EventBlocker extends FreedomService
|
||||
if (ConfigEntry.ENABLE_PET_PROTECT.getBoolean())
|
||||
{
|
||||
Entity entity = event.getEntity();
|
||||
if (entity instanceof Tameable)
|
||||
{
|
||||
if (((Tameable) entity).isTamed())
|
||||
if (entity instanceof Tameable tameable && tameable.isTamed())
|
||||
{
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.NORMAL)
|
||||
public void onPlayerDropItem(PlayerDropItemEvent event)
|
||||
|
Loading…
Reference in New Issue
Block a user