Update to new Code style
Dieser Commit ist enthalten in:
Ursprung
bdc9e44e2a
Commit
e90dda786b
@ -147,11 +147,12 @@ public class Prototype {
|
||||
int x = region.minPoint.getX() + offsetX + sizeX / 2;
|
||||
int y = region.minPoint.getY() + offsetY;
|
||||
int z = region.minPoint.getZ() + offsetZ + sizeZ / 2;
|
||||
if (schem == null)
|
||||
if (schem == null) {
|
||||
return paste(new File(schematic), x, y, z, rotate);
|
||||
else
|
||||
} else {
|
||||
return paste(schem.load(), x, y, z, rotate);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean hasProtection() {
|
||||
return protectSchematic != null;
|
||||
@ -161,11 +162,12 @@ public class Prototype {
|
||||
int x = region.minPoint.getX() + offsetX + sizeX / 2;
|
||||
int y = region.minPoint.getY() + testblock.offsetY - 1;
|
||||
int z = region.minPoint.getZ() + offsetZ + sizeZ / 2;
|
||||
if (schem == null)
|
||||
if (schem == null) {
|
||||
return paste(new File(protectSchematic), x, y, z, rotate);
|
||||
else
|
||||
} else {
|
||||
return paste(schem.load(), x, y, z, rotate);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean hasTestblock() {
|
||||
return testblock != null;
|
||||
|
@ -20,10 +20,8 @@
|
||||
package de.steamwar.bausystem.world.regions;
|
||||
|
||||
import com.sk89q.worldedit.EditSession;
|
||||
import com.sk89q.worldedit.extent.clipboard.Clipboard;
|
||||
import de.steamwar.bausystem.commands.CommandTNT.TNTMode;
|
||||
import de.steamwar.bausystem.world.SizedStack;
|
||||
import de.steamwar.core.VersionedCallable;
|
||||
import de.steamwar.sql.NoClipboardException;
|
||||
import de.steamwar.sql.Schematic;
|
||||
import org.bukkit.Bukkit;
|
||||
@ -34,7 +32,9 @@ import org.bukkit.configuration.file.YamlConfiguration;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.logging.Level;
|
||||
|
||||
@ -75,7 +75,9 @@ public class Region {
|
||||
|
||||
public static Region getRegion(Location location) {
|
||||
for (Region region : regions) {
|
||||
if (region.inRegion(location, RegionType.NORMAL, RegionExtensionType.NORMAL)) return region;
|
||||
if (region.inRegion(location, RegionType.NORMAL, RegionExtensionType.NORMAL)) {
|
||||
return region;
|
||||
}
|
||||
}
|
||||
return GlobalRegion.getInstance();
|
||||
}
|
||||
@ -230,7 +232,7 @@ public class Region {
|
||||
}
|
||||
|
||||
private void initSessions() {
|
||||
if(undosessions == null) {
|
||||
if (undosessions == null) {
|
||||
undosessions = new SizedStack<>(20);
|
||||
redosessions = new SizedStack<>(20);
|
||||
}
|
||||
@ -241,8 +243,9 @@ public class Region {
|
||||
EditSession session = null;
|
||||
try {
|
||||
session = undosessions.pop();
|
||||
if(session == null)
|
||||
if (session == null) {
|
||||
return false;
|
||||
}
|
||||
session.undo(session);
|
||||
redosessions.push(session);
|
||||
return true;
|
||||
@ -258,8 +261,9 @@ public class Region {
|
||||
EditSession session = null;
|
||||
try {
|
||||
session = redosessions.pop();
|
||||
if(session == null)
|
||||
if (session == null) {
|
||||
return false;
|
||||
}
|
||||
session.redo(session);
|
||||
undosessions.push(session);
|
||||
return true;
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren