1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-11-26 04:25:15 +01:00

Tamed entity should be alive...

This commit is contained in:
Zrips 2020-04-02 16:46:21 +03:00
parent 2ba71946ca
commit d1d467bc0d

View File

@ -492,12 +492,13 @@ public class JobsPaymentListener implements Listener {
if (!Jobs.getGCManager().canPerformActionInWorld(event.getEntity().getWorld()))
return;
// Entity that died must be living
if (!event.getEntity().isDead()) {
LivingEntity animal = event.getEntity();
// Entity being tamed must be alive
if (animal.isDead()) {
return;
}
LivingEntity animal = event.getEntity();
// mob spawner, no payment or experience
if (animal.hasMetadata(Jobs.getPlayerManager().getMobSpawnerMetadata())) {
animal.removeMetadata(Jobs.getPlayerManager().getMobSpawnerMetadata(), plugin);