Update BauSystem to new CommandFramework #217
@ -91,7 +91,7 @@ public class BauSystem extends JavaPlugin implements Listener {
|
||||
new CommandLoader();
|
||||
getCommand("lockschem").setExecutor(new CommandLockschem());
|
||||
new CommandDebugStick();
|
||||
getCommand("watervision").setExecutor(new CommandGills());
|
||||
new CommandGills();
|
||||
new CommandDetonator();
|
||||
new CommandScript();
|
||||
getCommand("scriptvars").setExecutor(new CommandScriptVars());
|
||||
|
@ -20,22 +20,20 @@
|
||||
package de.steamwar.bausystem.commands;
|
||||
|
||||
import de.steamwar.bausystem.BauSystem;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import de.steamwar.command.SWCommand;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.potion.PotionEffect;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
|
||||
public class CommandGills implements CommandExecutor {
|
||||
public class CommandGills extends SWCommand {
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
if (!(sender instanceof Player))
|
||||
return false;
|
||||
Player player = (Player) sender;
|
||||
toggleGills(player);
|
||||
return false;
|
||||
public CommandGills() {
|
||||
super("watervision", "wv");
|
||||
}
|
||||
|
||||
@Register
|
||||
public void genericCommand(Player p) {
|
||||
toggleGills(p);
|
||||
}
|
||||
|
||||
public static void toggleGills(Player player) {
|
||||
|
@ -12,7 +12,5 @@ commands:
|
||||
fire:
|
||||
freeze:
|
||||
aliases: stoplag
|
||||
watervision:
|
||||
aliases: wv
|
||||
lockschem:
|
||||
scriptvars:
|
In neuem Issue referenzieren
Einen Benutzer sperren