commands, camera, messages, overlay, ..

This commit is contained in:
Sen 2025-03-26 12:22:32 +01:00
parent 75f91dbf4c
commit d45cd7ec2c
126 changed files with 854 additions and 628 deletions

View file

@ -4,7 +4,7 @@ import game.command.CommandEnvironment;
import game.command.RunException;
import game.command.Command;
import game.command.Executor;
import game.network.NetHandlerPlayServer;
import game.network.Player;
public class CommandRevoke extends Command {
public CommandRevoke() {
@ -13,8 +13,8 @@ public class CommandRevoke extends Command {
this.addPlayer("player", false);
}
public void exec(CommandEnvironment env, Executor exec, NetHandlerPlayServer player) {
if(!(exec instanceof NetHandlerPlayServer) || !((NetHandlerPlayServer)exec).isLocal())
public void exec(CommandEnvironment env, Executor exec, Player player) {
if(!(exec instanceof Player) || !((Player)exec).isLocal())
throw new RunException("Dieser Befehl kann nur vom Host-Spieler ausgeführt werden");
else if(player == exec)
throw new RunException("Du kannst nicht deinen eigenen Admin-Status entfernen");