Add CommandSpectate message
Dieser Commit ist enthalten in:
Ursprung
016ea28b87
Commit
b5237557ec
@ -21,6 +21,7 @@ package de.steamwar.misslewars.commands;
|
|||||||
|
|
||||||
import de.steamwar.misslewars.MWTeam;
|
import de.steamwar.misslewars.MWTeam;
|
||||||
import de.steamwar.misslewars.MissileWars;
|
import de.steamwar.misslewars.MissileWars;
|
||||||
|
import de.steamwar.misslewars.items.Missile;
|
||||||
import org.bukkit.GameMode;
|
import org.bukkit.GameMode;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
@ -47,7 +48,10 @@ public class CommandSpectate implements CommandExecutor {
|
|||||||
|
|
||||||
MWTeam mwTeam = MissileWars.getTeam(player);
|
MWTeam mwTeam = MissileWars.getTeam(player);
|
||||||
if (mwTeam == null) return false;
|
if (mwTeam == null) return false;
|
||||||
if (mwTeam.getPlayers().size() == 1) return false;
|
if (mwTeam.getPlayers().size() == 1) {
|
||||||
|
player.sendMessage("Das spectaten einer MissileWars runde ist nicht möglich, wenn du alleine in einem Team bist.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
MissileWars.leave(player);
|
MissileWars.leave(player);
|
||||||
player.setGameMode(GameMode.SPECTATOR);
|
player.setGameMode(GameMode.SPECTATOR);
|
||||||
return true;
|
return true;
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren