mirror of
https://github.com/Xiao-MoMi/Custom-Fishing.git
synced 2025-12-19 15:09:24 +00:00
remove debug messages
This commit is contained in:
@@ -429,11 +429,10 @@ public class StorageManagerImpl implements StorageManager, Listener {
|
|||||||
@Override
|
@Override
|
||||||
public PlayerData fromJson(String json) {
|
public PlayerData fromJson(String json) {
|
||||||
try {
|
try {
|
||||||
LogUtils.info("Try parsing Json");
|
|
||||||
return gson.fromJson(json, PlayerData.class);
|
return gson.fromJson(json, PlayerData.class);
|
||||||
} catch (JsonSyntaxException e) {
|
} catch (JsonSyntaxException e) {
|
||||||
LogUtils.warn("Failed to get PlayerData from bytes");
|
LogUtils.severe("Failed to parse PlayerData from json");
|
||||||
LogUtils.warn("Data: " + json);
|
LogUtils.info("Json: " + json);
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -449,13 +448,4 @@ public class StorageManagerImpl implements StorageManager, Listener {
|
|||||||
public PlayerData fromBytes(byte[] data) {
|
public PlayerData fromBytes(byte[] data) {
|
||||||
return fromJson(new String(data, StandardCharsets.UTF_8));
|
return fromJson(new String(data, StandardCharsets.UTF_8));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Custom exception class for data serialization errors.
|
|
||||||
*/
|
|
||||||
public static class DataSerializationException extends RuntimeException {
|
|
||||||
protected DataSerializationException(String message, Throwable cause) {
|
|
||||||
super(message, cause);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -145,7 +145,6 @@ public abstract class AbstractSQLDatabase extends AbstractStorage {
|
|||||||
final byte[] dataByteArray = blob.getBytes(1, (int) blob.length());
|
final byte[] dataByteArray = blob.getBytes(1, (int) blob.length());
|
||||||
blob.free();
|
blob.free();
|
||||||
if (lock) lockOrUnlockPlayerData(uuid, true);
|
if (lock) lockOrUnlockPlayerData(uuid, true);
|
||||||
LogUtils.info(new String(dataByteArray, StandardCharsets.UTF_8));
|
|
||||||
future.complete(Optional.of(plugin.getStorageManager().fromBytes(dataByteArray)));
|
future.complete(Optional.of(plugin.getStorageManager().fromBytes(dataByteArray)));
|
||||||
} else if (Bukkit.getPlayer(uuid) != null) {
|
} else if (Bukkit.getPlayer(uuid) != null) {
|
||||||
var data = PlayerData.empty();
|
var data = PlayerData.empty();
|
||||||
|
|||||||
Reference in New Issue
Block a user