replace remaining debug calls

This commit is contained in:
Alexander Söderberg
2020-07-12 21:49:05 +02:00
parent 298e65a394
commit 0fa5a16cd0
25 changed files with 95 additions and 118 deletions

View File

@ -26,7 +26,6 @@
package com.plotsquared.bukkit.util;
import com.plotsquared.bukkit.BukkitMain;
import com.plotsquared.core.PlotSquared;
import com.plotsquared.core.generator.AugmentedUtils;
import com.plotsquared.core.location.Location;
import com.plotsquared.core.location.PlotLoc;
@ -55,6 +54,8 @@ import org.bukkit.Chunk;
import org.bukkit.World;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.ArrayDeque;
import java.util.ArrayList;
@ -75,6 +76,8 @@ import static com.plotsquared.core.util.entity.EntityCategories.CAP_VEHICLE;
public class BukkitRegionManager extends RegionManager {
private static final Logger logger = LoggerFactory.getLogger(BukkitRegionManager.class);
public static boolean isIn(CuboidRegion region, int x, int z) {
return x >= region.getMinimumPoint().getX() && x <= region.getMaximumPoint().getX()
&& z >= region.getMinimumPoint().getZ() && z <= region.getMaximumPoint().getZ();
@ -90,7 +93,7 @@ public class BukkitRegionManager extends RegionManager {
} else {
final Semaphore semaphore = new Semaphore(1);
try {
PlotSquared.debug("Attempting to make an asynchronous call to getLoadedChunks."
logger.debug("Attempting to make an asynchronous call to getLoadedChunks."
+ " Will halt the calling thread until completed.");
semaphore.acquire();
Bukkit.getScheduler().runTask(BukkitMain.getPlugin(BukkitMain.class), () -> {