mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 13:16:45 +01:00
Remove debug
This commit is contained in:
parent
483be4e2f0
commit
c659ec075f
@ -640,10 +640,19 @@ public class PS {
|
||||
log("&c[ERROR] World '" + world + "' in settings.yml is not using PlotSquared generator! Please set the generator correctly or delete the world from the 'settings.yml'!");
|
||||
return;
|
||||
}
|
||||
|
||||
log(C.PREFIX.s() + "&aDetected world load for '" + world + "'");
|
||||
log(C.PREFIX.s() + "&3 - generator: &7" + gen_class.getClass().getName());
|
||||
log(C.PREFIX.s() + "&3 - plotworld: &7" + plotWorld.getClass().getName());
|
||||
log(C.PREFIX.s() + "&3 - manager: &7" + plotManager.getClass().getName());
|
||||
log(C.PREFIX.s() + "&3 - | terrain: &7" + plotWorld.TERRAIN);
|
||||
log(C.PREFIX.s() + "&3 - | type: &7" + plotWorld.TYPE);
|
||||
|
||||
addPlotWorld(world, plotWorld, plotManager);
|
||||
if (plotWorld.TYPE == 2) {
|
||||
if (ClusterManager.getClusters(world).size() > 0) {
|
||||
for (final PlotCluster cluster : ClusterManager.getClusters(world)) {
|
||||
log(C.PREFIX.s() + "&3 - &7| cluster: " + cluster);
|
||||
new AugmentedPopulator(world, gen_class, cluster, plotWorld.TERRAIN == 2, plotWorld.TERRAIN != 2);
|
||||
}
|
||||
}
|
||||
|
@ -74,9 +74,7 @@ public class Info extends SubCommand {
|
||||
plot = MainUtil.getPlotFromString(player, null, player == null);
|
||||
break;
|
||||
default:
|
||||
System.out.print("CHECKING: " + arg);
|
||||
plot = MainUtil.getPlotFromString(player, arg, player == null);
|
||||
System.out.print(plot);
|
||||
if (args.length == 2) {
|
||||
arg = args[1];
|
||||
}
|
||||
@ -124,13 +122,6 @@ public class Info extends SubCommand {
|
||||
MainUtil.sendMessage(player, C.PLOT_INFO_UNCLAIMED, (plot.id.x + ";" + plot.id.y));
|
||||
return true;
|
||||
}
|
||||
String owner = "none";
|
||||
if (plot.owner == null) {
|
||||
owner = "unowned";
|
||||
}
|
||||
else {
|
||||
owner = getPlayerList(plot.getOwners());
|
||||
}
|
||||
String info = C.PLOT_INFO.s();
|
||||
if (arg != null) {
|
||||
info = getCaption(arg);
|
||||
@ -207,7 +198,6 @@ public class Info extends SubCommand {
|
||||
info = info.replaceAll("%flags%", Matcher.quoteReplacement(flags));
|
||||
info = info.replaceAll("%build%", build + "");
|
||||
info = info.replaceAll("%desc%", "No description set.");
|
||||
|
||||
if (info.contains("%rating%")) {
|
||||
final String newInfo = info;
|
||||
TaskManager.runTaskAsync(new Runnable() {
|
||||
|
@ -404,6 +404,9 @@ public class DBFunc {
|
||||
}
|
||||
|
||||
public static HashMap<UUID, Integer> getRatings(final Plot plot) {
|
||||
if (plot.temp) {
|
||||
return new HashMap<>();
|
||||
}
|
||||
return dbManager.getRatings(plot);
|
||||
}
|
||||
|
||||
|
@ -849,7 +849,6 @@ public class SQLManager implements AbstractDB {
|
||||
p = new Plot(plot_id, user, new ArrayList<UUID>(), new ArrayList<UUID>(), new ArrayList<UUID>(), "", null, null, worldname, new boolean[]{false, false, false, false});
|
||||
plots.put(id, p);
|
||||
}
|
||||
|
||||
if (Settings.CACHE_RATINGS) {
|
||||
r = stmt.executeQuery("SELECT `plot_plot_id`, `player`, `rating` FROM `" + this.prefix + "plot_rating`");
|
||||
while (r.next()) {
|
||||
@ -871,7 +870,7 @@ public class SQLManager implements AbstractDB {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Getting helpers
|
||||
*/
|
||||
@ -891,6 +890,7 @@ public class SQLManager implements AbstractDB {
|
||||
PS.log("&cPLOT " + id + " in plot_helpers does not exist. Please create the plot or remove this entry.");
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Getting trusted
|
||||
*/
|
||||
@ -910,6 +910,7 @@ public class SQLManager implements AbstractDB {
|
||||
PS.log("&cPLOT " + id + " in plot_trusted does not exist. Please create the plot or remove this entry.");
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Getting denied
|
||||
*/
|
||||
@ -929,6 +930,7 @@ public class SQLManager implements AbstractDB {
|
||||
PS.log("&cPLOT " + id + " in plot_denied does not exist. Please create the plot or remove this entry.");
|
||||
}
|
||||
}
|
||||
|
||||
r = stmt.executeQuery("SELECT * FROM `" + this.prefix + "plot_settings`");
|
||||
while (r.next()) {
|
||||
id = r.getInt("plot_plot_id");
|
||||
@ -1018,6 +1020,7 @@ public class SQLManager implements AbstractDB {
|
||||
PS.log("&cPLOT " + id + " in plot_settings does not exist. Please create the plot or remove this entry.");
|
||||
}
|
||||
}
|
||||
|
||||
stmt.close();
|
||||
r.close();
|
||||
if (plots.keySet().size() > 0) {
|
||||
|
@ -67,7 +67,6 @@ public class MainUtil {
|
||||
if (arg == null) {
|
||||
if (player == null) {
|
||||
if (message) MainUtil.sendMessage(player, C.NOT_VALID_PLOT_WORLD);
|
||||
System.out.print(1);
|
||||
return null;
|
||||
}
|
||||
return getPlot(player.getLocation());
|
||||
@ -77,10 +76,7 @@ public class MainUtil {
|
||||
if (player != null) {
|
||||
worldname = player.getLocation().getWorld();
|
||||
}
|
||||
System.out.print(arg);
|
||||
String[] split = arg.split(";|,");
|
||||
System.out.print(split[0]);
|
||||
System.out.print(split[1]);
|
||||
if (split.length == 3) {
|
||||
worldname = split[0];
|
||||
id = PlotId.fromString(split[1] + ";" + split[2]);
|
||||
@ -115,15 +111,12 @@ public class MainUtil {
|
||||
}
|
||||
if (worldname == null || !PS.get().isPlotWorld(worldname)) {
|
||||
if (message) MainUtil.sendMessage(player, C.NOT_VALID_PLOT_WORLD);
|
||||
System.out.print("INVALID WORLD: ");
|
||||
return null;
|
||||
}
|
||||
if (id == null) {
|
||||
System.out.print("INVALID ID: ");
|
||||
if (message) MainUtil.sendMessage(player, C.NOT_VALID_PLOT_ID);
|
||||
return null;
|
||||
}
|
||||
System.out.print("VALID PLOT: ");
|
||||
return getPlot(worldname, id);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user