Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-12-25 02:20:07 +01:00
Fix NPE when using //schem list with not schematics present.
Dieser Commit ist enthalten in:
Ursprung
6c03eea9b1
Commit
94ae1be2d1
@ -262,14 +262,15 @@ public class SchematicCommands {
|
||||
public void list(Actor actor, CommandContext args, @Switch('p') @Optional("1") int page) throws WorldEditException {
|
||||
File dir = worldEdit.getWorkingDirectoryFile(worldEdit.getConfiguration().saveDir);
|
||||
List<File> fileList = allFiles(dir);
|
||||
File[] files = new File[fileList.size()];
|
||||
fileList.toArray(files);
|
||||
|
||||
if (files.length == 0) {
|
||||
if (fileList.isEmpty()) {
|
||||
actor.printError("No schematics found.");
|
||||
return;
|
||||
}
|
||||
|
||||
File[] files = new File[fileList.size()];
|
||||
fileList.toArray(files);
|
||||
|
||||
int pageCount = files.length / SCHEMATICS_PER_PAGE + 1;
|
||||
if (page < 1) {
|
||||
actor.printError("Page must be at least 1");
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren