mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-11-28 13:36:33 +01:00
Fix CMD sign NPE; resolves #822
This commit is contained in:
parent
3d6781b91b
commit
c7240462c0
@ -18,7 +18,6 @@ package de.erethon.dungeonsxl.sign.windup;
|
||||
|
||||
import de.erethon.dungeonsxl.DungeonsXL;
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
@ -31,7 +30,7 @@ public class CommandScript {
|
||||
|
||||
private String name;
|
||||
private File file;
|
||||
private List<String> commands = new ArrayList<>();
|
||||
private List<String> commands;
|
||||
|
||||
public CommandScript(String name, List<String> commands, Permission permission) {
|
||||
this.name = name;
|
||||
@ -45,10 +44,7 @@ public class CommandScript {
|
||||
|
||||
name = file.getName().replace(".yml", "");
|
||||
this.file = file;
|
||||
|
||||
if (config.getStringList("commands") != null) {
|
||||
setCommands(config.getStringList("commands"));
|
||||
}
|
||||
setCommands(config.getStringList("commands"));
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
|
@ -86,6 +86,7 @@ public class CommandSign extends Windup {
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
script = ((DungeonsXL) api).getCommandScriptRegistry().get(getLine(1));
|
||||
String[] attributes = getLine(2).split(",");
|
||||
|
||||
if (attributes.length == 3) {
|
||||
|
Loading…
Reference in New Issue
Block a user