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
|
||||
public PlayerData fromJson(String json) {
|
||||
try {
|
||||
LogUtils.info("Try parsing Json");
|
||||
return gson.fromJson(json, PlayerData.class);
|
||||
} catch (JsonSyntaxException e) {
|
||||
LogUtils.warn("Failed to get PlayerData from bytes");
|
||||
LogUtils.warn("Data: " + json);
|
||||
LogUtils.severe("Failed to parse PlayerData from json");
|
||||
LogUtils.info("Json: " + json);
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
@@ -449,13 +448,4 @@ public class StorageManagerImpl implements StorageManager, Listener {
|
||||
public PlayerData fromBytes(byte[] data) {
|
||||
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());
|
||||
blob.free();
|
||||
if (lock) lockOrUnlockPlayerData(uuid, true);
|
||||
LogUtils.info(new String(dataByteArray, StandardCharsets.UTF_8));
|
||||
future.complete(Optional.of(plugin.getStorageManager().fromBytes(dataByteArray)));
|
||||
} else if (Bukkit.getPlayer(uuid) != null) {
|
||||
var data = PlayerData.empty();
|
||||
|
||||
Reference in New Issue
Block a user