From 95c3ae35786364e3f8dc385eeb49d24e6635356c Mon Sep 17 00:00:00 2001 From: montlikadani Date: Mon, 13 Jan 2020 15:56:25 +0100 Subject: [PATCH] Fixed issue when the RequiredJobLevels not works correctly --- src/main/java/com/gamingmesh/jobs/Jobs.java | 2 +- src/main/java/com/gamingmesh/jobs/config/ShopManager.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/gamingmesh/jobs/Jobs.java b/src/main/java/com/gamingmesh/jobs/Jobs.java index 036b9e40..93af3fba 100644 --- a/src/main/java/com/gamingmesh/jobs/Jobs.java +++ b/src/main/java/com/gamingmesh/jobs/Jobs.java @@ -899,8 +899,8 @@ public class Jobs extends JavaPlugin { if (GconfigManager.MythicMobsEnabled && MythicManager != null && MythicManager.Check()) MythicManager.registerListener(); + setPistonProtectionListener(); if (GconfigManager.useBlockProtection) { - setPistonProtectionListener(); getServer().getPluginManager().registerEvents(PistonProtectionListener, this); } diff --git a/src/main/java/com/gamingmesh/jobs/config/ShopManager.java b/src/main/java/com/gamingmesh/jobs/config/ShopManager.java index 309defd0..aea6df05 100644 --- a/src/main/java/com/gamingmesh/jobs/config/ShopManager.java +++ b/src/main/java/com/gamingmesh/jobs/config/ShopManager.java @@ -373,7 +373,7 @@ public class ShopManager { String[] split = one.split("-"); String job = split[0]; int lvl = 1; - if (split.length > 2) { + if (split.length > 1) { try { lvl = Integer.parseInt(split[1]); } catch (NumberFormatException e) {