mirror of
https://github.com/Zrips/Jobs.git
synced 2025-02-18 13:21:41 +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()))
|
if (!Jobs.getGCManager().canPerformActionInWorld(event.getEntity().getWorld()))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Entity that died must be living
|
LivingEntity animal = event.getEntity();
|
||||||
if (!event.getEntity().isDead()) {
|
|
||||||
|
// Entity being tamed must be alive
|
||||||
|
if (animal.isDead()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
LivingEntity animal = event.getEntity();
|
|
||||||
// mob spawner, no payment or experience
|
// mob spawner, no payment or experience
|
||||||
if (animal.hasMetadata(Jobs.getPlayerManager().getMobSpawnerMetadata())) {
|
if (animal.hasMetadata(Jobs.getPlayerManager().getMobSpawnerMetadata())) {
|
||||||
animal.removeMetadata(Jobs.getPlayerManager().getMobSpawnerMetadata(), plugin);
|
animal.removeMetadata(Jobs.getPlayerManager().getMobSpawnerMetadata(), plugin);
|
||||||
|
Loading…
Reference in New Issue
Block a user