Archiviert
13
0

Update FreezeCommand

Dieser Commit ist enthalten in:
yoyosource 2021-12-24 23:32:34 +01:00
Ursprung 4be54d9b92
Commit c4bc186331

Datei anzeigen

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