diff --git a/com/gamingmesh/jobs/PermissionHandler.java b/com/gamingmesh/jobs/PermissionHandler.java index 436e681e..ef57327b 100644 --- a/com/gamingmesh/jobs/PermissionHandler.java +++ b/com/gamingmesh/jobs/PermissionHandler.java @@ -35,7 +35,6 @@ import com.gamingmesh.jobs.container.JobConditions; import com.gamingmesh.jobs.container.JobPermission; import com.gamingmesh.jobs.container.JobProgression; import com.gamingmesh.jobs.container.JobsPlayer; -import com.gamingmesh.jobs.stuff.Debug; public class PermissionHandler { private Jobs plugin; @@ -63,9 +62,9 @@ public class PermissionHandler { this.plugin.getServer().getPluginManager().removePermission(permission); changed = true; } - + // Permissions should only apply if we have permission to use jobs in this world - if (hasWorldPermission2(player, player.getWorld().getName())) { + if (hasWorldPermission(player, player.getWorld().getName())) { List progression = jPlayer.getJobProgression(); // calculate new permissions HashMap permissions = new HashMap(); @@ -252,26 +251,6 @@ public class PermissionHandler { return player.hasPermission("jobs.world." + world.toLowerCase()); } - public boolean hasWorldPermission2(Player player, String world) { - boolean foundMain = false; - boolean foundWorld = false; - for (PermissionAttachmentInfo one : player.getEffectivePermissions()) { - if (one.getPermission().equalsIgnoreCase("jobs.use")) { - foundMain = true; - if (foundWorld) - break; - } - if (one.getPermission().equalsIgnoreCase("jobs.world." + world.toLowerCase())) { - foundWorld = true; - if (foundMain) - break; - } - } - if (!foundMain || !foundWorld) - return false; - return true; - } - public boolean hasWorldPermission(JobsPlayer player, String world) { if (!Jobs.getPermissionManager().hasPermission(player, "jobs.use")) { return false; diff --git a/com/gamingmesh/jobs/listeners/JobsPaymentListener.java b/com/gamingmesh/jobs/listeners/JobsPaymentListener.java index 241e3f70..253a9b28 100644 --- a/com/gamingmesh/jobs/listeners/JobsPaymentListener.java +++ b/com/gamingmesh/jobs/listeners/JobsPaymentListener.java @@ -270,9 +270,6 @@ public class JobsPaymentListener implements Listener { if (!Jobs.getPermissionHandler().hasWorldPermission(player, player.getLocation().getWorld().getName())) return; - if (!Jobs.getPermissionHandler().hasWorldPermission2(player, player.getLocation().getWorld().getName())) - return; - BlockActionInfo bInfo = new BlockActionInfo(block, ActionType.BREAK); FastPayment fp = Jobs.FastPayment.get(player.getName()); if (fp != null) {