mirror of
https://github.com/Zrips/Jobs.git
synced 2024-11-25 20:16:13 +01:00
Not paying for bucketing spawned in animals
This commit is contained in:
parent
f1eb7e5395
commit
1b4d358100
@ -406,6 +406,8 @@ public class LanguageManager {
|
||||
c.get("command.info.output.collect.none", "%jobname% does not get money for collecting blocks.");
|
||||
c.get("command.info.output.bake.info", "&eBake");
|
||||
c.get("command.info.output.bake.none", "%jobname% does not get money for cooking foods.");
|
||||
c.get("command.info.output.bucket.info", "&eBucket");
|
||||
c.get("command.info.output.bucket.none", "%jobname% does not get money for bucketing.");
|
||||
|
||||
c.get("command.playerinfo.help.info", "Show how much each job is getting paid and for what on another player.");
|
||||
c.get("command.playerinfo.help.args", "[playername] [jobname] [action]");
|
||||
|
@ -1,8 +1,6 @@
|
||||
package com.gamingmesh.jobs.listeners;
|
||||
|
||||
import com.gamingmesh.jobs.Jobs;
|
||||
import com.gamingmesh.jobs.actions.EntityActionInfo;
|
||||
import com.gamingmesh.jobs.container.ActionType;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
@ -10,6 +8,10 @@ import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.player.PlayerBucketEntityEvent;
|
||||
|
||||
import com.gamingmesh.jobs.Jobs;
|
||||
import com.gamingmesh.jobs.actions.EntityActionInfo;
|
||||
import com.gamingmesh.jobs.container.ActionType;
|
||||
|
||||
public class JobsPayment1_16Listener implements Listener {
|
||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||
public void onEntityBucketed(PlayerBucketEntityEvent event) {
|
||||
@ -33,6 +35,12 @@ public class JobsPayment1_16Listener implements Listener {
|
||||
return;
|
||||
}
|
||||
|
||||
Entity ent = event.getEntity();
|
||||
// mob spawner, no payment or experience
|
||||
if (!Jobs.getGCManager().payNearSpawner() && ent.hasMetadata(Jobs.getPlayerManager().getMobSpawnerMetadata())) {
|
||||
return;
|
||||
}
|
||||
|
||||
Jobs.action(Jobs.getPlayerManager().getJobsPlayer(player), new EntityActionInfo(event.getEntity(), ActionType.BUCKET));
|
||||
}
|
||||
}
|
||||
|
@ -1604,7 +1604,7 @@ public final class JobsPaymentListener implements Listener {
|
||||
|
||||
if (event.getEntity().getType().equals(EntityType.TURTLE))
|
||||
CMIDebug.d(event.getSpawnReason());
|
||||
|
||||
|
||||
if (!event.getSpawnReason().toString().equalsIgnoreCase("BREEDING") && !event.getSpawnReason().toString().equalsIgnoreCase("EGG"))
|
||||
return;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user