diff --git a/Core/src/main/java/com/plotsquared/core/player/PlotPlayer.java b/Core/src/main/java/com/plotsquared/core/player/PlotPlayer.java index 61a41a672..434d4477e 100644 --- a/Core/src/main/java/com/plotsquared/core/player/PlotPlayer.java +++ b/Core/src/main/java/com/plotsquared/core/player/PlotPlayer.java @@ -758,10 +758,11 @@ public abstract class PlotPlayer

implements CommandCaller, OfflinePlotPlayer void setPersistentMeta(@Nonnull final MetaDataKey key, @Nonnull final T value) { + final Object rawValue = value; if (key.getType().equals(Integer.class)) { - this.setPersistentMeta(key.toString(), Ints.toByteArray((int) value)); + this.setPersistentMeta(key.toString(), Ints.toByteArray((int) rawValue)); } else if (key.getType().equals(Boolean.class)) { - this.setPersistentMeta(key.toString(), ByteArrayUtilities.booleanToBytes((boolean) value)); + this.setPersistentMeta(key.toString(), ByteArrayUtilities.booleanToBytes((boolean) rawValue)); } else { throw new IllegalArgumentException(String.format("Unknown meta data type '%s'", key.getType().getSimpleName())); }