1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-11-26 04:25:15 +01:00

Count in monster eggs as spawners

This commit is contained in:
Zrips 2017-09-01 11:05:26 +03:00
parent 8a7d1fb765
commit 7a92aa3ee3
3 changed files with 8 additions and 5 deletions

View File

@ -507,7 +507,9 @@ public class GeneralConfigManager {
c.getW().addComment("hide-jobsinfo-without-permission", "Hide jobs info from player if they lack the permission to join the job");
hideJobsInfoWithoutPermission = c.get("hide-jobsinfo-without-permission", false);
c.getW().addComment("enable-pay-near-spawner", "Option to allow payment to be made when killing mobs from a spawner");
c.getW().addComment("enable-pay-near-spawner",
"Option to allow payment to be made when killing mobs from a spawner.",
"Use jobs.nearspawner.[amount] to define multiplayer. Example jobs.nearspawner.-0.5 will pay half of payment, jobs.nearspawner.-1 will not pay at all");
payNearSpawner = c.get("enable-pay-near-spawner", false);
c.getW().addComment("enable-pay-creative", "Option to allow payment to be made in creative mode");
@ -760,7 +762,8 @@ public class GeneralConfigManager {
c.getW().addComment("ExploitProtections.Smelt.PreventHopperFillUps", "Prevent payments when hoppers moving items into furnace", "Player will not get paid, but items will be smellted");
PreventHopperFillUps = c.get("ExploitProtections.Smelt.PreventHopperFillUps", true);
c.getW().addComment("ExploitProtections.Smelt.PreventMagmaCubeSplit", "Prevent payments when hoppers moving items into brewing stands", "Player will not get paid, but items will be brewd as they supose too");
c.getW().addComment("ExploitProtections.Smelt.PreventMagmaCubeSplit", "Prevent payments when hoppers moving items into brewing stands",
"Player will not get paid, but items will be brewd as they supose too");
PreventBrewingStandFillUps = c.get("ExploitProtections.Brew.PreventBrewingStandFillUps", true);
c.getW().addComment("use-breeder-finder", "Breeder finder.",

View File

@ -117,7 +117,7 @@ public class JobsListener implements Listener {
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onJoin(PlayerJoinEvent event) {
if (Jobs.getGCManager().isShowNewVersion() && event.getPlayer().hasPermission("jobs.versioncheck"))
plugin.getVersionCheckManager().VersionCheck(event.getPlayer());
Jobs.getVersionCheckManager().VersionCheck(event.getPlayer());
}
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)

View File

@ -178,7 +178,7 @@ public class JobsPaymentListener implements Listener {
//disabling plugin in world
if (event.getPlayer() != null && !Jobs.getGCManager().canPerformActionInWorld(event.getPlayer().getWorld()))
return;
// Entity that died must be living
if (!(event.getEntity() instanceof Sheep))
return;
Sheep sheep = (Sheep) event.getEntity();
@ -982,7 +982,7 @@ public class JobsPaymentListener implements Listener {
//disabling plugin in world
if (event.getEntity() != null && !Jobs.getGCManager().canPerformActionInWorld(event.getEntity().getWorld()))
return;
if (event.getSpawnReason() == SpawnReason.SPAWNER) {
if (event.getSpawnReason() == SpawnReason.SPAWNER || event.getSpawnReason() == SpawnReason.SPAWNER_EGG) {
LivingEntity creature = event.getEntity();
creature.setMetadata(Jobs.getPlayerManager().getMobSpawnerMetadata(), new FixedMetadataValue(this.plugin, true));
}