SteamWar/BauSystem
Archiviert
13
0

Update CommandNV to new SWCommand system

Dieser Commit ist enthalten in:
yoyosource 2021-04-01 20:43:31 +02:00
Ursprung 853b475b74
Commit 91b8d2db1b
3 geänderte Dateien mit 10 neuen und 14 gelöschten Zeilen

Datei anzeigen

@ -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();

Datei anzeigen

@ -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) {

Datei anzeigen

@ -14,8 +14,6 @@ commands:
freeze:
aliases: stoplag
loader:
nightvision:
aliases: nv
watervision:
aliases: wv
lockschem: