Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-12-26 19:02:36 +01:00
fix: identify schematic format by file if not specified
Dieser Commit ist enthalten in:
Ursprung
d4dd3638ff
Commit
b2f36facd8
@ -356,7 +356,7 @@ public class SchematicCommands {
|
|||||||
File dir = Settings.settings().PATHS.PER_PLAYER_SCHEMATICS ? new File(saveDir, actor.getUniqueId().toString()) : saveDir;
|
File dir = Settings.settings().PATHS.PER_PLAYER_SCHEMATICS ? new File(saveDir, actor.getUniqueId().toString()) : saveDir;
|
||||||
File file;
|
File file;
|
||||||
if (filename.startsWith("#")) {
|
if (filename.startsWith("#")) {
|
||||||
format = ClipboardFormats.findByAlias(formatName);
|
format = noExplicitFormat ? null : ClipboardFormats.findByAlias(formatName);
|
||||||
String[] extensions;
|
String[] extensions;
|
||||||
if (format != null) {
|
if (format != null) {
|
||||||
extensions = format.getFileExtensions().toArray(new String[0]);
|
extensions = format.getFileExtensions().toArray(new String[0]);
|
||||||
@ -396,7 +396,7 @@ public class SchematicCommands {
|
|||||||
.isInSubDirectory(saveDir, file)) + ")"));
|
.isInSubDirectory(saveDir, file)) + ")"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (format == null) {
|
if (format == null || noExplicitFormat) {
|
||||||
format = ClipboardFormats.findByFile(file);
|
format = ClipboardFormats.findByFile(file);
|
||||||
if (format == null) {
|
if (format == null) {
|
||||||
actor.print(Caption.of("worldedit.schematic.unknown-format", TextComponent.of(formatName)));
|
actor.print(Caption.of("worldedit.schematic.unknown-format", TextComponent.of(formatName)));
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren