mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 21:26:45 +01:00
Reformat
This commit is contained in:
parent
6711788dd0
commit
d6a801d854
File diff suppressed because one or more lines are too long
@ -87,7 +87,7 @@ import java.util.UUID;
|
||||
PlotId pos1;
|
||||
PlotId pos2;
|
||||
// check pos1 / pos2
|
||||
try{
|
||||
try {
|
||||
pos1 = PlotId.fromString(args[2]);
|
||||
pos2 = PlotId.fromString(args[3]);
|
||||
} catch (IllegalArgumentException ignored) {
|
||||
@ -215,7 +215,7 @@ import java.util.UUID;
|
||||
PlotId pos1;
|
||||
PlotId pos2;
|
||||
// check pos1 / pos2
|
||||
try{
|
||||
try {
|
||||
pos1 = PlotId.fromString(args[2]);
|
||||
pos2 = PlotId.fromString(args[3]);
|
||||
} catch (IllegalArgumentException ignored) {
|
||||
|
@ -39,8 +39,8 @@ import java.util.Map.Entry;
|
||||
manager.close();
|
||||
});
|
||||
} catch (Exception e) {
|
||||
MainUtil.sendMessage(player,
|
||||
"Failed to insert plot objects, see stacktrace for info");
|
||||
MainUtil
|
||||
.sendMessage(player, "Failed to insert plot objects, see stacktrace for info");
|
||||
e.printStackTrace();
|
||||
}
|
||||
});
|
||||
|
@ -557,20 +557,18 @@ import java.util.concurrent.atomic.AtomicInteger;
|
||||
@Override public void run() {
|
||||
createTiers(trusted, "trusted", new Runnable() {
|
||||
@Override public void run() {
|
||||
createTiers(denied, "denied",
|
||||
new Runnable() {
|
||||
@Override public void run() {
|
||||
try {
|
||||
SQLManager.this.connection
|
||||
.commit();
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (whenDone != null) {
|
||||
whenDone.run();
|
||||
}
|
||||
createTiers(denied, "denied", new Runnable() {
|
||||
@Override public void run() {
|
||||
try {
|
||||
SQLManager.this.connection.commit();
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
});
|
||||
if (whenDone != null) {
|
||||
whenDone.run();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -2091,8 +2089,7 @@ import java.util.concurrent.atomic.AtomicInteger;
|
||||
try (ResultSet r = stmt.executeQuery()) {
|
||||
ids = new HashSet<>();
|
||||
while (r.next()) {
|
||||
PlotId plot_id =
|
||||
new PlotId(r.getInt("plot_id_x"), r.getInt("plot_id_z"));
|
||||
PlotId plot_id = new PlotId(r.getInt("plot_id_x"), r.getInt("plot_id_z"));
|
||||
if (plots.contains(plot_id)) {
|
||||
ids.add(r.getInt("id"));
|
||||
}
|
||||
@ -2562,7 +2559,8 @@ import java.util.concurrent.atomic.AtomicInteger;
|
||||
}
|
||||
cluster = new PlotCluster(null, pos1, pos2, user, id);
|
||||
clusters.put(id, cluster);
|
||||
Set<PlotCluster> set = newClusters.computeIfAbsent(areaid, k -> new HashSet<>());
|
||||
Set<PlotCluster> set =
|
||||
newClusters.computeIfAbsent(areaid, k -> new HashSet<>());
|
||||
set.add(cluster);
|
||||
}
|
||||
//Getting helpers
|
||||
@ -3039,17 +3037,17 @@ import java.util.concurrent.atomic.AtomicInteger;
|
||||
"UPDATE `" + SQLManager.this.prefix + "cluster_invited` SET `user_uuid` = '"
|
||||
+ now.toString() + "' WHERE `user_uuid` = '" + old.toString() + '\'');
|
||||
stmt.executeUpdate(
|
||||
"UPDATE `" + SQLManager.this.prefix + "plot` SET `owner` = '" + now
|
||||
.toString() + "' WHERE `owner` = '" + old.toString() + '\'');
|
||||
"UPDATE `" + SQLManager.this.prefix + "plot` SET `owner` = '" + now.toString()
|
||||
+ "' WHERE `owner` = '" + old.toString() + '\'');
|
||||
stmt.executeUpdate(
|
||||
"UPDATE `" + SQLManager.this.prefix + "plot_denied` SET `user_uuid` = '"
|
||||
+ now.toString() + "' WHERE `user_uuid` = '" + old.toString() + '\'');
|
||||
"UPDATE `" + SQLManager.this.prefix + "plot_denied` SET `user_uuid` = '" + now
|
||||
.toString() + "' WHERE `user_uuid` = '" + old.toString() + '\'');
|
||||
stmt.executeUpdate(
|
||||
"UPDATE `" + SQLManager.this.prefix + "plot_helpers` SET `user_uuid` = '"
|
||||
+ now.toString() + "' WHERE `user_uuid` = '" + old.toString() + '\'');
|
||||
"UPDATE `" + SQLManager.this.prefix + "plot_helpers` SET `user_uuid` = '" + now
|
||||
.toString() + "' WHERE `user_uuid` = '" + old.toString() + '\'');
|
||||
stmt.executeUpdate(
|
||||
"UPDATE `" + SQLManager.this.prefix + "plot_trusted` SET `user_uuid` = '"
|
||||
+ now.toString() + "' WHERE `user_uuid` = '" + old.toString() + '\'');
|
||||
"UPDATE `" + SQLManager.this.prefix + "plot_trusted` SET `user_uuid` = '" + now
|
||||
.toString() + "' WHERE `user_uuid` = '" + old.toString() + '\'');
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
@ -2,7 +2,10 @@ package com.github.intellectualsites.plotsquared.plot.flag;
|
||||
|
||||
import com.github.intellectualsites.plotsquared.plot.PlotSquared;
|
||||
import com.github.intellectualsites.plotsquared.plot.database.DBFunc;
|
||||
import com.github.intellectualsites.plotsquared.plot.object.*;
|
||||
import com.github.intellectualsites.plotsquared.plot.object.Plot;
|
||||
import com.github.intellectualsites.plotsquared.plot.object.PlotArea;
|
||||
import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer;
|
||||
import com.github.intellectualsites.plotsquared.plot.object.PlotSettings;
|
||||
import com.github.intellectualsites.plotsquared.plot.util.EventUtil;
|
||||
import com.github.intellectualsites.plotsquared.plot.util.Permissions;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
|
@ -1523,9 +1523,9 @@ public class Plot {
|
||||
}
|
||||
|
||||
//TODO Better documentation needed.
|
||||
|
||||
/**
|
||||
* Return the bottom location for the plot.
|
||||
*
|
||||
*/
|
||||
public Location getBottomAbs() {
|
||||
Location loc = this.area.getPlotManager().getPlotBottomLocAbs(this.area, this.id);
|
||||
|
@ -12,12 +12,14 @@ public class PlotInventory {
|
||||
private final PlotItemStack[] items;
|
||||
private String title;
|
||||
private boolean open = false;
|
||||
|
||||
public PlotInventory(PlotPlayer player) {
|
||||
this.size = 4;
|
||||
this.title = null;
|
||||
this.player = player;
|
||||
this.items = InventoryUtil.manager.getItems(player);
|
||||
}
|
||||
|
||||
public PlotInventory(PlotPlayer player, int size, String name) {
|
||||
this.size = size;
|
||||
this.title = name == null ? "" : name;
|
||||
|
@ -101,19 +101,19 @@ public class ExpireManager {
|
||||
pp.setMeta("ignoreExpireTask", true);
|
||||
pp.teleport(current.getCenter());
|
||||
pp.deleteMeta("ignoreExpireTask");
|
||||
PlotMessage msg = new PlotMessage().text(
|
||||
num + " " + (num > 1 ? "plots are" : "plot is") + " expired: ")
|
||||
PlotMessage msg = new PlotMessage()
|
||||
.text(num + " " + (num > 1 ? "plots are" : "plot is") + " expired: ")
|
||||
.color("$1").text(current.toString()).color("$2")
|
||||
.suggest("/plot list expired").tooltip("/plot list expired")
|
||||
//.text("\n - ").color("$3").text("Delete all (/plot delete expired)").color("$2").command("/plot delete expired")
|
||||
.text("\n - ").color("$3").text("Delete this (/plot delete)")
|
||||
.color("$2").suggest("/plot delete").tooltip("/plot delete")
|
||||
.text("\n - ").color("$3").text("Remind later (/plot set keep 1d)")
|
||||
.color("$2").suggest("/plot set keep 1d")
|
||||
.tooltip("/plot set keep 1d").text("\n - ").color("$3")
|
||||
.text("Keep this (/plot set keep true)").color("$2")
|
||||
.suggest("/plot set keep true").tooltip("/plot set keep true")
|
||||
.text("\n - ").color("$3").text("Don't show me this").color("$2")
|
||||
.color("$2").suggest("/plot set keep 1d").tooltip("/plot set keep 1d")
|
||||
.text("\n - ").color("$3").text("Keep this (/plot set keep true)")
|
||||
.color("$2").suggest("/plot set keep true")
|
||||
.tooltip("/plot set keep true").text("\n - ").color("$3")
|
||||
.text("Don't show me this").color("$2")
|
||||
.suggest("/plot toggle clear-confirmation")
|
||||
.tooltip("/plot toggle clear-confirmation");
|
||||
msg.send(pp);
|
||||
@ -271,7 +271,8 @@ public class ExpireManager {
|
||||
}
|
||||
for (ExpiryTask expiryTask : expired) {
|
||||
if (!expiryTask.needsAnalysis()) {
|
||||
expiredTask.run(newPlot, () -> TaskManager.IMP.taskLaterAsync(task, 1), expiryTask.requiresConfirmation());
|
||||
expiredTask.run(newPlot, () -> TaskManager.IMP.taskLaterAsync(task, 1),
|
||||
expiryTask.requiresConfirmation());
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -281,7 +282,8 @@ public class ExpireManager {
|
||||
passesComplexity(changed, expired, new RunnableVal<Boolean>() {
|
||||
@Override public void run(Boolean confirmation) {
|
||||
expiredTask.run(newPlot,
|
||||
() -> TaskManager.IMP.taskLaterAsync(task, 1), confirmation);
|
||||
() -> TaskManager.IMP.taskLaterAsync(task, 1),
|
||||
confirmation);
|
||||
}
|
||||
}, () -> {
|
||||
FlagManager
|
||||
|
Loading…
Reference in New Issue
Block a user