mirror of
https://github.com/Zrips/Jobs.git
synced 2025-02-01 04:51:26 +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;
|
return;
|
||||||
|
|
||||||
LivingEntity lVictim = (LivingEntity) e.getEntity();
|
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 {
|
try {
|
||||||
// So lets remove meta in case some plugin removes entity in wrong way.
|
// So lets remove meta in case some plugin removes entity in wrong way.
|
||||||
lVictim.removeMetadata(Jobs.getPlayerManager().getMobSpawnerMetadata(), plugin);
|
lVictim.removeMetadata(Jobs.getPlayerManager().getMobSpawnerMetadata(), plugin);
|
||||||
} catch (Exception ignored) { }
|
} catch (Exception ignored) { }
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Jobs.getGCManager().MonsterDamageUse) {
|
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
|
//extra check for Citizens 2 sentry kills
|
||||||
if (e.getDamager() instanceof Player && e.getDamager().hasMetadata("NPC"))
|
if (e.getDamager() instanceof Player && e.getDamager().hasMetadata("NPC"))
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user