diff --git a/src/main/java/com/gamingmesh/jobs/Jobs.java b/src/main/java/com/gamingmesh/jobs/Jobs.java index d35f54c1..e22ce1ca 100644 --- a/src/main/java/com/gamingmesh/jobs/Jobs.java +++ b/src/main/java/com/gamingmesh/jobs/Jobs.java @@ -1044,12 +1044,9 @@ public final class Jobs extends JavaPlugin { List progression = jPlayer.getJobProgression(); int numjobs = progression.size(); - CMIDebug.it(); if (!Jobs.getGCManager().useBlockProtectionBlockTracker && !Jobs.getExploitManager().isProtectionValidAddIfNotExists(jPlayer, info, block, true)) { - CMIDebug.d(CMIDebug.getIT(), "ms"); return; } - CMIDebug.d(CMIDebug.getIT(), "ms"); // no job if (numjobs == 0) { diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/bp.java b/src/main/java/com/gamingmesh/jobs/commands/list/bp.java index 170abb2b..e42be54b 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/bp.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/bp.java @@ -42,20 +42,7 @@ public class bp implements Cmd { final List changedBlocks = new ArrayList<>(); - if (Jobs.getGCManager().useNewBlockProtection) { - -// if (Version.isTestServer()) { -// CMIDebug.d("Filling test blocks"); -// for (int x = 0; x < 16; x++) { -// for (int y = 72; y < 150; y++) { -// for (int z = 0; z < 16; z++) { -// Block block = loc.getChunk().getBlock(x, y, z); -// Jobs.getExploitManager().addProtection(block, CMINumber.random(1, 10)); -// } -// } -// } -// } - + if (Jobs.getGCManager().useNewBlockProtection) { for (int x = -10; x < 10; x++) { for (int y = -10; y < 10; y++) { for (int z = -10; z < 10; z++) { diff --git a/src/main/java/com/gamingmesh/jobs/config/ExploitProtectionManager.java b/src/main/java/com/gamingmesh/jobs/config/ExploitProtectionManager.java index 7c183022..980d9a5f 100644 --- a/src/main/java/com/gamingmesh/jobs/config/ExploitProtectionManager.java +++ b/src/main/java/com/gamingmesh/jobs/config/ExploitProtectionManager.java @@ -20,7 +20,6 @@ import net.Zrips.CMILib.ActionBar.CMIActionBar; import net.Zrips.CMILib.Container.CMIBlock; import net.Zrips.CMILib.Container.CMIBlock.Bisect; import net.Zrips.CMILib.Items.CMIMaterial; -import net.Zrips.CMILib.Logs.CMIDebug; import net.Zrips.CMILib.PersistentData.CMIChunkPersistentDataContainer; public class ExploitProtectionManager { @@ -104,7 +103,6 @@ public class ExploitProtectionManager { } public ExploitProtection addProtection(Block block, Long protectedUntil, boolean paid) { -// CMIDebug.c("Adding protection ", block.getLocation().toVector()); if (!Jobs.getGCManager().useNewBlockProtection) { BlockProtection protection = Jobs.getBpManager().addP(block.getLocation(), protectedUntil, paid, true); @@ -183,7 +181,7 @@ public class ExploitProtectionManager { return getTime(loc.getBlock()); } - @Deprecated + @Deprecated public Integer getBlockProtectionTime(Block block) { return getBlockProtectionTime(ActionType.PLACE, block); } @@ -197,8 +195,8 @@ public class ExploitProtectionManager { break; case PLACE: Integer time = Jobs.getRestrictedBlockManager().restrictedBlocksTimer.get(CMIMaterial.get(block)); - if (time == null && Jobs.getGCManager().useGlobalTimer) - return Jobs.getGCManager().globalblocktimer; + if (time == null && Jobs.getGCManager().useGlobalTimer) + return Jobs.getGCManager().globalblocktimer; return time == null ? 0 : time; } @@ -210,7 +208,6 @@ public class ExploitProtectionManager { } public void setPaid(Block block, boolean paid) { -// CMIDebug.d("Setting to paid", block.getLocation().toVector()); CMIChunkPersistentDataContainer pdc = getPDC(block); String locString = convertLoc(block.getLocation()); if (!paid) @@ -310,9 +307,8 @@ public class ExploitProtectionManager { if (!Jobs.getGCManager().useNewBlockProtection) return; -// CompletableFuture.supplyAsync(() -> { try { - CMIDebug.it(); + CMIChunkPersistentDataContainer pdc = getPDC(chunk); Set keys = pdc.getKeys(); @@ -324,13 +320,9 @@ public class ExploitProtectionManager { } } pdc.save(); - CMIDebug.c(CMIDebug.getIT(), "ms chunk cleanup"); + } catch (Throwable e) { e.printStackTrace(); } - -// return null; -// }); - } } diff --git a/src/main/java/com/gamingmesh/jobs/listeners/JobsListener.java b/src/main/java/com/gamingmesh/jobs/listeners/JobsListener.java index 7fd16f7d..7c7a766a 100644 --- a/src/main/java/com/gamingmesh/jobs/listeners/JobsListener.java +++ b/src/main/java/com/gamingmesh/jobs/listeners/JobsListener.java @@ -148,8 +148,6 @@ public class JobsListener implements Listener { if (CMIMaterial.isWater(event.getBlock().getType())) return; - CMIDebug.d(event.getBlock().getType(), event.getToBlock().getType()); - Jobs.getExploitManager().remove(event.getToBlock()); }