Upstream changes, prefix changes, formatting changes, variable name changes

I think that draining waterlogged items also works now?
This commit is contained in:
MattBDev
2019-06-12 17:12:12 -04:00
parent e6a433ec93
commit 1f14d4652e
40 changed files with 587 additions and 684 deletions

View File

@ -124,17 +124,16 @@ public class ClipboardFormats {
return null;
}
/**
* Detect the format using the given extension
* @param string
* the extension
* @param extension the extension
* @return the format, otherwise null if one cannot be detected
*/
@Nullable
public static ClipboardFormat findByExtension(String extension) {
checkNotNull(extension);
Collection<Entry<String, ClipboardFormat>> entries = getFileExtensionMap().entries();
for(Map.Entry<String, ClipboardFormat> entry : entries) {
if(entry.getKey().equalsIgnoreCase(extension)) {
@ -142,7 +141,7 @@ public class ClipboardFormats {
}
}
return null;
}
/**
@ -210,7 +209,7 @@ public class ClipboardFormats {
}
f = player.openFileOpenDialog(extensions);
if (f == null || !f.exists()) {
if (message) player.printError(BBC.getPrefix() + "Schematic " + input + " does not exist! (" + f + ")");
if (message) player.printError("Schematic " + input + " does not exist! (" + f + ")");
return null;
}
} else {
@ -231,7 +230,7 @@ public class ClipboardFormats {
}
}
if (f == null || !f.exists() || !MainUtil.isInSubDirectory(working, f)) {
if (message) player.printError(BBC.getPrefix() + "Schematic " + input + " does not exist! (" + ((f == null) ? false : f.exists()) + "|" + f + "|" + (f == null ? false : !MainUtil.isInSubDirectory(working, f)) + ")");
if (message) player.printError("Schematic " + input + " does not exist! (" + ((f == null) ? false : f.exists()) + "|" + f + "|" + (f == null ? false : !MainUtil.isInSubDirectory(working, f)) + ")");
return null;
}
if (format == null && f.isFile()) {