Update FreezeCommand
Dieser Commit ist enthalten in:
Ursprung
4be54d9b92
Commit
c4bc186331
@ -26,6 +26,7 @@ import de.steamwar.command.SWCommand;
|
||||
import de.steamwar.teamserver.Teamserver;
|
||||
import de.steamwar.teamserver.listener.FreezeListener;
|
||||
import net.md_5.bungee.api.ChatMessageType;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class FreezeCommand extends SWCommand {
|
||||
@ -37,9 +38,13 @@ public class FreezeCommand extends SWCommand {
|
||||
@Register(description = "REGION_FREEZE_HELP")
|
||||
public void toggleCommand(@Guard Player p) {
|
||||
if (toggle()) {
|
||||
Teamserver.MESSAGE.send(getEnableMessage(), p, ChatMessageType.ACTION_BAR);
|
||||
Bukkit.getOnlinePlayers().forEach(player -> {
|
||||
Teamserver.MESSAGE.send(getEnableMessage(), player, ChatMessageType.ACTION_BAR);
|
||||
});
|
||||
} else {
|
||||
Teamserver.MESSAGE.send(getDisableMessage(), p, ChatMessageType.ACTION_BAR);
|
||||
Bukkit.getOnlinePlayers().forEach(player -> {
|
||||
Teamserver.MESSAGE.send(getDisableMessage(), player, ChatMessageType.ACTION_BAR);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren