Skip to content

Commit

Permalink
Remove debug
Browse files Browse the repository at this point in the history
  • Loading branch information
tastybento committed Nov 8, 2024
1 parent 6b095ab commit 44593bf
Showing 1 changed file with 0 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,6 @@ private void deserializeValue(Method method, T instance, PropertyDescriptor prop
try {
// Floats need special handling because the database returns them as doubles
Type setType = propertyDescriptor.getWriteMethod().getGenericParameterTypes()[0];
BentoBox.getInstance().logDebug("name = " + setType.getTypeName());
plugin.logError("Default setting value will be used: "
+ propertyDescriptor.getReadMethod().invoke(instance));
plugin.logError(method.getName());
plugin.logError(propertyDescriptor.getReadMethod().getName());
plugin.logError(instance.toString());
if (setType.getTypeName().equals("float")) {
double d = (double) setTo;
float f = (float)d;
Expand Down Expand Up @@ -387,9 +381,7 @@ public CompletableFuture<Boolean> saveObject(T instance) throws IllegalAccessExc
// Get the read method
Method method = propertyDescriptor.getReadMethod();
// Invoke the read method to get the value. We have no idea what type of value it is.
BentoBox.getInstance().logDebug("Method is " + method.getName());
Object value = method.invoke(instance);
BentoBox.getInstance().logDebug("Value is " + value);
String storageLocation = field.getName();

// Check if there is an annotation on the field
Expand All @@ -415,7 +407,6 @@ public CompletableFuture<Boolean> saveObject(T instance) throws IllegalAccessExc
}

if (!checkAdapter(field, config, storageLocation, value)) {
BentoBox.getInstance().logDebug("No adapter");
// Set the filename if it has not be set already
if (filename.isEmpty() && method.getName().equals("getUniqueId")) {
// Save the name for when the file is saved
Expand All @@ -428,7 +419,6 @@ public CompletableFuture<Boolean> saveObject(T instance) throws IllegalAccessExc
serializeSet((Set<Object>)value, config, storageLocation);
} else {
// For all other data that doesn't need special serialization
BentoBox.getInstance().logDebug("For all other data that doesn't need special serializationr");
config.set(storageLocation, serialize(value));
}
}
Expand Down Expand Up @@ -583,7 +573,6 @@ private void setComment(@NonNull String comment, @NonNull YamlConfiguration conf
private Object serialize(@Nullable Object object) {
// Null is a value object and is serialized as the string "null"
if (object == null) {
BentoBox.getInstance().logDebug("Object is null");
return "null";
}
// UUID has it's own serialization, that is not picked up automatically
Expand All @@ -600,7 +589,6 @@ private Object serialize(@Nullable Object object) {
}
// Keyed interfaces that are replacing enums
if (object instanceof Keyed k) {
BentoBox.getInstance().logDebug("Object is keyed");
return k.getKey().getKey();
}
// Enums
Expand Down

0 comments on commit 44593bf

Please sign in to comment.