mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-11-24 19:45:43 +01:00
Fix command sign exception; resolves #544
This commit is contained in:
parent
f8fbeec9df
commit
6523caa908
@ -72,7 +72,9 @@ public class CommandSign extends DSign {
|
||||
|
||||
command = lines[1];
|
||||
delay = NumberUtil.parseInt(attributes[0]);
|
||||
executor = attributes[1];
|
||||
if (attributes.length >= 2) {
|
||||
executor = attributes[1];
|
||||
}
|
||||
|
||||
cCommand = CommandsXL.getPlugin().getCCommands().getCCommand(command);
|
||||
|
||||
@ -98,10 +100,10 @@ public class CommandSign extends DSign {
|
||||
|
||||
@Override
|
||||
public boolean onPlayerTrigger(final Player player) {
|
||||
if (executor.equalsIgnoreCase("Console")) {
|
||||
if ("Console".equalsIgnoreCase(executor)) {
|
||||
new CCommandExecutorTask(player, cCommand, Bukkit.getConsoleSender(), true).runTaskLater(plugin, delay * 20);
|
||||
|
||||
} else if (executor.equalsIgnoreCase("OP")) {
|
||||
} else if ("OP".equalsIgnoreCase(executor)) {
|
||||
boolean isOp = player.isOp();
|
||||
|
||||
player.setOp(true);
|
||||
|
Loading…
Reference in New Issue
Block a user