1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-11-26 04:25:15 +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();
// 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);
return;
}
@ -486,7 +486,7 @@ public class JobsPaymentListener implements Listener {
}
// 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);
return;
}