Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-12-26 19:02:36 +01:00
fix: add some file-extension bounds to schematic loading
Dieser Commit ist enthalten in:
Ursprung
b2f36facd8
Commit
bf07548695
@ -112,6 +112,15 @@ public enum BuiltInClipboardFormat implements ClipboardFormat {
|
|||||||
return false;
|
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
|
@Override
|
||||||
public String getPrimaryFileExtension() {
|
public String getPrimaryFileExtension() {
|
||||||
return "schem";
|
return "schem";
|
||||||
@ -151,6 +160,15 @@ public enum BuiltInClipboardFormat implements ClipboardFormat {
|
|||||||
return detectOldSpongeSchematic(inputStream, FastSchematicWriterV2.CURRENT_VERSION);
|
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
|
//FAWE end
|
||||||
|
|
||||||
@ -177,6 +195,15 @@ public enum BuiltInClipboardFormat implements ClipboardFormat {
|
|||||||
//FAWE end
|
//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
|
@Override
|
||||||
public boolean isFormat(InputStream inputStream) {
|
public boolean isFormat(InputStream inputStream) {
|
||||||
LinRootEntry rootEntry;
|
LinRootEntry rootEntry;
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren