diff --git a/src/main/java/com/intellectualcrafters/plot/commands/Visit.java b/src/main/java/com/intellectualcrafters/plot/commands/Visit.java index c243f92f1..4bcf7f6a0 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/Visit.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/Visit.java @@ -58,7 +58,7 @@ public class Visit extends SubCommand { @Override public boolean onCommand(PlotPlayer plr, String[] args) { ArrayList plots = new ArrayList<>(); - UUID user = UUIDHandler.getUUID(args[0], null); + UUID user = UUIDHandler.getCachedUUID(args[0], null); if (user != null ) { // do plots by username plots.addAll(PS.get().getPlots(user)); diff --git a/src/main/java/com/intellectualcrafters/plot/util/UUIDHandler.java b/src/main/java/com/intellectualcrafters/plot/util/UUIDHandler.java index 12fa118d7..318b47077 100644 --- a/src/main/java/com/intellectualcrafters/plot/util/UUIDHandler.java +++ b/src/main/java/com/intellectualcrafters/plot/util/UUIDHandler.java @@ -110,6 +110,10 @@ public class UUIDHandler { public static UUID getUUID(final String name, RunnableVal ifFetch) { return implementation.getUUID(name, ifFetch); } + + public static UUID getCachedUUID(final String name, RunnableVal ifFetch) { + return implementation.getUUIDMap().get(new StringWrapper(name)); + } public static Map getPlayers() { return implementation.getPlayers();