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:
parent
2ba71946ca
commit
d1d467bc0d
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user