mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-23 05:36: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 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) {
|
for (final PlotId id : plots) {
|
||||||
final Plot current = PS.get().getPlots(world).get(id);
|
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;
|
current.owner = uuid;
|
||||||
PS.get().updatePlot(current);
|
PS.get().updatePlot(current);
|
||||||
DBFunc.setOwner(current, current.owner);
|
DBFunc.setOwner(current, current.owner);
|
||||||
|
@ -45,6 +45,12 @@ import com.plotsquared.general.commands.CommandDeclaration;
|
|||||||
)
|
)
|
||||||
public class Visit extends SubCommand {
|
public class Visit extends SubCommand {
|
||||||
|
|
||||||
|
public Visit() {
|
||||||
|
requiredArguments = new Argument[] {
|
||||||
|
Argument.String
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
public List<Plot> getPlots(final UUID uuid) {
|
public List<Plot> getPlots(final UUID uuid) {
|
||||||
final List<Plot> plots = new ArrayList<>();
|
final List<Plot> plots = new ArrayList<>();
|
||||||
for (final Plot p : PS.get().getPlots()) {
|
for (final Plot p : PS.get().getPlots()) {
|
||||||
|
@ -386,7 +386,7 @@ public class PlotAnalysis {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void logln(Object obj) {
|
public static void logln(Object obj) {
|
||||||
System.out.println(log(obj));
|
PS.debug(log(obj));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String log(Object 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.Task;
|
||||||
import org.spongepowered.api.service.scheduler.TaskBuilder;
|
import org.spongepowered.api.service.scheduler.TaskBuilder;
|
||||||
|
|
||||||
|
import com.intellectualcrafters.plot.PS;
|
||||||
|
|
||||||
public class SpongeMetrics {
|
public class SpongeMetrics {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -211,7 +213,7 @@ public class SpongeMetrics {
|
|||||||
firstPost = false;
|
firstPost = false;
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
if (debug) {
|
if (debug) {
|
||||||
System.out.println("[Metrics] " + e.getMessage());
|
PS.debug("[Metrics] " + e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -370,7 +372,7 @@ public class SpongeMetrics {
|
|||||||
connection.setDoOutput(true);
|
connection.setDoOutput(true);
|
||||||
|
|
||||||
if (debug) {
|
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
|
// Write the data
|
||||||
|
Loading…
Reference in New Issue
Block a user