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 CommandTrace();
|
||||||
new CommandTPSLimiter();
|
new CommandTPSLimiter();
|
||||||
getCommand("nightvision").setExecutor(new CommandNV());
|
new CommandNV();
|
||||||
new CommandReset();
|
new CommandReset();
|
||||||
new CommandSpeed();
|
new CommandSpeed();
|
||||||
new CommandTNT();
|
new CommandTNT();
|
||||||
|
@ -20,22 +20,20 @@
|
|||||||
package de.steamwar.bausystem.commands;
|
package de.steamwar.bausystem.commands;
|
||||||
|
|
||||||
import de.steamwar.bausystem.BauSystem;
|
import de.steamwar.bausystem.BauSystem;
|
||||||
import org.bukkit.command.Command;
|
import de.steamwar.command.SWCommand;
|
||||||
import org.bukkit.command.CommandExecutor;
|
|
||||||
import org.bukkit.command.CommandSender;
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.potion.PotionEffect;
|
import org.bukkit.potion.PotionEffect;
|
||||||
import org.bukkit.potion.PotionEffectType;
|
import org.bukkit.potion.PotionEffectType;
|
||||||
|
|
||||||
public class CommandNV implements CommandExecutor {
|
public class CommandNV extends SWCommand {
|
||||||
|
|
||||||
@Override
|
public CommandNV() {
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
super("nightvision", "nv");
|
||||||
if (!(sender instanceof Player))
|
}
|
||||||
return false;
|
|
||||||
Player player = (Player) sender;
|
@Register
|
||||||
toggleNightvision(player);
|
public void genericCommand(Player p) {
|
||||||
return false;
|
toggleNightvision(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void toggleNightvision(Player player) {
|
public static void toggleNightvision(Player player) {
|
||||||
|
@ -14,8 +14,6 @@ commands:
|
|||||||
freeze:
|
freeze:
|
||||||
aliases: stoplag
|
aliases: stoplag
|
||||||
loader:
|
loader:
|
||||||
nightvision:
|
|
||||||
aliases: nv
|
|
||||||
watervision:
|
watervision:
|
||||||
aliases: wv
|
aliases: wv
|
||||||
lockschem:
|
lockschem:
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren