forked from SteamWar/SteamWar
Format code
This commit is contained in:
@@ -105,8 +105,7 @@ public class AutoChecker {
|
||||
}
|
||||
|
||||
List<CompoundTag> items = nbt.getList("Items", CompoundTag.class);
|
||||
if (items.isEmpty())
|
||||
return; // Leeres Inventar
|
||||
if (items.isEmpty()) return; // Leeres Inventar
|
||||
|
||||
int counter = 0;
|
||||
int windChargeCount = 0;
|
||||
|
||||
@@ -117,12 +117,15 @@ public class AutoCheckerResult {
|
||||
|
||||
public void sendErrorMessage(Player p, String schemName) {
|
||||
SchematicSystem.MESSAGE.sendPrefixless("AUTO_CHECKER_RESULT_HEADER", p, schemName);
|
||||
if (isTooWide())
|
||||
if (isTooWide()) {
|
||||
SchematicSystem.MESSAGE.sendPrefixless("AUTO_CHECKER_RESULT_WIDTH", p, width, type.Schematic.Size.x);
|
||||
if (isTooHigh())
|
||||
}
|
||||
if (isTooHigh()) {
|
||||
SchematicSystem.MESSAGE.sendPrefixless("AUTO_CHECKER_RESULT_HEIGHT", p, height, type.Schematic.Size.y);
|
||||
if (isTooDeep())
|
||||
}
|
||||
if (isTooDeep()) {
|
||||
SchematicSystem.MESSAGE.sendPrefixless("AUTO_CHECKER_RESULT_LENGTH", p, depth, type.Schematic.Size.z);
|
||||
}
|
||||
if (type.Schematic.MaxBlocks != 0 && !isBlockCountOk()) {
|
||||
SchematicSystem.MESSAGE.sendPrefixless("AUTO_CHECKER_RESULT_BLOCKS", p, blockScanResult.getBlockCounts().values().stream().reduce(Integer::sum).orElse(0), type.Schematic.MaxBlocks);
|
||||
}
|
||||
|
||||
@@ -297,8 +297,7 @@ public class GUI {
|
||||
SWInventory inv = new SWInventory(p, 9, SchematicSystem.MESSAGE.parse("GUI_DELETE_MEMBER_TITLE", p, schem.generateBreadcrumbs(user)));
|
||||
inv.setItem(0, Material.RED_DYE, (byte) 1, SchematicSystem.MESSAGE.parse("CONFIRM", p), click -> {
|
||||
NodeMember member = NodeMember.getNodeMember(schem.getId(), user.getId());
|
||||
if (member != null)
|
||||
member.delete();
|
||||
if (member != null) member.delete();
|
||||
SchematicSystem.MESSAGE.send("GUI_DELETE_MEMBER_DONE", p, schem.generateBreadcrumbs(user));
|
||||
if (back != null) {
|
||||
if (schem.isDir()) {
|
||||
@@ -314,10 +313,11 @@ public class GUI {
|
||||
}
|
||||
|
||||
static void delete(Player p, SchematicNode schem, SchematicSelector back) {
|
||||
if (SteamwarUser.get(p.getUniqueId()).getId() == schem.getOwner())
|
||||
if (SteamwarUser.get(p.getUniqueId()).getId() == schem.getOwner()) {
|
||||
deleteOwn(p, schem, back);
|
||||
else
|
||||
} else {
|
||||
deleteMembership(p, schem, back);
|
||||
}
|
||||
}
|
||||
|
||||
static void delmembers(Player p, SchematicNode schem) {
|
||||
|
||||
+2
-4
@@ -100,14 +100,12 @@ public class SavePart extends SWCommand {
|
||||
SchematicData.saveFromPlayer(player, node);
|
||||
} catch (NoClipboardException e) {
|
||||
SchematicSystem.MESSAGE.send("COMMAND_SAVE_CLIPBOARD_EMPTY", player);
|
||||
if (newSchem)
|
||||
node.delete();
|
||||
if (newSchem) node.delete();
|
||||
return;
|
||||
} catch (Exception ex) {
|
||||
Bukkit.getLogger().log(Level.SEVERE, "Could not save schematic", ex);
|
||||
SchematicSystem.MESSAGE.send("COMMAND_SAVE_ERROR", player);
|
||||
if (newSchem)
|
||||
node.delete();
|
||||
if (newSchem) node.delete();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user