This commit is contained in:
boy0001 2015-08-01 04:27:32 +10:00
parent 8cf39be76c
commit 222e4faf8b
4 changed files with 16 additions and 8 deletions

View File

@ -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);

View File

@ -45,6 +45,12 @@ import com.plotsquared.general.commands.CommandDeclaration;
)
public class Visit extends SubCommand {
public Visit() {
requiredArguments = new Argument[] {
Argument.String
};
}
public List<Plot> getPlots(final UUID uuid) {
final List<Plot> plots = new ArrayList<>();
for (final Plot p : PS.get().getPlots()) {

View File

@ -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) {

View File

@ -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