3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-11-17 00:20:09 +01:00

fix: add some file-extension bounds to schematic loading

Dieser Commit ist enthalten in:
dordsor21 2024-07-17 20:41:28 +01:00
Ursprung b2f36facd8
Commit bf07548695
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 1E53E88969FFCF0B

Datei anzeigen

@ -112,6 +112,15 @@ public enum BuiltInClipboardFormat implements ClipboardFormat {
return false;
}
@Override
public boolean isFormat(File file) {
String name = file.getName().toLowerCase(Locale.ROOT);
if (name.endsWith(".schematic") || name.endsWith(".mcedit") || name.endsWith(".mce")) {
return false;
}
return super.isFormat(file);
}
@Override
public String getPrimaryFileExtension() {
return "schem";
@ -151,6 +160,15 @@ public enum BuiltInClipboardFormat implements ClipboardFormat {
return detectOldSpongeSchematic(inputStream, FastSchematicWriterV2.CURRENT_VERSION);
}
@Override
public boolean isFormat(File file) {
String name = file.getName().toLowerCase(Locale.ROOT);
if (name.endsWith(".schematic") || name.endsWith(".mcedit") || name.endsWith(".mce")) {
return false;
}
return super.isFormat(file);
}
},
//FAWE end
@ -177,6 +195,15 @@ public enum BuiltInClipboardFormat implements ClipboardFormat {
//FAWE end
}
@Override
public boolean isFormat(File file) {
String name = file.getName().toLowerCase(Locale.ROOT);
if (!name.endsWith(".schematic") && !name.endsWith(".mcedit") && !name.endsWith(".mce")) {
return false;
}
return super.isFormat(file);
}
@Override
public boolean isFormat(InputStream inputStream) {
LinRootEntry rootEntry;