From 05ce67fbfebbfca7530905035c53b56b07164158 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20S=C3=B6derberg?= Date: Thu, 23 Jul 2020 19:19:48 +0200 Subject: [PATCH] Trick the compiler --- .../main/java/com/plotsquared/core/player/PlotPlayer.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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())); }