mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 23:26: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'!");
|
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;
|
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);
|
addPlotWorld(world, plotWorld, plotManager);
|
||||||
if (plotWorld.TYPE == 2) {
|
if (plotWorld.TYPE == 2) {
|
||||||
if (ClusterManager.getClusters(world).size() > 0) {
|
if (ClusterManager.getClusters(world).size() > 0) {
|
||||||
for (final PlotCluster cluster : ClusterManager.getClusters(world)) {
|
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);
|
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);
|
plot = MainUtil.getPlotFromString(player, null, player == null);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
System.out.print("CHECKING: " + arg);
|
|
||||||
plot = MainUtil.getPlotFromString(player, arg, player == null);
|
plot = MainUtil.getPlotFromString(player, arg, player == null);
|
||||||
System.out.print(plot);
|
|
||||||
if (args.length == 2) {
|
if (args.length == 2) {
|
||||||
arg = args[1];
|
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));
|
MainUtil.sendMessage(player, C.PLOT_INFO_UNCLAIMED, (plot.id.x + ";" + plot.id.y));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
String owner = "none";
|
|
||||||
if (plot.owner == null) {
|
|
||||||
owner = "unowned";
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
owner = getPlayerList(plot.getOwners());
|
|
||||||
}
|
|
||||||
String info = C.PLOT_INFO.s();
|
String info = C.PLOT_INFO.s();
|
||||||
if (arg != null) {
|
if (arg != null) {
|
||||||
info = getCaption(arg);
|
info = getCaption(arg);
|
||||||
@ -207,7 +198,6 @@ public class Info extends SubCommand {
|
|||||||
info = info.replaceAll("%flags%", Matcher.quoteReplacement(flags));
|
info = info.replaceAll("%flags%", Matcher.quoteReplacement(flags));
|
||||||
info = info.replaceAll("%build%", build + "");
|
info = info.replaceAll("%build%", build + "");
|
||||||
info = info.replaceAll("%desc%", "No description set.");
|
info = info.replaceAll("%desc%", "No description set.");
|
||||||
|
|
||||||
if (info.contains("%rating%")) {
|
if (info.contains("%rating%")) {
|
||||||
final String newInfo = info;
|
final String newInfo = info;
|
||||||
TaskManager.runTaskAsync(new Runnable() {
|
TaskManager.runTaskAsync(new Runnable() {
|
||||||
|
@ -404,6 +404,9 @@ public class DBFunc {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static HashMap<UUID, Integer> getRatings(final Plot plot) {
|
public static HashMap<UUID, Integer> getRatings(final Plot plot) {
|
||||||
|
if (plot.temp) {
|
||||||
|
return new HashMap<>();
|
||||||
|
}
|
||||||
return dbManager.getRatings(plot);
|
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});
|
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);
|
plots.put(id, p);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Settings.CACHE_RATINGS) {
|
if (Settings.CACHE_RATINGS) {
|
||||||
r = stmt.executeQuery("SELECT `plot_plot_id`, `player`, `rating` FROM `" + this.prefix + "plot_rating`");
|
r = stmt.executeQuery("SELECT `plot_plot_id`, `player`, `rating` FROM `" + this.prefix + "plot_rating`");
|
||||||
while (r.next()) {
|
while (r.next()) {
|
||||||
@ -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.");
|
PS.log("&cPLOT " + id + " in plot_helpers does not exist. Please create the plot or remove this entry.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Getting trusted
|
* 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.");
|
PS.log("&cPLOT " + id + " in plot_trusted does not exist. Please create the plot or remove this entry.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Getting denied
|
* 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.");
|
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`");
|
r = stmt.executeQuery("SELECT * FROM `" + this.prefix + "plot_settings`");
|
||||||
while (r.next()) {
|
while (r.next()) {
|
||||||
id = r.getInt("plot_plot_id");
|
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.");
|
PS.log("&cPLOT " + id + " in plot_settings does not exist. Please create the plot or remove this entry.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stmt.close();
|
stmt.close();
|
||||||
r.close();
|
r.close();
|
||||||
if (plots.keySet().size() > 0) {
|
if (plots.keySet().size() > 0) {
|
||||||
|
@ -67,7 +67,6 @@ public class MainUtil {
|
|||||||
if (arg == null) {
|
if (arg == null) {
|
||||||
if (player == null) {
|
if (player == null) {
|
||||||
if (message) MainUtil.sendMessage(player, C.NOT_VALID_PLOT_WORLD);
|
if (message) MainUtil.sendMessage(player, C.NOT_VALID_PLOT_WORLD);
|
||||||
System.out.print(1);
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return getPlot(player.getLocation());
|
return getPlot(player.getLocation());
|
||||||
@ -77,10 +76,7 @@ public class MainUtil {
|
|||||||
if (player != null) {
|
if (player != null) {
|
||||||
worldname = player.getLocation().getWorld();
|
worldname = player.getLocation().getWorld();
|
||||||
}
|
}
|
||||||
System.out.print(arg);
|
|
||||||
String[] split = arg.split(";|,");
|
String[] split = arg.split(";|,");
|
||||||
System.out.print(split[0]);
|
|
||||||
System.out.print(split[1]);
|
|
||||||
if (split.length == 3) {
|
if (split.length == 3) {
|
||||||
worldname = split[0];
|
worldname = split[0];
|
||||||
id = PlotId.fromString(split[1] + ";" + split[2]);
|
id = PlotId.fromString(split[1] + ";" + split[2]);
|
||||||
@ -115,15 +111,12 @@ public class MainUtil {
|
|||||||
}
|
}
|
||||||
if (worldname == null || !PS.get().isPlotWorld(worldname)) {
|
if (worldname == null || !PS.get().isPlotWorld(worldname)) {
|
||||||
if (message) MainUtil.sendMessage(player, C.NOT_VALID_PLOT_WORLD);
|
if (message) MainUtil.sendMessage(player, C.NOT_VALID_PLOT_WORLD);
|
||||||
System.out.print("INVALID WORLD: ");
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (id == null) {
|
if (id == null) {
|
||||||
System.out.print("INVALID ID: ");
|
|
||||||
if (message) MainUtil.sendMessage(player, C.NOT_VALID_PLOT_ID);
|
if (message) MainUtil.sendMessage(player, C.NOT_VALID_PLOT_ID);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
System.out.print("VALID PLOT: ");
|
|
||||||
return getPlot(worldname, id);
|
return getPlot(worldname, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user