mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-06 04:46:40 +00:00
Update from sk89q/master
This commit is contained in:
@ -27,13 +27,11 @@ import com.sk89q.worldedit.world.block.BlockState;
|
||||
import com.sk89q.worldedit.blocks.BaseItem;
|
||||
import com.sk89q.worldedit.blocks.BaseItemStack;
|
||||
import com.sk89q.worldedit.extension.platform.Platform;
|
||||
import com.sk89q.worldedit.function.mask.BlockMask;
|
||||
import com.sk89q.worldedit.function.mask.BlockTypeMask;
|
||||
import com.sk89q.worldedit.function.mask.Mask;
|
||||
import com.sk89q.worldedit.function.operation.Operation;
|
||||
import com.sk89q.worldedit.util.Direction;
|
||||
import com.sk89q.worldedit.world.block.BlockStateHolder;
|
||||
import com.sk89q.worldedit.world.block.BlockState;
|
||||
import com.sk89q.worldedit.world.block.BlockType;
|
||||
import com.sk89q.worldedit.world.block.BlockTypes;
|
||||
|
||||
|
@ -193,7 +193,7 @@ public class Snapshot implements Comparable<Snapshot> {
|
||||
public int compareTo(Snapshot o) {
|
||||
if (o.date == null || date == null) {
|
||||
// Remove the folder from the name
|
||||
int i = name.indexOf("/"), j = o.name.indexOf("/");
|
||||
int i = name.indexOf('/'), j = o.name.indexOf('/');
|
||||
return name.substring((i > 0 ? 0 : i)).compareTo(o.name.substring((j > 0 ? 0 : j)));
|
||||
} else {
|
||||
return date.compareTo(o.date);
|
||||
|
@ -35,6 +35,6 @@ public interface SnapshotDateParser {
|
||||
* @return date or null
|
||||
*/
|
||||
@Nullable
|
||||
public Calendar detectDate(File file);
|
||||
Calendar detectDate(File file);
|
||||
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ public class TrueZipLegacyChunkStore extends LegacyChunkStore {
|
||||
|
||||
// Detect subfolder for the world's files
|
||||
if (folder != null) {
|
||||
if (!folder.equals("")) {
|
||||
if (!folder.isEmpty()) {
|
||||
file = folder + "/" + file;
|
||||
}
|
||||
} else {
|
||||
|
@ -87,7 +87,7 @@ public class TrueZipMcRegionChunkStore extends McRegionChunkStore {
|
||||
protected InputStream getInputStream(String name, String worldName) throws IOException, DataException {
|
||||
// Detect subfolder for the world's files
|
||||
if (folder != null) {
|
||||
if (!folder.equals("")) {
|
||||
if (!folder.isEmpty()) {
|
||||
name = folder + "/" + name;
|
||||
}
|
||||
} else {
|
||||
@ -100,7 +100,7 @@ public class TrueZipMcRegionChunkStore extends McRegionChunkStore {
|
||||
if (worldPattern.matcher(worldName).matches()) {
|
||||
// Check for file
|
||||
if (pattern.matcher(testEntry.getName()).matches()) {
|
||||
folder = testEntry.getName().substring(0, testEntry.getName().lastIndexOf("/"));
|
||||
folder = testEntry.getName().substring(0, testEntry.getName().lastIndexOf('/'));
|
||||
name = folder + "/" + name;
|
||||
break;
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ public class ZippedLegacyChunkStore extends LegacyChunkStore {
|
||||
|
||||
// Detect subfolder for the world's files
|
||||
if (folder != null) {
|
||||
if (!folder.equals("")) {
|
||||
if (!folder.isEmpty()) {
|
||||
file = folder + "/" + file;
|
||||
}
|
||||
} else {
|
||||
|
@ -76,7 +76,7 @@ public class ZippedMcRegionChunkStore extends McRegionChunkStore {
|
||||
protected InputStream getInputStream(String name, String worldName) throws IOException, DataException {
|
||||
// Detect subfolder for the world's files
|
||||
if (folder != null) {
|
||||
if (!folder.equals("")) {
|
||||
if (!folder.isEmpty()) {
|
||||
name = folder + "/" + name;
|
||||
}
|
||||
} else {
|
||||
@ -86,7 +86,7 @@ public class ZippedMcRegionChunkStore extends McRegionChunkStore {
|
||||
// Check for world
|
||||
if (testEntry.getName().startsWith(worldName + "/")) {
|
||||
if (pattern.matcher(testEntry.getName()).matches()) { // does entry end in .mca
|
||||
folder = testEntry.getName().substring(0, testEntry.getName().lastIndexOf("/"));
|
||||
folder = testEntry.getName().substring(0, testEntry.getName().lastIndexOf('/'));
|
||||
name = folder + "/" + name;
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user