1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-12-01 23:13:48 +01:00

Fix for shear action not works with near spawner option

This commit is contained in:
montlikadani 2020-09-13 20:16:40 +02:00
parent 02d8fa4053
commit 2e3e86f10b

View File

@ -254,7 +254,7 @@ public class JobsPaymentListener implements Listener {
Sheep sheep = (Sheep) event.getEntity(); Sheep sheep = (Sheep) event.getEntity();
// mob spawner, no payment or experience // mob spawner, no payment or experience
if (sheep.hasMetadata(Jobs.getPlayerManager().getMobSpawnerMetadata())) { if (sheep.hasMetadata(Jobs.getPlayerManager().getMobSpawnerMetadata()) && !Jobs.getGCManager().payNearSpawner()) {
sheep.removeMetadata(Jobs.getPlayerManager().getMobSpawnerMetadata(), plugin); sheep.removeMetadata(Jobs.getPlayerManager().getMobSpawnerMetadata(), plugin);
return; return;
} }
@ -486,7 +486,7 @@ public class JobsPaymentListener implements Listener {
} }
// mob spawner, no payment or experience // mob spawner, no payment or experience
if (animal.hasMetadata(Jobs.getPlayerManager().getMobSpawnerMetadata())) { if (animal.hasMetadata(Jobs.getPlayerManager().getMobSpawnerMetadata()) && !Jobs.getGCManager().payNearSpawner()) {
animal.removeMetadata(Jobs.getPlayerManager().getMobSpawnerMetadata(), plugin); animal.removeMetadata(Jobs.getPlayerManager().getMobSpawnerMetadata(), plugin);
return; return;
} }