diff --git a/src/main/java/com/intellectualcrafters/plot/commands/SetOwner.java b/src/main/java/com/intellectualcrafters/plot/commands/SetOwner.java index 616639f11..6c4ccfda3 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/SetOwner.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/SetOwner.java @@ -101,13 +101,13 @@ public class SetOwner extends SubCommand { } final String world = loc.getWorld(); + final UUID uuid = getUUID(args[0]); + if (uuid == null) { + MainUtil.sendMessage(plr, C.INVALID_PLAYER, args[0]); + return false; + } for (final PlotId id : plots) { final Plot current = PS.get().getPlots(world).get(id); - final UUID uuid = getUUID(args[0]); - if (uuid == null) { - MainUtil.sendMessage(plr, C.INVALID_PLAYER, args[0]); - return false; - } current.owner = uuid; PS.get().updatePlot(current); DBFunc.setOwner(current, current.owner); diff --git a/src/main/java/com/intellectualcrafters/plot/commands/Visit.java b/src/main/java/com/intellectualcrafters/plot/commands/Visit.java index 4bcf7f6a0..4679f9254 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/Visit.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/Visit.java @@ -45,6 +45,12 @@ import com.plotsquared.general.commands.CommandDeclaration; ) public class Visit extends SubCommand { + public Visit() { + requiredArguments = new Argument[] { + Argument.String + }; + } + public List getPlots(final UUID uuid) { final List plots = new ArrayList<>(); for (final Plot p : PS.get().getPlots()) { diff --git a/src/main/java/com/intellectualcrafters/plot/object/PlotAnalysis.java b/src/main/java/com/intellectualcrafters/plot/object/PlotAnalysis.java index 9b8067b81..7c74df345 100644 --- a/src/main/java/com/intellectualcrafters/plot/object/PlotAnalysis.java +++ b/src/main/java/com/intellectualcrafters/plot/object/PlotAnalysis.java @@ -386,7 +386,7 @@ public class PlotAnalysis { } public static void logln(Object obj) { - System.out.println(log(obj)); + PS.debug(log(obj)); } public static String log(Object obj) { diff --git a/src/main/java/com/plotsquared/sponge/util/SpongeMetrics.java b/src/main/java/com/plotsquared/sponge/util/SpongeMetrics.java index 3c49f9c09..2db10002b 100644 --- a/src/main/java/com/plotsquared/sponge/util/SpongeMetrics.java +++ b/src/main/java/com/plotsquared/sponge/util/SpongeMetrics.java @@ -54,6 +54,8 @@ import org.spongepowered.api.plugin.PluginContainer; import org.spongepowered.api.service.scheduler.Task; import org.spongepowered.api.service.scheduler.TaskBuilder; +import com.intellectualcrafters.plot.PS; + public class SpongeMetrics { /** @@ -211,7 +213,7 @@ public class SpongeMetrics { firstPost = false; } catch (IOException e) { if (debug) { - System.out.println("[Metrics] " + e.getMessage()); + PS.debug("[Metrics] " + e.getMessage()); } } } @@ -370,7 +372,7 @@ public class SpongeMetrics { connection.setDoOutput(true); if (debug) { - System.out.println("[Metrics] Prepared request for " + pluginName + " uncompressed=" + uncompressed.length + " compressed=" + compressed.length); + PS.debug("[Metrics] Prepared request for " + pluginName + " uncompressed=" + uncompressed.length + " compressed=" + compressed.length); } // Write the data