From f626061a7a4b7c7ef442db2979c0fc9c99dd908c Mon Sep 17 00:00:00 2001 From: fillefilip8 Date: Sat, 5 Mar 2016 15:15:00 +0100 Subject: [PATCH] Made the methods "unmodifiable". --- src/main/java/us/myles/ViaVersion/ViaVersionPlugin.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main/java/us/myles/ViaVersion/ViaVersionPlugin.java b/src/main/java/us/myles/ViaVersion/ViaVersionPlugin.java index 39f00a7ae..e8ed8ad37 100644 --- a/src/main/java/us/myles/ViaVersion/ViaVersionPlugin.java +++ b/src/main/java/us/myles/ViaVersion/ViaVersionPlugin.java @@ -21,10 +21,7 @@ import us.myles.ViaVersion.handlers.ViaVersionInitializer; import us.myles.ViaVersion.util.ReflectionUtil; import java.lang.reflect.Field; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.UUID; +import java.util.*; import java.util.concurrent.Callable; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.TimeUnit; @@ -116,7 +113,7 @@ public class ViaVersionPlugin extends JavaPlugin implements ViaVersionAPI { @Override public Map getPortedPlayers() { - return portedPlayers; + return Collections.unmodifiableMap(portedPlayers); } @Override @@ -127,7 +124,7 @@ public class ViaVersionPlugin extends JavaPlugin implements ViaVersionAPI { nonPortedPlayers.add(p.getUniqueId()); } } - return nonPortedPlayers; + return Collections.unmodifiableList(nonPortedPlayers); } public void setDebug(boolean value) {