Update CommandNV to new SWCommand system
Dieser Commit ist enthalten in:
Ursprung
853b475b74
Commit
91b8d2db1b
@ -77,7 +77,7 @@ public class BauSystem extends JavaPlugin implements Listener {
|
||||
|
||||
new CommandTrace();
|
||||
new CommandTPSLimiter();
|
||||
getCommand("nightvision").setExecutor(new CommandNV());
|
||||
new CommandNV();
|
||||
new CommandReset();
|
||||
new CommandSpeed();
|
||||
new CommandTNT();
|
||||
|
@ -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 CommandNV implements CommandExecutor {
|
||||
public class CommandNV extends SWCommand {
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
if (!(sender instanceof Player))
|
||||
return false;
|
||||
Player player = (Player) sender;
|
||||
toggleNightvision(player);
|
||||
return false;
|
||||
public CommandNV() {
|
||||
super("nightvision", "nv");
|
||||
}
|
||||
|
||||
@Register
|
||||
public void genericCommand(Player p) {
|
||||
toggleNightvision(p);
|
||||
}
|
||||
|
||||
public static void toggleNightvision(Player player) {
|
||||
|
@ -14,8 +14,6 @@ commands:
|
||||
freeze:
|
||||
aliases: stoplag
|
||||
loader:
|
||||
nightvision:
|
||||
aliases: nv
|
||||
watervision:
|
||||
aliases: wv
|
||||
lockschem:
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren