Fixing some more things

This commit is contained in:
boy0001
2015-07-31 00:25:16 +10:00
parent bfa877e607
commit e1dad77d8f
264 changed files with 6920 additions and 2146 deletions

View File

@ -20,6 +20,8 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
package com.intellectualcrafters.plot.commands;
import java.util.UUID;
import com.intellectualcrafters.plot.PS;
import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.database.DBFunc;
@ -34,8 +36,6 @@ import com.plotsquared.bukkit.util.bukkit.uuid.SQLUUIDHandler;
import com.plotsquared.general.commands.Argument;
import com.plotsquared.general.commands.CommandDeclaration;
import java.util.UUID;
@CommandDeclaration(
command = "add",
aliases = {"a"},

View File

@ -23,7 +23,12 @@ package com.intellectualcrafters.plot.commands;
import com.intellectualcrafters.plot.PS;
import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.config.Settings;
import com.intellectualcrafters.plot.object.*;
import com.intellectualcrafters.plot.object.Location;
import com.intellectualcrafters.plot.object.Plot;
import com.intellectualcrafters.plot.object.PlotCluster;
import com.intellectualcrafters.plot.object.PlotId;
import com.intellectualcrafters.plot.object.PlotPlayer;
import com.intellectualcrafters.plot.object.PlotWorld;
import com.intellectualcrafters.plot.util.ClusterManager;
import com.intellectualcrafters.plot.util.EconHandler;
import com.intellectualcrafters.plot.util.MainUtil;

View File

@ -26,7 +26,12 @@ import com.intellectualcrafters.plot.config.Settings;
import com.intellectualcrafters.plot.database.DBFunc;
import com.intellectualcrafters.plot.flag.Flag;
import com.intellectualcrafters.plot.flag.FlagManager;
import com.intellectualcrafters.plot.object.*;
import com.intellectualcrafters.plot.object.Location;
import com.intellectualcrafters.plot.object.Plot;
import com.intellectualcrafters.plot.object.PlotHandler;
import com.intellectualcrafters.plot.object.PlotId;
import com.intellectualcrafters.plot.object.PlotPlayer;
import com.intellectualcrafters.plot.object.PlotWorld;
import com.intellectualcrafters.plot.util.EconHandler;
import com.intellectualcrafters.plot.util.MainUtil;
import com.intellectualcrafters.plot.util.UUIDHandler;

View File

@ -23,8 +23,16 @@ package com.intellectualcrafters.plot.commands;
import com.intellectualcrafters.plot.PS;
import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.config.Settings;
import com.intellectualcrafters.plot.object.*;
import com.intellectualcrafters.plot.util.*;
import com.intellectualcrafters.plot.object.Location;
import com.intellectualcrafters.plot.object.Plot;
import com.intellectualcrafters.plot.object.PlotPlayer;
import com.intellectualcrafters.plot.object.PlotWorld;
import com.intellectualcrafters.plot.object.RunnableVal;
import com.intellectualcrafters.plot.util.EconHandler;
import com.intellectualcrafters.plot.util.EventUtil;
import com.intellectualcrafters.plot.util.MainUtil;
import com.intellectualcrafters.plot.util.Permissions;
import com.intellectualcrafters.plot.util.SchematicHandler;
import com.intellectualcrafters.plot.util.SchematicHandler.Schematic;
import com.plotsquared.general.commands.CommandDeclaration;

View File

@ -20,6 +20,8 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
package com.intellectualcrafters.plot.commands;
import java.util.Set;
import com.intellectualcrafters.plot.PS;
import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.config.Settings;
@ -27,11 +29,13 @@ import com.intellectualcrafters.plot.object.Location;
import com.intellectualcrafters.plot.object.Plot;
import com.intellectualcrafters.plot.object.PlotId;
import com.intellectualcrafters.plot.object.PlotPlayer;
import com.intellectualcrafters.plot.util.*;
import com.intellectualcrafters.plot.util.CmdConfirm;
import com.intellectualcrafters.plot.util.MainUtil;
import com.intellectualcrafters.plot.util.Permissions;
import com.intellectualcrafters.plot.util.TaskManager;
import com.intellectualcrafters.plot.util.UUIDHandler;
import com.plotsquared.general.commands.CommandDeclaration;
import java.util.Set;
@CommandDeclaration(
command = "clear",
description = "Clear a plot",

View File

@ -20,22 +20,34 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
package com.intellectualcrafters.plot.commands;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.UUID;
import org.bukkit.generator.ChunkGenerator;
import com.intellectualcrafters.plot.PS;
import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.database.DBFunc;
import com.intellectualcrafters.plot.object.*;
import com.intellectualcrafters.plot.util.*;
import com.intellectualcrafters.plot.object.BlockLoc;
import com.intellectualcrafters.plot.object.Location;
import com.intellectualcrafters.plot.object.Plot;
import com.intellectualcrafters.plot.object.PlotCluster;
import com.intellectualcrafters.plot.object.PlotClusterId;
import com.intellectualcrafters.plot.object.PlotId;
import com.intellectualcrafters.plot.object.PlotPlayer;
import com.intellectualcrafters.plot.object.PlotWorld;
import com.intellectualcrafters.plot.util.ClusterManager;
import com.intellectualcrafters.plot.util.MainUtil;
import com.intellectualcrafters.plot.util.Permissions;
import com.intellectualcrafters.plot.util.SetupUtils;
import com.intellectualcrafters.plot.util.StringMan;
import com.intellectualcrafters.plot.util.UUIDHandler;
import com.plotsquared.bukkit.generator.AugmentedPopulator;
import com.plotsquared.bukkit.generator.BukkitPlotGenerator;
import com.plotsquared.bukkit.generator.HybridGen;
import com.plotsquared.general.commands.CommandDeclaration;
import org.bukkit.generator.ChunkGenerator;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.UUID;
@CommandDeclaration(
command = "cluster",
aliases = {"clusters"},

View File

@ -20,6 +20,8 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
package com.intellectualcrafters.plot.commands;
import java.util.Arrays;
import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.object.Location;
import com.intellectualcrafters.plot.object.Plot;
@ -29,12 +31,9 @@ import com.intellectualcrafters.plot.object.comment.CommentInbox;
import com.intellectualcrafters.plot.object.comment.PlotComment;
import com.intellectualcrafters.plot.util.CommentManager;
import com.intellectualcrafters.plot.util.MainUtil;
import com.intellectualcrafters.plot.util.StringMan;
import com.plotsquared.general.commands.CommandDeclaration;
import org.apache.commons.lang.StringUtils;
import java.util.Arrays;
@CommandDeclaration(
command = "comment",
aliases = {"msg"},
@ -48,12 +47,12 @@ public class Comment extends SubCommand {
@Override
public boolean onCommand(PlotPlayer player, String[] args) {
if (args.length < 2) {
sendMessage(player, C.COMMENT_SYNTAX, StringUtils.join(CommentManager.inboxes.keySet(),"|"));
sendMessage(player, C.COMMENT_SYNTAX, StringMan.join(CommentManager.inboxes.keySet(),"|"));
return false;
}
CommentInbox inbox = CommentManager.inboxes.get(args[0].toLowerCase());
if (inbox == null) {
sendMessage(player, C.COMMENT_SYNTAX, StringUtils.join(CommentManager.inboxes.keySet(),"|"));
sendMessage(player, C.COMMENT_SYNTAX, StringMan.join(CommentManager.inboxes.keySet(),"|"));
return false;
}
Plot plot;
@ -62,7 +61,7 @@ public class Comment extends SubCommand {
int index;
if (id != null) {
if (args.length < 4) {
sendMessage(player, C.COMMENT_SYNTAX, StringUtils.join(CommentManager.inboxes.keySet(),"|"));
sendMessage(player, C.COMMENT_SYNTAX, StringMan.join(CommentManager.inboxes.keySet(),"|"));
return false;
}
index = 2;
@ -76,12 +75,12 @@ public class Comment extends SubCommand {
sendMessage(player, C.NO_PERM_INBOX, "");
return false;
}
String message = StringUtils.join(Arrays.copyOfRange(args,index, args.length), " ");
String message = StringMan.join(Arrays.copyOfRange(args,index, args.length), " ");
PlotComment comment = new PlotComment(loc.getWorld(), id, message, player.getName(), inbox.toString(), System.currentTimeMillis());
boolean result = inbox.addComment(plot, comment);
if (!result) {
sendMessage(player, C.NO_PLOT_INBOX, "");
sendMessage(player, C.COMMENT_SYNTAX, StringUtils.join(CommentManager.inboxes.keySet(),"|"));
sendMessage(player, C.COMMENT_SYNTAX, StringMan.join(CommentManager.inboxes.keySet(),"|"));
return false;
}
sendMessage(player, C.COMMENT_ADDED);

View File

@ -20,17 +20,20 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
package com.intellectualcrafters.plot.commands;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import com.intellectualcrafters.plot.PS;
import com.intellectualcrafters.plot.object.Plot;
import com.intellectualcrafters.plot.object.PlotId;
import com.intellectualcrafters.plot.object.PlotPlayer;
import com.intellectualcrafters.plot.util.BlockManager;
import com.intellectualcrafters.plot.util.MainUtil;
import com.intellectualcrafters.plot.util.MathMan;
import com.plotsquared.general.commands.CommandDeclaration;
import org.apache.commons.lang.StringUtils;
import java.util.*;
import java.util.Set;
@CommandDeclaration(
command = "condense",
@ -43,10 +46,6 @@ public class Condense extends SubCommand {
public static boolean TASK = false;
public static void sendMessage(final String message) {
PS.log("&3PlotSquared -> Plot condense&8: &7" + message);
}
@Override
public boolean onCommand(final PlotPlayer plr, String ... args) {
if ((args.length != 2) && (args.length != 3)) {
@ -72,7 +71,7 @@ public class Condense extends SubCommand {
MainUtil.sendMessage(plr, "/plot condense " + worldname + " start <radius>");
return false;
}
if (!StringUtils.isNumeric(args[2])) {
if (!MathMan.isInteger(args[2])) {
MainUtil.sendMessage(plr, "INVALID RADIUS");
return false;
}
@ -102,7 +101,7 @@ public class Condense extends SubCommand {
@Override
public void run() {
if (!TASK) {
sendMessage("CONDENSE TASK CANCELLED");
MainUtil.sendMessage(plr, "CONDENSE TASK CANCELLED");
return;
}
to_move.remove(0);
@ -130,16 +129,16 @@ public class Condense extends SubCommand {
free.remove(0);
}
if (to_move.size() == 0) {
sendMessage("TASK COMPLETE. PLEASE VERIFY THAT NO NEW PLOTS HAVE BEEN CLAIMED DURING TASK.");
MainUtil.sendMessage(plr, "TASK COMPLETE. PLEASE VERIFY THAT NO NEW PLOTS HAVE BEEN CLAIMED DURING TASK.");
TASK = false;
return;
}
if (free.size() == 0) {
sendMessage("TASK FAILED. NO FREE PLOTS FOUND!");
MainUtil.sendMessage(plr, "TASK FAILED. NO FREE PLOTS FOUND!");
TASK = false;
return;
}
sendMessage("MOVING " + to_move.get(0) + " to " + free.get(0));
MainUtil.sendMessage(plr, "MOVING " + to_move.get(0) + " to " + free.get(0));
MainUtil.move(MainUtil.getPlot(worldname, to_move.get(0)), MainUtil.getPlot(worldname, free.get(0)), this);
}
});
@ -161,7 +160,7 @@ public class Condense extends SubCommand {
MainUtil.sendMessage(plr, "/plot condense " + worldname + " info <radius>");
return false;
}
if (!StringUtils.isNumeric(args[2])) {
if (!MathMan.isInteger(args[2])) {
MainUtil.sendMessage(plr, "INVALID RADIUS");
return false;
}

View File

@ -1,5 +1,10 @@
package com.intellectualcrafters.plot.commands;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.UUID;
import com.intellectualcrafters.plot.PS;
import com.intellectualcrafters.plot.database.MySQL;
import com.intellectualcrafters.plot.database.SQLManager;
@ -11,11 +16,6 @@ import com.intellectualcrafters.plot.util.TaskManager;
import com.intellectualcrafters.plot.util.UUIDHandler;
import com.plotsquared.general.commands.CommandDeclaration;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.UUID;
@CommandDeclaration(
command = "database",
aliases = {"convert"},
@ -30,7 +30,7 @@ public class Database extends SubCommand {
private static boolean sendMessageU(final UUID uuid, final String msg) {
if (uuid == null) {
PS.log(msg);
PS.debug(msg);
} else {
final PlotPlayer p = UUIDHandler.getPlayer(uuid);
if ((p != null) && p.isOnline()) {
@ -127,11 +127,7 @@ public class Database extends SubCommand {
}
private boolean sendMessage(final PlotPlayer player, final String msg) {
if (player == null) {
PS.log(msg);
} else {
MainUtil.sendMessage(player, msg);
}
MainUtil.sendMessage(player, msg);
return true;
}
}

View File

@ -1,13 +1,13 @@
package com.intellectualcrafters.plot.commands;
import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.object.PlotPlayer;
import com.plotsquared.general.commands.CommandDeclaration;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.object.PlotPlayer;
import com.plotsquared.general.commands.CommandDeclaration;
@CommandDeclaration(
command = "debugallowunsafe",
description = "Allow unsafe actions until toggled off",

View File

@ -20,17 +20,28 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
package com.intellectualcrafters.plot.commands;
import java.util.ArrayList;
import java.util.UUID;
import com.google.common.collect.BiMap;
import com.intellectualcrafters.plot.PS;
import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.database.DBFunc;
import com.intellectualcrafters.plot.object.*;
import com.intellectualcrafters.plot.util.*;
import com.intellectualcrafters.plot.object.ChunkLoc;
import com.intellectualcrafters.plot.object.Location;
import com.intellectualcrafters.plot.object.Plot;
import com.intellectualcrafters.plot.object.PlotId;
import com.intellectualcrafters.plot.object.PlotManager;
import com.intellectualcrafters.plot.object.PlotPlayer;
import com.intellectualcrafters.plot.object.PlotWorld;
import com.intellectualcrafters.plot.object.StringWrapper;
import com.intellectualcrafters.plot.util.BlockManager;
import com.intellectualcrafters.plot.util.ChunkManager;
import com.intellectualcrafters.plot.util.EventUtil;
import com.intellectualcrafters.plot.util.MainUtil;
import com.intellectualcrafters.plot.util.UUIDHandler;
import com.plotsquared.general.commands.CommandDeclaration;
import java.util.ArrayList;
import java.util.UUID;
@CommandDeclaration(
command = "debugclaimtest",
description = "If you accidentally delete your database, this command will attempt to restore all plots based on the data from plot sighs. Execution time may vary",

View File

@ -20,23 +20,36 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
package com.intellectualcrafters.plot.commands;
import com.intellectualcrafters.plot.PS;
import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.flag.FlagManager;
import com.intellectualcrafters.plot.generator.HybridUtils;
import com.intellectualcrafters.plot.object.*;
import com.intellectualcrafters.plot.util.*;
import com.plotsquared.bukkit.util.BukkitHybridUtils;
import com.plotsquared.general.commands.CommandDeclaration;
import org.apache.commons.lang.StringUtils;
import org.bukkit.Bukkit;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.sql.Timestamp;
import java.util.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.UUID;
import com.intellectualcrafters.plot.util.StringMan;
import org.bukkit.Bukkit;
import com.intellectualcrafters.plot.PS;
import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.flag.FlagManager;
import com.intellectualcrafters.plot.generator.HybridUtils;
import com.intellectualcrafters.plot.object.ChunkLoc;
import com.intellectualcrafters.plot.object.OfflinePlotPlayer;
import com.intellectualcrafters.plot.object.Plot;
import com.intellectualcrafters.plot.object.PlotAnalysis;
import com.intellectualcrafters.plot.object.PlotPlayer;
import com.intellectualcrafters.plot.object.RunnableVal;
import com.intellectualcrafters.plot.util.BlockManager;
import com.intellectualcrafters.plot.util.ChunkManager;
import com.intellectualcrafters.plot.util.ExpireManager;
import com.intellectualcrafters.plot.util.MainUtil;
import com.intellectualcrafters.plot.util.UUIDHandler;
import com.plotsquared.bukkit.util.BukkitHybridUtils;
import com.plotsquared.general.commands.CommandDeclaration;
@CommandDeclaration(
command = "debugexec",
@ -93,7 +106,7 @@ public class DebugExec extends SubCommand {
PlotAnalysis.calcOptimalModifiers(new Runnable() {
@Override
public void run() {
PS.log("$1Thank you for calibrating PlotSquared plot expiry");
MainUtil.sendMessage(player, "$1Thank you for calibrating PlotSquared plot expiry");
}
}, threshold);
return true;
@ -122,7 +135,7 @@ public class DebugExec extends SubCommand {
}
case "start-rgar": {
if (args.length != 2) {
PS.log("&cInvalid syntax: /plot debugexec start-rgar <world>");
MainUtil.sendMessage(player, "&cInvalid syntax: /plot debugexec start-rgar <world>");
return false;
}
boolean result;
@ -137,26 +150,26 @@ public class DebugExec extends SubCommand {
result = HybridUtils.manager.scheduleRoadUpdate(args[1], 0);
}
if (!result) {
PS.log("&cCannot schedule mass schematic update! (Is one already in progress?)");
MainUtil.sendMessage(player, "&cCannot schedule mass schematic update! (Is one already in progress?)");
return false;
}
return true;
}
case "stop-rgar": {
if (((BukkitHybridUtils)(HybridUtils.manager)).task == 0) {
PS.log("&cTASK NOT RUNNING!");
MainUtil.sendMessage(player, "&cTASK NOT RUNNING!");
return false;
}
((BukkitHybridUtils)(HybridUtils.manager)).task = 0;
Bukkit.getScheduler().cancelTask(((BukkitHybridUtils)(HybridUtils.manager)).task);
PS.log("&cCancelling task...");
MainUtil.sendMessage(player, "&cCancelling task...");
while (BukkitHybridUtils.chunks.size() > 0) {
ChunkLoc chunk = BukkitHybridUtils.chunks.get(0);
BukkitHybridUtils.chunks.remove(0);
HybridUtils.manager.regenerateRoad(BukkitHybridUtils.world, chunk, 0);
ChunkManager.manager.unloadChunk(BukkitHybridUtils.world, chunk, true, true);
}
PS.log("&cCancelled!");
MainUtil.sendMessage(player, "&cCancelled!");
return true;
}
case "start-expire": {
@ -261,7 +274,7 @@ public class DebugExec extends SubCommand {
}
}
}
MainUtil.sendMessage(player, "Possible sub commands: /plot debugexec <" + StringUtils.join(allowed_params, "|") + ">");
MainUtil.sendMessage(player, "Possible sub commands: /plot debugexec <" + StringMan.join(allowed_params, "|") + ">");
return true;
}
}

View File

@ -20,6 +20,10 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
package com.intellectualcrafters.plot.commands;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map.Entry;
import com.intellectualcrafters.plot.PS;
import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.database.DBFunc;
@ -32,10 +36,6 @@ import com.intellectualcrafters.plot.util.MainUtil;
import com.plotsquared.general.commands.Argument;
import com.plotsquared.general.commands.CommandDeclaration;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map.Entry;
@CommandDeclaration(
command = "debugfixflags",
usage = "/plot debugfixflags <world>",

View File

@ -20,13 +20,13 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
package com.intellectualcrafters.plot.commands;
import java.lang.reflect.Field;
import com.intellectualcrafters.plot.PS;
import com.intellectualcrafters.plot.database.DBFunc;
import com.intellectualcrafters.plot.object.PlotPlayer;
import com.plotsquared.general.commands.CommandDeclaration;
import java.lang.reflect.Field;
@CommandDeclaration(
command = "debugloadtest",
permission = "plots.debugloadtest",
@ -44,9 +44,9 @@ public class DebugLoadTest extends SubCommand {
fPlots.setAccessible(true);
fPlots.set(null, DBFunc.getPlots());
} catch (final Exception e) {
PS.log("&3===FAILED&3===");
PS.debug("&3===FAILED&3===");
e.printStackTrace();
PS.log("&3===END OF STACKTRACE===");
PS.debug("&3===END OF STACKTRACE===");
}
return true;
}

View File

@ -1,5 +1,11 @@
package com.intellectualcrafters.plot.commands;
import java.io.File;
import java.io.IOException;
import org.bukkit.Bukkit;
import org.bukkit.plugin.Plugin;
import com.intellectualcrafters.plot.PS;
import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.object.PlotPlayer;
@ -7,11 +13,6 @@ import com.intellectualcrafters.plot.util.HastebinUtility;
import com.intellectualcrafters.plot.util.TaskManager;
import com.plotsquared.bukkit.BukkitMain;
import com.plotsquared.general.commands.CommandDeclaration;
import org.bukkit.Bukkit;
import org.bukkit.plugin.Plugin;
import java.io.File;
import java.io.IOException;
@CommandDeclaration(
command = "debugpaste",

View File

@ -20,6 +20,8 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
package com.intellectualcrafters.plot.commands;
import java.util.ArrayList;
import com.intellectualcrafters.plot.PS;
import com.intellectualcrafters.plot.database.DBFunc;
import com.intellectualcrafters.plot.object.Plot;
@ -27,8 +29,6 @@ import com.intellectualcrafters.plot.object.PlotPlayer;
import com.intellectualcrafters.plot.util.MainUtil;
import com.plotsquared.general.commands.CommandDeclaration;
import java.util.ArrayList;
@CommandDeclaration(
command = "debugsavetest",
permission = "plots.debugsavetest",

View File

@ -20,6 +20,16 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
package com.intellectualcrafters.plot.commands;
import java.io.File;
import java.io.FilenameFilter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map.Entry;
import java.util.UUID;
import org.bukkit.Bukkit;
import com.intellectualcrafters.plot.PS;
import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.config.Settings;
@ -30,24 +40,14 @@ import com.intellectualcrafters.plot.object.Plot;
import com.intellectualcrafters.plot.object.PlotPlayer;
import com.intellectualcrafters.plot.object.StringWrapper;
import com.intellectualcrafters.plot.util.MainUtil;
import com.intellectualcrafters.plot.util.PlayerManager;
import com.intellectualcrafters.plot.util.TaskManager;
import com.intellectualcrafters.plot.util.UUIDHandler;
import com.intellectualcrafters.plot.uuid.UUIDWrapper;
import com.plotsquared.bukkit.uuid.DefaultUUIDWrapper;
import com.plotsquared.bukkit.uuid.LowerOfflineUUIDWrapper;
import com.plotsquared.bukkit.uuid.OfflineUUIDWrapper;
import com.intellectualcrafters.plot.uuid.UUIDWrapper;
import com.plotsquared.general.commands.Argument;
import com.plotsquared.general.commands.CommandDeclaration;
import org.bukkit.Bukkit;
import java.io.File;
import java.io.FilenameFilter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map.Entry;
import java.util.UUID;
@CommandDeclaration(
command = "uuidconvert",
@ -115,7 +115,9 @@ public class DebugUUID extends SubCommand {
MainUtil.sendConsoleMessage("&6Beginning UUID mode conversion");
MainUtil.sendConsoleMessage("&7 - Disconnecting players");
for (PlotPlayer user : UUIDHandler.getPlayers().values()) {
PlayerManager.manager.kickPlayer(user, "PlotSquared UUID conversion has been initiated. You may reconnect when finished.");
for (PlotPlayer pp : UUIDHandler.getPlayers().values()) {
pp.kick("PlotSquared UUID conversion has been initiated. You may reconnect when finished.");
}
}
MainUtil.sendConsoleMessage("&7 - Initializing map");
@ -145,7 +147,7 @@ public class DebugUUID extends SubCommand {
final UUID uuid = UUID.fromString(s);
uuids.add(uuid);
} catch (final Exception e) {
PS.log(C.PREFIX.s() + "Invalid playerdata: " + current);
MainUtil.sendMessage(plr, C.PREFIX.s() + "Invalid playerdata: " + current);
}
}
}
@ -176,7 +178,7 @@ public class DebugUUID extends SubCommand {
uCReverse.put(uuid2, uuid);
}
} catch (final Throwable e) {
PS.log(C.PREFIX.s() + "&6Invalid playerdata: " + uuid.toString() + ".dat");
MainUtil.sendMessage(plr, C.PREFIX.s() + "&6Invalid playerdata: " + uuid.toString() + ".dat");
}
}
for (final String name : names) {

View File

@ -27,7 +27,12 @@ import com.intellectualcrafters.plot.object.Location;
import com.intellectualcrafters.plot.object.Plot;
import com.intellectualcrafters.plot.object.PlotPlayer;
import com.intellectualcrafters.plot.object.PlotWorld;
import com.intellectualcrafters.plot.util.*;
import com.intellectualcrafters.plot.util.CmdConfirm;
import com.intellectualcrafters.plot.util.EconHandler;
import com.intellectualcrafters.plot.util.MainUtil;
import com.intellectualcrafters.plot.util.Permissions;
import com.intellectualcrafters.plot.util.TaskManager;
import com.intellectualcrafters.plot.util.UUIDHandler;
import com.plotsquared.general.commands.CommandDeclaration;
@CommandDeclaration(

View File

@ -20,18 +20,22 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
package com.intellectualcrafters.plot.commands;
import java.util.UUID;
import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.database.DBFunc;
import com.intellectualcrafters.plot.object.Location;
import com.intellectualcrafters.plot.object.Plot;
import com.intellectualcrafters.plot.object.PlotPlayer;
import com.intellectualcrafters.plot.util.*;
import com.intellectualcrafters.plot.util.BlockManager;
import com.intellectualcrafters.plot.util.EventUtil;
import com.intellectualcrafters.plot.util.MainUtil;
import com.intellectualcrafters.plot.util.Permissions;
import com.intellectualcrafters.plot.util.UUIDHandler;
import com.plotsquared.bukkit.util.bukkit.uuid.SQLUUIDHandler;
import com.plotsquared.general.commands.Argument;
import com.plotsquared.general.commands.CommandDeclaration;
import java.util.UUID;
@CommandDeclaration(
command = "deny",
aliases = {"d"},

View File

@ -1,5 +1,7 @@
package com.intellectualcrafters.plot.commands;
import java.net.URL;
import com.intellectualcrafters.jnbt.CompoundTag;
import com.intellectualcrafters.plot.PS;
import com.intellectualcrafters.plot.config.C;
@ -13,8 +15,6 @@ import com.intellectualcrafters.plot.util.SchematicHandler;
import com.intellectualcrafters.plot.util.TaskManager;
import com.plotsquared.general.commands.CommandDeclaration;
import java.net.URL;
@CommandDeclaration(
command = "download",
aliases = {"dl"},

View File

@ -20,6 +20,12 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
package com.intellectualcrafters.plot.commands;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import com.intellectualcrafters.plot.util.StringMan;
import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.database.DBFunc;
import com.intellectualcrafters.plot.flag.AbstractFlag;
@ -32,11 +38,6 @@ import com.intellectualcrafters.plot.object.PlotPlayer;
import com.intellectualcrafters.plot.util.MainUtil;
import com.intellectualcrafters.plot.util.Permissions;
import com.plotsquared.general.commands.CommandDeclaration;
import org.apache.commons.lang.StringUtils;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
@CommandDeclaration(
command = "flag",
@ -122,7 +123,7 @@ public class FlagCmd extends SubCommand {
MainUtil.sendMessage(player, C.NO_PERMISSION, "plots.set.flag." + args[1].toLowerCase());
return false;
}
final String value = StringUtils.join(Arrays.copyOfRange(args, 2, args.length), " ");
final String value = StringMan.join(Arrays.copyOfRange(args, 2, args.length), " ");
final Object parsed = af.parseValueRaw(value);
if (parsed == null) {
MainUtil.sendMessage(player, "&c" + af.getValueDesc());
@ -161,7 +162,7 @@ public class FlagCmd extends SubCommand {
return false;
}
if ((args.length == 3) && flag.getAbstractFlag().isList()) {
final String value = StringUtils.join(Arrays.copyOfRange(args, 2, args.length), " ");
final String value = StringMan.join(Arrays.copyOfRange(args, 2, args.length), " ");
((FlagValue.ListValue) flag.getAbstractFlag().value).remove(flag.getValue(), value);
DBFunc.setFlags(plot, plot.getSettings().flags.values());
} else {
@ -192,7 +193,7 @@ public class FlagCmd extends SubCommand {
MainUtil.sendMessage(player, C.NO_PERMISSION, "plots.set.flag." + args[1].toLowerCase());
return false;
}
final String value = StringUtils.join(Arrays.copyOfRange(args, 2, args.length), " ");
final String value = StringMan.join(Arrays.copyOfRange(args, 2, args.length), " ");
final Object parsed = af.parseValueRaw(value);
if (parsed == null) {
MainUtil.sendMessage(player, "&c" + af.getValueDesc());
@ -233,7 +234,7 @@ public class FlagCmd extends SubCommand {
String message = "";
String prefix = "";
for (final String flag : flags.keySet()) {
message += prefix + "&6" + flag + ": &7" + StringUtils.join(flags.get(flag), ", ");
message += prefix + "&6" + flag + ": &7" + StringMan.join(flags.get(flag), ", ");
prefix = "\n";
}
MainUtil.sendMessage(player, message);

View File

@ -13,7 +13,6 @@ import com.plotsquared.general.commands.CommandDeclaration;
@CommandDeclaration(
command = "help",
description = "Get this help menu",
permission = "",
aliases = {"he"},
category = CommandCategory.INFO
)

View File

@ -20,6 +20,8 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
package com.intellectualcrafters.plot.commands;
import java.util.ArrayList;
import com.intellectualcrafters.plot.PS;
import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.object.Plot;
@ -27,8 +29,6 @@ import com.intellectualcrafters.plot.object.PlotPlayer;
import com.intellectualcrafters.plot.util.MainUtil;
import com.plotsquared.general.commands.CommandDeclaration;
import java.util.ArrayList;
@CommandDeclaration(
command = "home",
aliases = {"h"},

View File

@ -20,6 +20,11 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
package com.intellectualcrafters.plot.commands;
import java.util.ArrayList;
import java.util.List;
import com.intellectualcrafters.plot.util.StringMan;
import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.object.Plot;
import com.intellectualcrafters.plot.object.PlotPlayer;
@ -31,11 +36,6 @@ import com.intellectualcrafters.plot.util.MainUtil;
import com.intellectualcrafters.plot.util.StringMan;
import com.plotsquared.general.commands.CommandDeclaration;
import org.apache.commons.lang.StringUtils;
import java.util.ArrayList;
import java.util.List;
@CommandDeclaration(
command = "inbox",
description = "Review the comments for a plot",
@ -128,7 +128,7 @@ public class Inbox extends SubCommand {
}
final CommentInbox inbox = CommentManager.inboxes.get(args[0].toLowerCase());
if (inbox == null) {
sendMessage(player, C.INVALID_INBOX, StringUtils.join(CommentManager.inboxes.keySet(),", "));
sendMessage(player, C.INVALID_INBOX, StringMan.join(CommentManager.inboxes.keySet(),", "));
return false;
}
player.setMeta("inbox:" + inbox.toString(), System.currentTimeMillis());

View File

@ -20,6 +20,14 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
package com.intellectualcrafters.plot.commands;
import java.util.ArrayList;
import java.util.Collection;
import java.util.UUID;
import java.util.regex.Matcher;
import com.intellectualcrafters.plot.util.StringMan;
import com.intellectualcrafters.plot.PS;
import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.config.Settings;
import com.intellectualcrafters.plot.database.DBFunc;
@ -31,18 +39,13 @@ import com.intellectualcrafters.plot.object.PlotId;
import com.intellectualcrafters.plot.object.PlotInventory;
import com.intellectualcrafters.plot.object.PlotItemStack;
import com.intellectualcrafters.plot.object.PlotPlayer;
import com.intellectualcrafters.plot.util.*;
import com.intellectualcrafters.plot.util.BlockManager;
import com.intellectualcrafters.plot.util.MainUtil;
import com.intellectualcrafters.plot.util.StringMan;
import com.intellectualcrafters.plot.util.TaskManager;
import com.intellectualcrafters.plot.util.UUIDHandler;
import com.plotsquared.general.commands.CommandDeclaration;
import org.apache.commons.lang.StringUtils;
import org.bukkit.Material;
import org.bukkit.inventory.ItemStack;
import java.util.ArrayList;
import java.util.Collection;
import java.util.UUID;
import java.util.regex.Matcher;
@CommandDeclaration(
command = "info",
aliases = {"i"},
@ -221,7 +224,7 @@ public class Info extends SubCommand {
Flag descriptionFlag = FlagManager.getPlotFlag(plot, "description");
final String description = descriptionFlag == null ? C.NONE.s() : descriptionFlag.getValueString();
final String flags = StringMan.replaceFromMap("$2" + (StringUtils.join(FlagManager.getPlotFlags(plot.world, plot.getSettings(), true).values(), "").length() > 0 ? StringUtils.join(FlagManager.getPlotFlags(plot.world, plot.getSettings(), true).values(), "$1, $2") : C.NONE.s()), C.replacements);
final String flags = StringMan.replaceFromMap("$2" + (StringMan.join(FlagManager.getPlotFlags(plot.world, plot.getSettings(), true).values(), "").length() > 0 ? StringMan.join(FlagManager.getPlotFlags(plot.world, plot.getSettings(), true).values(), "$1, $2") : C.NONE.s()), C.replacements);
final boolean build = plot.isAdded(player.getUUID());
String owner = plot.owner == null ? "unowned" : getPlayerList(plot.getOwners());

View File

@ -1,5 +1,9 @@
package com.intellectualcrafters.plot.commands;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.List;
import com.intellectualcrafters.plot.PS;
import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.config.Settings;
@ -14,10 +18,6 @@ import com.intellectualcrafters.plot.util.SchematicHandler.Schematic;
import com.intellectualcrafters.plot.util.TaskManager;
import com.plotsquared.general.commands.CommandDeclaration;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.List;
@CommandDeclaration(
command = "load",
aliases = {"restore"},

View File

@ -20,9 +20,13 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
package com.intellectualcrafters.plot.commands;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import com.intellectualcrafters.plot.PS;
import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.config.Settings;
import com.intellectualcrafters.plot.object.ConsolePlayer;
import com.intellectualcrafters.plot.object.Plot;
import com.intellectualcrafters.plot.object.PlotId;
@ -37,12 +41,6 @@ import com.plotsquared.general.commands.Command;
import com.plotsquared.general.commands.CommandHandlingOutput;
import com.plotsquared.general.commands.CommandManager;
import java.text.NumberFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
/**
* PlotSquared command class
*
@ -61,39 +59,68 @@ public class MainCommand extends CommandManager<PlotPlayer> {
private MainCommand() {
super(null, new ArrayList<Command<PlotPlayer>>());
List<SubCommand> toAdd = new ArrayList<>(Arrays.asList(
new Buy(), new Save(), new Load(),
new Template(), new Download(),
new Update(), new Template(),
new Setup(), new DebugUUID(),
new DebugFill(), new DebugSaveTest(),
new DebugLoadTest(), new CreateRoadSchematic(),
new DebugAllowUnsafe(), new RegenAllRoads(),
new DebugClear(), new Claim(),
new Auto(), new Home(), new Visit(),
new TP(), new Set(), new Toggle(),
new Clear(), new Delete(), new SetOwner(),
new Trust(), new Add(), new Deny(),
new Untrust(), new Remove(), new Undeny(),
new Info(), new list(), new Help(),
new Debug(), new SchematicCmd(), new plugin(),
new Purge(), new Reload(), new Merge(),
new DebugPaste(), new Unlink(), new Kick(),
new Rate(), new DebugClaimTest(), new Inbox(),
new Comment(), new Database(), new Swap(),
new MusicSubcommand(), new DebugRoadRegen(),
new Trust(), new DebugExec(), new FlagCmd(),
new Target(), new DebugFixFlags(), new Move(),
new Condense(), new Condense(), new Copy(),
new Chat()));
if (Settings.ENABLE_CLUSTERS) {
toAdd.add(new Cluster());
}
for (final SubCommand cmd : toAdd) {
if (!createCommand(cmd)) {
PS.log("Failed to create command: " + cmd.getClass());
}
}
createCommand(new Buy());
createCommand(new Save());
createCommand(new Load());
createCommand(new Template());
createCommand(new Download());
createCommand(new Update());
createCommand(new Template());
createCommand(new Setup());
// createCommand(new DebugUUID());
createCommand(new DebugFill());
createCommand(new DebugSaveTest());
createCommand(new DebugLoadTest());
createCommand(new CreateRoadSchematic());
createCommand(new DebugAllowUnsafe());
createCommand(new RegenAllRoads());
createCommand(new DebugClear());
createCommand(new Claim());
createCommand(new Auto());
createCommand(new Home());
createCommand(new Visit());
createCommand(new TP());
createCommand(new Set());
createCommand(new Toggle());
createCommand(new Clear());
createCommand(new Delete());
createCommand(new SetOwner());
createCommand(new Trust());
createCommand(new Add());
createCommand(new Deny());
createCommand(new Untrust());
createCommand(new Remove());
createCommand(new Undeny());
createCommand(new Info());
createCommand(new list());
createCommand(new Help());
createCommand(new Debug());
createCommand(new SchematicCmd());
createCommand(new plugin());
createCommand(new Purge());
createCommand(new Reload());
createCommand(new Merge());
createCommand(new DebugPaste());
createCommand(new Unlink());
createCommand(new Kick());
createCommand(new Rate());
createCommand(new DebugClaimTest());
createCommand(new Inbox());
createCommand(new Comment());
createCommand(new Database());
createCommand(new Swap());
createCommand(new MusicSubcommand());
createCommand(new DebugRoadRegen());
createCommand(new Trust());
createCommand(new DebugExec());
createCommand(new FlagCmd());
createCommand(new Target());
createCommand(new DebugFixFlags());
createCommand(new Move());
createCommand(new Condense());
createCommand(new Condense());
createCommand(new Copy());
createCommand(new Chat());
}
public static boolean no_permission(final PlotPlayer player, final String permission) {

View File

@ -20,18 +20,28 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
package com.intellectualcrafters.plot.commands;
import com.intellectualcrafters.plot.PS;
import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.object.*;
import com.intellectualcrafters.plot.util.*;
import com.plotsquared.general.commands.Argument;
import com.plotsquared.general.commands.CommandDeclaration;
import org.apache.commons.lang.StringUtils;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.UUID;
import com.intellectualcrafters.plot.util.StringMan;
import com.intellectualcrafters.plot.PS;
import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.object.Location;
import com.intellectualcrafters.plot.object.Plot;
import com.intellectualcrafters.plot.object.PlotId;
import com.intellectualcrafters.plot.object.PlotPlayer;
import com.intellectualcrafters.plot.object.PlotWorld;
import com.intellectualcrafters.plot.util.CmdConfirm;
import com.intellectualcrafters.plot.util.EconHandler;
import com.intellectualcrafters.plot.util.EventUtil;
import com.intellectualcrafters.plot.util.MainUtil;
import com.intellectualcrafters.plot.util.Permissions;
import com.intellectualcrafters.plot.util.UUIDHandler;
import com.plotsquared.general.commands.Argument;
import com.plotsquared.general.commands.CommandDeclaration;
@CommandDeclaration(
command = "merge",
aliases = {"m"},
@ -91,7 +101,7 @@ public class Merge extends SubCommand {
return false;
}
if (args.length < 1) {
MainUtil.sendMessage(plr, C.SUBCOMMAND_SET_OPTIONS_HEADER.s() + StringUtils.join(values, C.BLOCK_LIST_SEPARATER.s()));
MainUtil.sendMessage(plr, C.SUBCOMMAND_SET_OPTIONS_HEADER.s() + StringMan.join(values, C.BLOCK_LIST_SEPARATER.s()));
MainUtil.sendMessage(plr, C.DIRECTION.s().replaceAll("%dir%", direction(loc.getYaw())));
return false;
}
@ -103,7 +113,7 @@ public class Merge extends SubCommand {
}
}
if (direction == -1) {
MainUtil.sendMessage(plr, C.SUBCOMMAND_SET_OPTIONS_HEADER.s() + StringUtils.join(values, C.BLOCK_LIST_SEPARATER.s()));
MainUtil.sendMessage(plr, C.SUBCOMMAND_SET_OPTIONS_HEADER.s() + StringMan.join(values, C.BLOCK_LIST_SEPARATER.s()));
MainUtil.sendMessage(plr, C.DIRECTION.s().replaceAll("%dir%", direction(loc.getYaw())));
return false;
}

View File

@ -22,7 +22,11 @@ package com.intellectualcrafters.plot.commands;
import com.intellectualcrafters.plot.PS;
import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.object.*;
import com.intellectualcrafters.plot.object.Location;
import com.intellectualcrafters.plot.object.Plot;
import com.intellectualcrafters.plot.object.PlotId;
import com.intellectualcrafters.plot.object.PlotPlayer;
import com.intellectualcrafters.plot.object.PlotWorld;
import com.intellectualcrafters.plot.util.MainUtil;
import com.intellectualcrafters.plot.util.Permissions;
import com.plotsquared.general.commands.Argument;

View File

@ -23,7 +23,12 @@ package com.intellectualcrafters.plot.commands;
import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.flag.Flag;
import com.intellectualcrafters.plot.flag.FlagManager;
import com.intellectualcrafters.plot.object.*;
import com.intellectualcrafters.plot.object.Location;
import com.intellectualcrafters.plot.object.Plot;
import com.intellectualcrafters.plot.object.PlotBlock;
import com.intellectualcrafters.plot.object.PlotInventory;
import com.intellectualcrafters.plot.object.PlotItemStack;
import com.intellectualcrafters.plot.object.PlotPlayer;
import com.intellectualcrafters.plot.util.BlockManager;
import com.intellectualcrafters.plot.util.MainUtil;
import com.plotsquared.general.commands.CommandDeclaration;

View File

@ -20,6 +20,11 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
package com.intellectualcrafters.plot.commands;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
import com.intellectualcrafters.plot.PS;
import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.database.DBFunc;
@ -30,11 +35,6 @@ import com.intellectualcrafters.plot.util.MainUtil;
import com.intellectualcrafters.plot.util.UUIDHandler;
import com.plotsquared.general.commands.CommandDeclaration;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
@CommandDeclaration(
command = "purge",

View File

@ -20,25 +20,33 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
package com.intellectualcrafters.plot.commands;
import com.intellectualcrafters.plot.PS;
import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.config.Settings;
import com.intellectualcrafters.plot.database.DBFunc;
import com.intellectualcrafters.plot.object.*;
import com.intellectualcrafters.plot.util.MainUtil;
import com.intellectualcrafters.plot.util.TaskManager;
import com.plotsquared.bukkit.events.PlotRateEvent;
import com.plotsquared.general.commands.CommandDeclaration;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.mutable.MutableInt;
import org.bukkit.Bukkit;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Map.Entry;
import java.util.UUID;
import com.intellectualcrafters.plot.util.StringMan;
import org.apache.commons.lang.mutable.MutableInt;
import org.bukkit.Bukkit;
import com.intellectualcrafters.plot.PS;
import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.config.Settings;
import com.intellectualcrafters.plot.database.DBFunc;
import com.intellectualcrafters.plot.object.Location;
import com.intellectualcrafters.plot.object.Plot;
import com.intellectualcrafters.plot.object.PlotInventory;
import com.intellectualcrafters.plot.object.PlotItemStack;
import com.intellectualcrafters.plot.object.PlotPlayer;
import com.intellectualcrafters.plot.object.Rating;
import com.intellectualcrafters.plot.util.MainUtil;
import com.intellectualcrafters.plot.util.MathMan;
import com.intellectualcrafters.plot.util.TaskManager;
import com.plotsquared.bukkit.events.PlotRateEvent;
import com.plotsquared.general.commands.CommandDeclaration;
@CommandDeclaration(
command = "rate",
permission = "plots.rate",
@ -118,13 +126,11 @@ public class Rate extends SubCommand {
// handle ratings
int rV = rating.intValue();
// CALL THE EVENT
PlotRateEvent rateEvent = new PlotRateEvent(player, rV, plot);
PlotRateEvent rateEvent = new PlotRateEvent(player, new Rating(rV), plot);
Bukkit.getPluginManager().callEvent(rateEvent);
// DONE CALLING THE EVENT
// get new rating
rV = rateEvent.getRating();
// set rating
plot.getSettings().ratings.put(player.getUUID(), rV);
plot.getSettings().ratings.put(player.getUUID(), rateEvent.getRating().getAggregate());
DBFunc.setRating(plot, player.getUUID(), rV);
sendMessage(player, C.RATING_APPLIED, plot.getId().toString());
sendMessage(player, C.RATING_APPLIED, plot.getId().toString());
@ -134,15 +140,15 @@ public class Rate extends SubCommand {
return false;
}
};
inventory.setItem(0, new PlotItemStack(35, (short) 12, 0, "0/8", null));
inventory.setItem(1, new PlotItemStack(35, (short) 14, 1, "1/8", null));
inventory.setItem(2, new PlotItemStack(35, (short) 1, 2, "2/8", null));
inventory.setItem(3, new PlotItemStack(35, (short) 4, 3, "3/8", null));
inventory.setItem(4, new PlotItemStack(35, (short) 5, 4, "4/8", null));
inventory.setItem(5, new PlotItemStack(35, (short) 9, 5, "5/8", null));
inventory.setItem(6, new PlotItemStack(35, (short) 11, 6, "6/8", null));
inventory.setItem(7, new PlotItemStack(35, (short) 10, 7, "7/8", null));
inventory.setItem(8, new PlotItemStack(35, (short) 2, 8, "8/8", null));
inventory.setItem(0, new PlotItemStack(35, (short) 12, 0, "0/8"));
inventory.setItem(1, new PlotItemStack(35, (short) 14, 1, "1/8"));
inventory.setItem(2, new PlotItemStack(35, (short) 1, 2, "2/8"));
inventory.setItem(3, new PlotItemStack(35, (short) 4, 3, "3/8"));
inventory.setItem(4, new PlotItemStack(35, (short) 5, 4, "4/8"));
inventory.setItem(5, new PlotItemStack(35, (short) 9, 5, "5/8"));
inventory.setItem(6, new PlotItemStack(35, (short) 11, 6, "6/8"));
inventory.setItem(7, new PlotItemStack(35, (short) 10, 7, "7/8"));
inventory.setItem(8, new PlotItemStack(35, (short) 2, 8, "8/8"));
inventory.openInventory();
}
};
@ -169,7 +175,7 @@ public class Rate extends SubCommand {
}
final int rating;
if (StringUtils.isNumeric(arg) && arg.length() < 3 && arg.length() > 0) {
if (MathMan.isInteger(arg) && arg.length() < 3 && arg.length() > 0) {
rating = Integer.parseInt(arg);
if (rating > 10) {
sendMessage(player, C.RATING_NOT_VALID);

View File

@ -20,6 +20,8 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
package com.intellectualcrafters.plot.commands;
import java.util.List;
import com.intellectualcrafters.plot.PS;
import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.generator.HybridPlotManager;
@ -32,8 +34,6 @@ import com.intellectualcrafters.plot.util.MainUtil;
import com.plotsquared.general.commands.Argument;
import com.plotsquared.general.commands.CommandDeclaration;
import java.util.List;
@CommandDeclaration(
command = "regenallroads",
description = "Regenerate all roads in the map using the set road schematic",
@ -70,13 +70,13 @@ public class RegenAllRoads extends SubCommand {
return false;
}
final List<ChunkLoc> chunks = ChunkManager.manager.getChunkChunks(name);
PS.log("&cIf no schematic is set, the following will not do anything");
PS.log("&7 - To set a schematic, stand in a plot and use &c/plot createroadschematic");
PS.log("&6Potential chunks to update: &7" + (chunks.size() * 1024));
PS.log("&6Estimated time: &7" + (chunks.size()) + " seconds");
MainUtil.sendMessage(plr, "&cIf no schematic is set, the following will not do anything");
MainUtil.sendMessage(plr, "&7 - To set a schematic, stand in a plot and use &c/plot createroadschematic");
MainUtil.sendMessage(plr, "&6Potential chunks to update: &7" + (chunks.size() * 1024));
MainUtil.sendMessage(plr, "&6Estimated time: &7" + (chunks.size()) + " seconds");
final boolean result = HybridUtils.manager.scheduleRoadUpdate(name, height);
if (!result) {
PS.log("&cCannot schedule mass schematic update! (Is one already in progress?)");
MainUtil.sendMessage(plr, "&cCannot schedule mass schematic update! (Is one already in progress?)");
return false;
}
return true;

View File

@ -20,6 +20,10 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
package com.intellectualcrafters.plot.commands;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.UUID;
import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.object.Location;
import com.intellectualcrafters.plot.object.Plot;
@ -31,10 +35,6 @@ import com.plotsquared.bukkit.util.bukkit.uuid.SQLUUIDHandler;
import com.plotsquared.general.commands.Argument;
import com.plotsquared.general.commands.CommandDeclaration;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.UUID;
@CommandDeclaration(
command = "remove",
aliases = {"r"},

View File

@ -1,5 +1,9 @@
package com.intellectualcrafters.plot.commands;
import java.net.URL;
import java.util.List;
import java.util.UUID;
import com.intellectualcrafters.jnbt.CompoundTag;
import com.intellectualcrafters.plot.PS;
import com.intellectualcrafters.plot.config.C;
@ -14,10 +18,6 @@ import com.intellectualcrafters.plot.util.SchematicHandler;
import com.intellectualcrafters.plot.util.TaskManager;
import com.plotsquared.general.commands.CommandDeclaration;
import java.net.URL;
import java.util.List;
import java.util.UUID;
@CommandDeclaration(
command = "save",
aliases = {"backup"},

View File

@ -20,10 +20,21 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
package com.intellectualcrafters.plot.commands;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.UUID;
import com.intellectualcrafters.plot.PS;
import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.config.Settings;
import com.intellectualcrafters.plot.object.*;
import com.intellectualcrafters.plot.object.ConsolePlayer;
import com.intellectualcrafters.plot.object.Location;
import com.intellectualcrafters.plot.object.Plot;
import com.intellectualcrafters.plot.object.PlotId;
import com.intellectualcrafters.plot.object.PlotPlayer;
import com.intellectualcrafters.plot.object.RunnableVal;
import com.intellectualcrafters.plot.util.MainUtil;
import com.intellectualcrafters.plot.util.Permissions;
import com.intellectualcrafters.plot.util.SchematicHandler;
@ -31,12 +42,6 @@ import com.intellectualcrafters.plot.util.SchematicHandler.Schematic;
import com.intellectualcrafters.plot.util.TaskManager;
import com.plotsquared.general.commands.CommandDeclaration;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.UUID;
// TODO Add sub-subcommands
@CommandDeclaration(
@ -193,8 +198,8 @@ public class SchematicCmd extends SubCommand {
return false;
}
else {
PS.log("&3PlotSquared&8->&3Schemaitc&8: &7Mass export has started. This may take a while.");
PS.log("&3PlotSquared&8->&3Schemaitc&8: &7Found &c" + plotmap.size() + "&7 plots...");
MainUtil.sendMessage(plr, "&3PlotSquared&8->&3Schemaitc&8: &7Mass export has started. This may take a while.");
MainUtil.sendMessage(plr, "&3PlotSquared&8->&3Schemaitc&8: &7Found &c" + plotmap.size() + "&7 plots...");
}
break;
}

View File

@ -20,22 +20,35 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
package com.intellectualcrafters.plot.commands;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import com.intellectualcrafters.plot.util.StringMan;
import com.intellectualcrafters.plot.PS;
import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.config.Configuration;
import com.intellectualcrafters.plot.flag.AbstractFlag;
import com.intellectualcrafters.plot.flag.Flag;
import com.intellectualcrafters.plot.flag.FlagManager;
import com.intellectualcrafters.plot.object.*;
import com.intellectualcrafters.plot.util.*;
import com.intellectualcrafters.plot.object.BlockLoc;
import com.intellectualcrafters.plot.object.Location;
import com.intellectualcrafters.plot.object.Plot;
import com.intellectualcrafters.plot.object.PlotBlock;
import com.intellectualcrafters.plot.object.PlotManager;
import com.intellectualcrafters.plot.object.PlotPlayer;
import com.intellectualcrafters.plot.object.PlotWorld;
import com.intellectualcrafters.plot.object.StringWrapper;
import com.intellectualcrafters.plot.util.BlockManager;
import com.intellectualcrafters.plot.util.MainUtil;
import com.intellectualcrafters.plot.util.Permissions;
import com.intellectualcrafters.plot.util.SetBlockQueue;
import com.intellectualcrafters.plot.util.StringComparison;
import com.intellectualcrafters.plot.util.StringMan;
import com.intellectualcrafters.plot.util.UUIDHandler;
import com.plotsquared.general.commands.CommandDeclaration;
import com.plotsquared.listener.APlotListener;
import org.apache.commons.lang.StringUtils;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import com.plotsquared.listener.PlotListener;
// TODO Make sub-subcommands
@ -86,8 +99,8 @@ public class Set extends SubCommand {
}
if (args[0].equalsIgnoreCase("flag")) {
if (args.length < 2) {
final String message = StringMan.replaceFromMap("$2" + (StringUtils.join(FlagManager.getFlags(plr), "$1, $2")), C.replacements);
// final String message = StringUtils.join(FlagManager.getFlags(plr), "&c, &6");
final String message = StringMan.replaceFromMap("$2" + (StringMan.join(FlagManager.getFlags(plr), "$1, $2")), C.replacements);
// final String message = StringMan.join(FlagManager.getFlags(plr), "&c, &6");
MainUtil.sendMessage(plr, C.NEED_KEY.s().replaceAll("%values%", message));
return false;
}
@ -116,11 +129,11 @@ public class Set extends SubCommand {
return false;
}
MainUtil.sendMessage(plr, C.FLAG_REMOVED);
APlotListener.manager.plotEntry(plr, plot);
PlotListener.plotEntry(plr, plot);
return true;
}
try {
final String value = StringUtils.join(Arrays.copyOfRange(args, 2, args.length), " ");
final String value = StringMan.join(Arrays.copyOfRange(args, 2, args.length), " ");
final Object parsed_value = af.parseValueRaw(value);
if (parsed_value == null) {
MainUtil.sendMessage(plr, af.getValueDesc());
@ -133,7 +146,7 @@ public class Set extends SubCommand {
return false;
}
MainUtil.sendMessage(plr, C.FLAG_ADDED);
APlotListener.manager.plotEntry(plr, plot);
PlotListener.plotEntry(plr, plot);
return true;
} catch (final Exception e) {
MainUtil.sendMessage(plr, "&c" + e.getMessage());

View File

@ -20,6 +20,9 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
package com.intellectualcrafters.plot.commands;
import java.util.ArrayList;
import java.util.UUID;
import com.intellectualcrafters.plot.PS;
import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.config.Settings;
@ -34,9 +37,6 @@ import com.intellectualcrafters.plot.util.UUIDHandler;
import com.plotsquared.general.commands.Argument;
import com.plotsquared.general.commands.CommandDeclaration;
import java.util.ArrayList;
import java.util.UUID;
@CommandDeclaration(
command = "setowner",
permission = "plots.set.owner",

View File

@ -20,6 +20,13 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
package com.intellectualcrafters.plot.commands;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map.Entry;
import com.intellectualcrafters.plot.util.StringMan;
import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.config.ConfigurationNode;
import com.intellectualcrafters.plot.config.Settings;
@ -29,18 +36,8 @@ import com.intellectualcrafters.plot.object.SetupObject;
import com.intellectualcrafters.plot.util.BlockManager;
import com.intellectualcrafters.plot.util.MainUtil;
import com.intellectualcrafters.plot.util.SetupUtils;
import com.plotsquared.bukkit.generator.BukkitPlotGenerator;
import com.plotsquared.bukkit.generator.HybridGen;
import com.plotsquared.general.commands.CommandDeclaration;
import org.apache.commons.lang.StringUtils;
import org.bukkit.generator.ChunkGenerator;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map.Entry;
@CommandDeclaration(
command = "setup",
permission = "plots.admin.command.setup",
@ -104,7 +101,7 @@ public class Setup extends SubCommand {
case 0: { // choose generator
if ((args.length != 1) || !SetupUtils.generators.containsKey(args[0])) {
final String prefix = "\n&8 - &7";
MainUtil.sendMessage(plr, "&cYou must choose a generator!" + prefix + StringUtils.join(SetupUtils.generators.keySet(), prefix).replaceAll("PlotSquared", "&2PlotSquared"));
MainUtil.sendMessage(plr, "&cYou must choose a generator!" + prefix + StringMan.join(SetupUtils.generators.keySet(), prefix).replaceAll("PlotSquared", "&2PlotSquared"));
sendMessage(plr, C.SETUP_INIT);
return false;
}

View File

@ -20,16 +20,21 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
package com.intellectualcrafters.plot.commands;
import java.util.ArrayList;
import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.object.*;
import com.intellectualcrafters.plot.object.Location;
import com.intellectualcrafters.plot.object.Plot;
import com.intellectualcrafters.plot.object.PlotCluster;
import com.intellectualcrafters.plot.object.PlotClusterId;
import com.intellectualcrafters.plot.object.PlotId;
import com.intellectualcrafters.plot.object.PlotPlayer;
import com.intellectualcrafters.plot.util.ChunkManager;
import com.intellectualcrafters.plot.util.ClusterManager;
import com.intellectualcrafters.plot.util.MainUtil;
import com.intellectualcrafters.plot.util.Permissions;
import com.plotsquared.general.commands.CommandDeclaration;
import java.util.ArrayList;
@CommandDeclaration(
command = "swap",
description = "Swap two plots",

View File

@ -20,6 +20,7 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
package com.intellectualcrafters.plot.commands;
import com.intellectualcrafters.plot.util.StringMan;
import com.intellectualcrafters.plot.PS;
import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.object.Location;
@ -28,10 +29,10 @@ import com.intellectualcrafters.plot.object.PlotId;
import com.intellectualcrafters.plot.object.PlotPlayer;
import com.intellectualcrafters.plot.util.BlockManager;
import com.intellectualcrafters.plot.util.MainUtil;
import com.intellectualcrafters.plot.util.MathMan;
import com.intellectualcrafters.plot.util.UUIDHandler;
import com.plotsquared.general.commands.Argument;
import com.plotsquared.general.commands.CommandDeclaration;
import org.apache.commons.lang.StringUtils;
@CommandDeclaration(
command = "tp",
@ -84,7 +85,7 @@ public class TP extends SubCommand {
int index = 0;
if (a.contains(";")) {
final String[] split = a.split(";");
if ((split[1].length() > 0) && StringUtils.isNumeric(split[1])) {
if ((split[1].length() > 0) && MathMan.isInteger(split[1])) {
index = Integer.parseInt(split[1]);
}
a = split[0];

View File

@ -20,18 +20,6 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
package com.intellectualcrafters.plot.commands;
import com.intellectualcrafters.configuration.ConfigurationSection;
import com.intellectualcrafters.configuration.file.YamlConfiguration;
import com.intellectualcrafters.plot.PS;
import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.config.ConfigurationNode;
import com.intellectualcrafters.plot.object.*;
import com.intellectualcrafters.plot.util.BlockManager;
import com.intellectualcrafters.plot.util.MainUtil;
import com.intellectualcrafters.plot.util.SetupUtils;
import com.intellectualcrafters.plot.util.TaskManager;
import com.plotsquared.general.commands.CommandDeclaration;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
@ -41,6 +29,22 @@ import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
import java.util.zip.ZipOutputStream;
import com.intellectualcrafters.configuration.ConfigurationSection;
import com.intellectualcrafters.configuration.file.YamlConfiguration;
import com.intellectualcrafters.plot.PS;
import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.config.ConfigurationNode;
import com.intellectualcrafters.plot.object.FileBytes;
import com.intellectualcrafters.plot.object.PlotManager;
import com.intellectualcrafters.plot.object.PlotPlayer;
import com.intellectualcrafters.plot.object.PlotWorld;
import com.intellectualcrafters.plot.object.SetupObject;
import com.intellectualcrafters.plot.util.BlockManager;
import com.intellectualcrafters.plot.util.MainUtil;
import com.intellectualcrafters.plot.util.SetupUtils;
import com.intellectualcrafters.plot.util.TaskManager;
import com.plotsquared.general.commands.CommandDeclaration;
@CommandDeclaration(
command = "template",
permission = "plots.admin",

View File

@ -20,15 +20,6 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
package com.intellectualcrafters.plot.commands;
import com.intellectualcrafters.plot.PS;
import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.object.*;
import com.intellectualcrafters.plot.util.BlockManager;
import com.intellectualcrafters.plot.util.ChunkManager;
import com.intellectualcrafters.plot.util.MainUtil;
import com.intellectualcrafters.plot.util.TaskManager;
import com.plotsquared.general.commands.CommandDeclaration;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Path;
@ -37,6 +28,19 @@ import java.nio.file.attribute.BasicFileAttributes;
import java.util.ArrayList;
import java.util.HashSet;
import com.intellectualcrafters.plot.PS;
import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.object.ChunkLoc;
import com.intellectualcrafters.plot.object.Location;
import com.intellectualcrafters.plot.object.Plot;
import com.intellectualcrafters.plot.object.PlotId;
import com.intellectualcrafters.plot.object.PlotPlayer;
import com.intellectualcrafters.plot.util.BlockManager;
import com.intellectualcrafters.plot.util.ChunkManager;
import com.intellectualcrafters.plot.util.MainUtil;
import com.intellectualcrafters.plot.util.TaskManager;
import com.plotsquared.general.commands.CommandDeclaration;
@CommandDeclaration(
command = "trim",
permission = "plots.admin",
@ -72,7 +76,7 @@ public class Trim extends SubCommand {
final ChunkLoc loc = new ChunkLoc(x, z);
empty.add(loc);
} catch (final Exception e) {
PS.log("INVALID MCA: " + name);
PS.debug("INVALID MCA: " + name);
}
} else {
final Path path = Paths.get(file.getPath());
@ -89,7 +93,7 @@ public class Trim extends SubCommand {
final ChunkLoc loc = new ChunkLoc(x, z);
empty.add(loc);
} catch (final Exception e) {
PS.log("INVALID MCA: " + name);
PS.debug("INVALID MCA: " + name);
}
}
} catch (final Exception e) {
@ -156,7 +160,7 @@ public class Trim extends SubCommand {
}
public static void sendMessage(final String message) {
PS.log("&3PlotSquared -> World trim&8: &7" + message);
PS.debug("&3PlotSquared -> World trim&8: &7" + message);
}
public PlotId getId(final String id) {

View File

@ -20,6 +20,8 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
package com.intellectualcrafters.plot.commands;
import java.util.UUID;
import com.intellectualcrafters.plot.PS;
import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.database.DBFunc;
@ -34,8 +36,6 @@ import com.plotsquared.bukkit.util.bukkit.uuid.SQLUUIDHandler;
import com.plotsquared.general.commands.Argument;
import com.plotsquared.general.commands.CommandDeclaration;
import java.util.UUID;
@CommandDeclaration(
command = "trust",
aliases = {"t"},

View File

@ -20,6 +20,9 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
package com.intellectualcrafters.plot.commands;
import java.util.ArrayList;
import java.util.UUID;
import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.object.Location;
import com.intellectualcrafters.plot.object.Plot;
@ -31,9 +34,6 @@ import com.plotsquared.bukkit.util.bukkit.uuid.SQLUUIDHandler;
import com.plotsquared.general.commands.Argument;
import com.plotsquared.general.commands.CommandDeclaration;
import java.util.ArrayList;
import java.util.UUID;
@CommandDeclaration(
command = "undeny",
aliases = {"ud"},

View File

@ -20,6 +20,9 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
package com.intellectualcrafters.plot.commands;
import java.util.ArrayList;
import java.util.UUID;
import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.object.Location;
import com.intellectualcrafters.plot.object.Plot;
@ -30,9 +33,6 @@ import com.intellectualcrafters.plot.util.UUIDHandler;
import com.plotsquared.general.commands.Argument;
import com.plotsquared.general.commands.CommandDeclaration;
import java.util.ArrayList;
import java.util.UUID;
// UNTRUST("untrust", "ut"),
@CommandDeclaration(

View File

@ -20,15 +20,15 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
package com.intellectualcrafters.plot.commands;
import java.net.MalformedURLException;
import java.net.URL;
import com.intellectualcrafters.plot.PS;
import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.object.PlotPlayer;
import com.intellectualcrafters.plot.util.MainUtil;
import com.plotsquared.general.commands.CommandDeclaration;
import java.net.MalformedURLException;
import java.net.URL;
@CommandDeclaration(
command = "update",
permission = "plots.admin",

View File

@ -20,6 +20,10 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
package com.intellectualcrafters.plot.commands;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import com.intellectualcrafters.plot.PS;
import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.object.Plot;
@ -30,10 +34,6 @@ import com.intellectualcrafters.plot.util.UUIDHandler;
import com.plotsquared.general.commands.Argument;
import com.plotsquared.general.commands.CommandDeclaration;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
@CommandDeclaration(
command = "visit",
permission = "plots.visit",

View File

@ -20,6 +20,16 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
package com.intellectualcrafters.plot.commands;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Map.Entry;
import java.util.UUID;
import com.intellectualcrafters.plot.util.StringMan;
import org.bukkit.ChatColor;
import com.intellectualcrafters.plot.PS;
import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.config.Settings;
@ -29,17 +39,15 @@ import com.intellectualcrafters.plot.object.ConsolePlayer;
import com.intellectualcrafters.plot.object.Plot;
import com.intellectualcrafters.plot.object.PlotPlayer;
import com.intellectualcrafters.plot.object.Rating;
import com.intellectualcrafters.plot.util.*;
import com.intellectualcrafters.plot.util.EconHandler;
import com.intellectualcrafters.plot.util.MainUtil;
import com.intellectualcrafters.plot.util.Permissions;
import com.intellectualcrafters.plot.util.StringComparison;
import com.intellectualcrafters.plot.util.UUIDHandler;
import com.plotsquared.bukkit.object.BukkitPlayer;
import com.plotsquared.bukkit.util.bukkit.chat.FancyMessage;
import com.plotsquared.general.commands.CommandDeclaration;
import org.apache.commons.lang.StringUtils;
import org.bukkit.ChatColor;
import java.util.*;
import java.util.Map.Entry;
@CommandDeclaration(
command = "list",
aliases = {"l"},
@ -357,7 +365,7 @@ public class list extends SubCommand {
ChatColor.translateAlternateColorCodes('&',
C.PLOT_INFO_MEMBERS.s().replaceAll("%members%", Info.getPlayerList(plot.getMembers())))))
.color(ChatColor.GOLD);
String strFlags = StringUtils.join(plot.getSettings().flags.values(), ",");
String strFlags = StringMan.join(plot.getSettings().flags.values(), ",");
if (strFlags.length() == 0) {
strFlags = C.NONE.s();
}

View File

@ -20,17 +20,17 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
package com.intellectualcrafters.plot.commands;
import com.intellectualcrafters.plot.PS;
import com.intellectualcrafters.plot.object.PlotPlayer;
import com.intellectualcrafters.plot.util.TaskManager;
import com.plotsquared.general.commands.CommandDeclaration;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLConnection;
import java.util.ArrayList;
import com.intellectualcrafters.plot.PS;
import com.intellectualcrafters.plot.object.PlotPlayer;
import com.intellectualcrafters.plot.util.TaskManager;
import com.plotsquared.general.commands.CommandDeclaration;
@CommandDeclaration(
command = "plugin",
permission = "plots.use",