mirror of
https://github.com/Zrips/Jobs.git
synced 2025-01-02 14:29:07 +01:00
Fix when some options such as slime split not worked when spawned from any type of spawner
Fixes #1154
This commit is contained in:
parent
2089f7afbd
commit
3b83e19221
@ -1139,13 +1139,15 @@ public class JobsPaymentListener implements Listener {
|
||||
return;
|
||||
|
||||
LivingEntity lVictim = (LivingEntity) e.getEntity();
|
||||
boolean hadSpawnerMobMetadata = lVictim.hasMetadata(Jobs.getPlayerManager().getMobSpawnerMetadata());
|
||||
|
||||
if (hadSpawnerMobMetadata) {
|
||||
// mob spawner, no payment or experience
|
||||
if (!Jobs.getGCManager().payNearSpawner() && lVictim.hasMetadata(Jobs.getPlayerManager().getMobSpawnerMetadata())) {
|
||||
try {
|
||||
// So lets remove meta in case some plugin removes entity in wrong way.
|
||||
lVictim.removeMetadata(Jobs.getPlayerManager().getMobSpawnerMetadata(), plugin);
|
||||
} catch (Exception ignored) { }
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (Jobs.getGCManager().MonsterDamageUse) {
|
||||
@ -1162,10 +1164,6 @@ public class JobsPaymentListener implements Listener {
|
||||
}
|
||||
}
|
||||
|
||||
// mob spawner, no payment or experience
|
||||
if (!Jobs.getGCManager().payNearSpawner() && hadSpawnerMobMetadata)
|
||||
return;
|
||||
|
||||
//extra check for Citizens 2 sentry kills
|
||||
if (e.getDamager() instanceof Player && e.getDamager().hasMetadata("NPC"))
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user