mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-11 20:13:55 +00:00
Clean up other compiler warnings
This commit is contained in:
@ -97,7 +97,7 @@ public class ListTagBuilder {
|
||||
*
|
||||
* @return a new builder
|
||||
*/
|
||||
public static <T extends Tag> ListTagBuilder createWith(T ... entries) {
|
||||
public static ListTagBuilder createWith(Tag... entries) {
|
||||
checkNotNull(entries);
|
||||
|
||||
if (entries.length == 0) {
|
||||
|
@ -85,7 +85,7 @@ public final class FileDialogUtil {
|
||||
if (index == -1 || index == path.length() - 1) {
|
||||
return false;
|
||||
} else {
|
||||
return exts.contains(path.indexOf(index + 1));
|
||||
return exts.contains(path.substring(index + 1));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -133,9 +133,10 @@ public class Snapshot implements Comparable<Snapshot> {
|
||||
public boolean containsWorld(String worldname) {
|
||||
try {
|
||||
if (file.getName().toLowerCase().endsWith(".zip")) {
|
||||
ZipFile entry = new ZipFile(file);
|
||||
return (entry.getEntry(worldname) != null
|
||||
|| entry.getEntry(worldname + "/level.dat") != null);
|
||||
try (ZipFile entry = new ZipFile(file)) {
|
||||
return (entry.getEntry(worldname) != null
|
||||
|| entry.getEntry(worldname + "/level.dat") != null);
|
||||
}
|
||||
} else if (file.getName().toLowerCase().endsWith(".tar.bz2")
|
||||
|| file.getName().toLowerCase().endsWith(".tar.gz")
|
||||
|| file.getName().toLowerCase().endsWith(".tar")) {
|
||||
|
Reference in New Issue
Block a user