added command (leave your team)
Signed-off-by: Yaruma3341 <yaruma3341@gmail.com>
Dieser Commit ist enthalten in:
Ursprung
87de724d40
Commit
808cd32c8e
@ -12,6 +12,7 @@ import me.yaruma.fightsystem.kit.Kit;
|
|||||||
import me.yaruma.fightsystem.kit.KitManager;
|
import me.yaruma.fightsystem.kit.KitManager;
|
||||||
import me.yaruma.fightsystem.utils.Config;
|
import me.yaruma.fightsystem.utils.Config;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
|
import org.bukkit.GameMode;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
@ -70,6 +71,15 @@ public class AkCommand implements CommandExecutor {
|
|||||||
|
|
||||||
} else
|
} else
|
||||||
player.sendMessage(FightSystem.PREFIX + "§cEs sind bereits zwei Leader vorhanden!");
|
player.sendMessage(FightSystem.PREFIX + "§cEs sind bereits zwei Leader vorhanden!");
|
||||||
|
} else if(args[0].equalsIgnoreCase("leave")) {
|
||||||
|
FightTeam fightTeam = Fight.getPlayerTeam(player);
|
||||||
|
if(fightTeam != null) {
|
||||||
|
fightTeam.removePlayer(player);
|
||||||
|
player.setGameMode(GameMode.SPECTATOR);
|
||||||
|
player.teleport(Config.SpecSpawn);
|
||||||
|
player.sendMessage(FightSystem.PREFIX + "§aDu hast das Team verlassen!");
|
||||||
|
} else
|
||||||
|
player.sendMessage(FightSystem.PREFIX + "§cDu befindest dich in keinem Team!");
|
||||||
}
|
}
|
||||||
|
|
||||||
}else if(args.length == 2) {
|
}else if(args.length == 2) {
|
||||||
@ -211,6 +221,7 @@ public class AkCommand implements CommandExecutor {
|
|||||||
p.sendMessage("§8/§6ak invite [Spieler] §8- §7Lade den Spieler in dein Team bei");
|
p.sendMessage("§8/§6ak invite [Spieler] §8- §7Lade den Spieler in dein Team bei");
|
||||||
p.sendMessage("§8/§6ak accept §8- §7Einladung annehmen");
|
p.sendMessage("§8/§6ak accept §8- §7Einladung annehmen");
|
||||||
p.sendMessage("§8/§6ak decline §8- §7Einladung ablehnen");
|
p.sendMessage("§8/§6ak decline §8- §7Einladung ablehnen");
|
||||||
|
p.sendMessage("§8/ak leave §8- §7Team verlassen");
|
||||||
p.sendMessage("§8/§6ak kit <Kit> §8- §7Wähle ein Kit");
|
p.sendMessage("§8/§6ak kit <Kit> §8- §7Wähle ein Kit");
|
||||||
p.sendMessage("§8/§6ak schem <Schematic> §8- §7Setze deine Schematic");
|
p.sendMessage("§8/§6ak schem <Schematic> §8- §7Setze deine Schematic");
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren