mirror of
https://github.com/kaboomserver/commandspy.git
synced 2025-08-05 20:22:53 +00:00
Fix command error
This commit is contained in:
parent
3bd20f4ceb
commit
bbfd27a046
1 changed files with 5 additions and 5 deletions
|
@ -49,16 +49,16 @@ public final class Main extends JavaPlugin implements CommandExecutor, Listener
|
||||||
final Player player = (Player) sender;
|
final Player player = (Player) sender;
|
||||||
final JavaPlugin plugin = JavaPlugin.getPlugin(Main.class);
|
final JavaPlugin plugin = JavaPlugin.getPlugin(Main.class);
|
||||||
|
|
||||||
if ("on".equalsIgnoreCase(args[0])) {
|
if (args.length == 0) {
|
||||||
enableCommandSpy(player, plugin);
|
|
||||||
} else if ("off".equalsIgnoreCase(args[0])) {
|
|
||||||
disableCommandSpy(player, plugin);
|
|
||||||
} else {
|
|
||||||
if (plugin.getConfig().contains(player.getUniqueId().toString())) {
|
if (plugin.getConfig().contains(player.getUniqueId().toString())) {
|
||||||
enableCommandSpy(player, plugin);
|
enableCommandSpy(player, plugin);
|
||||||
} else {
|
} else {
|
||||||
disableCommandSpy(player, plugin);
|
disableCommandSpy(player, plugin);
|
||||||
}
|
}
|
||||||
|
} else if ("on".equalsIgnoreCase(args[0])) {
|
||||||
|
enableCommandSpy(player, plugin);
|
||||||
|
} else if ("off".equalsIgnoreCase(args[0])) {
|
||||||
|
disableCommandSpy(player, plugin);
|
||||||
}
|
}
|
||||||
config = plugin.getConfig();
|
config = plugin.getConfig();
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue