mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 15:16:45 +01:00
This
This commit is contained in:
parent
8cf39be76c
commit
222e4faf8b
@ -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);
|
||||
|
@ -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()) {
|
||||
|
@ -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) {
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user