diff --git a/pom.xml b/pom.xml
index 9dfcd80..d0f2af6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
4.0.0
org.warp
CoordinatesObfuscator
- 1.4.2
+ 1.4.3
CoordinatesObfuscator
diff --git a/src/main/java/org/warp/coordinatesobfuscator/CoordsOffsetsManager.java b/src/main/java/org/warp/coordinatesobfuscator/CoordsOffsetsManager.java
index 9397280..69c5bf4 100644
--- a/src/main/java/org/warp/coordinatesobfuscator/CoordsOffsetsManager.java
+++ b/src/main/java/org/warp/coordinatesobfuscator/CoordsOffsetsManager.java
@@ -4,11 +4,17 @@
import java.util.Map;
import java.util.UUID;
import java.util.function.Supplier;
+import java.util.logging.Logger;
import org.bukkit.World;
import org.bukkit.entity.Player;
public class CoordsOffsetsManager {
private final Map> playerCoordsPerWorld = new HashMap<>();
+ private final Logger pluginLogger;
+
+ public CoordsOffsetsManager(Logger pluginLogger) {
+ this.pluginLogger = pluginLogger;
+ }
public synchronized CoordinateOffset get(Player player, World world) {
return get(player.getUniqueId(), world.getUID());
@@ -70,7 +76,7 @@ public synchronized CoordinateOffset getOrPut(Player player, World world, Suppli
}
private void removeValue(UUID playerUUID, UUID worldUUID) {
- System.out.println("Deleting player coordinates offset");
+ pluginLogger.info("Deleting player coordinates offset");
HashMap worldsMap = playerCoordsPerWorld.get(playerUUID);
if (worldsMap != null) {
CoordinateOffset playerPosition = worldsMap.remove(worldUUID);
@@ -87,7 +93,7 @@ private void removeValue(UUID playerUUID, UUID worldUUID) {
}
private void removeValue(UUID playerUUID) {
- System.out.println("Deleting player coordinates offset (globally)");
+ pluginLogger.info("Deleting player coordinates offset (globally)");
HashMap worldsMap = playerCoordsPerWorld.remove(playerUUID);
if (worldsMap == null) {
if (CoordinatesObfuscator.DISALLOW_REMOVING_NONEXISTENT_COORDINATES) {
@@ -97,7 +103,7 @@ private void removeValue(UUID playerUUID) {
}
private void setValue(UUID playerUUID, UUID worldUUID, CoordinateOffset value) {
- System.out.println("Setting player coordinates offset");
+ pluginLogger.info("Setting player coordinates offset");
value.validate();
HashMap worldsMap = playerCoordsPerWorld.computeIfAbsent(playerUUID, (playerUid) -> new HashMap<>());
if (worldsMap.containsKey(worldUUID)) {
@@ -108,7 +114,7 @@ private void setValue(UUID playerUUID, UUID worldUUID, CoordinateOffset value) {
}
private void replaceValue(UUID playerUUID, UUID worldUUID, CoordinateOffset value) {
- System.out.println("Replacing player coordinates offset");
+ pluginLogger.info("Replacing player coordinates offset");
value.validate();
HashMap worldsMap = playerCoordsPerWorld.computeIfAbsent(playerUUID, (playerUid) -> new HashMap<>());
if (!worldsMap.containsKey(worldUUID)) {
diff --git a/src/main/java/org/warp/coordinatesobfuscator/PlayerManager.java b/src/main/java/org/warp/coordinatesobfuscator/PlayerManager.java
index 92d3391..20339ff 100644
--- a/src/main/java/org/warp/coordinatesobfuscator/PlayerManager.java
+++ b/src/main/java/org/warp/coordinatesobfuscator/PlayerManager.java
@@ -73,7 +73,7 @@ public static void exitPlayer(final Player player) {
public static void load(Logger pluginLogger) {
logger = pluginLogger;
- coordsOffsetsManager = new CoordsOffsetsManager();
+ coordsOffsetsManager = new CoordsOffsetsManager(pluginLogger);
lastPlayerCoordinateManager = new LastPlayerCoordinateManager();
}
diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml
index e8d0311..03bed6a 100644
--- a/src/main/resources/plugin.yml
+++ b/src/main/resources/plugin.yml
@@ -1,6 +1,6 @@
name: ${project.name}
main: ${project.groupId}.coordinatesobfuscator.CoordinatesObfuscator
version: ${project.version}
-api-version: 1.16
+api-version: 1.17
author: Cavallium
depend: [ProtocolLib]
\ No newline at end of file