Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
Ursprung
89f1971106
Commit
e4ba3249d7
@ -1289,6 +1289,9 @@ STOP_NO_PERMS = §cYou do not have the permission to stop the server
|
|||||||
STOP_MESSAGE = §eServer is stopping
|
STOP_MESSAGE = §eServer is stopping
|
||||||
WORLD_EDIT_NO_PERMS = §cYou do not have the permission to use WorldEdit
|
WORLD_EDIT_NO_PERMS = §cYou do not have the permission to use WorldEdit
|
||||||
|
|
||||||
|
KICKALL_HELP = §8/§ekickall §8- §7Kick all players from the server except the owner
|
||||||
|
KICKALL_NO_PERM = §cThis is not your world!
|
||||||
|
|
||||||
# Techhider
|
# Techhider
|
||||||
TECHHIDER_HELP = §8/§etechhider §8- §7Toggle Techhider
|
TECHHIDER_HELP = §8/§etechhider §8- §7Toggle Techhider
|
||||||
TECHHIDER_GLOBAL = §cNo techhider in global region
|
TECHHIDER_GLOBAL = §cNo techhider in global region
|
||||||
@ -1304,7 +1307,5 @@ XRAY_OFF = §cXray deactivated
|
|||||||
|
|
||||||
# WorldEdit
|
# WorldEdit
|
||||||
COLORREPLACE_HELP = §8//§ecolorreplace §8[§7color§8] §8[§7color§8] §8- §7Replace all blocks of one color with another
|
COLORREPLACE_HELP = §8//§ecolorreplace §8[§7color§8] §8[§7color§8] §8- §7Replace all blocks of one color with another
|
||||||
COLORREPLACE_NO_PERMS = §cYou do not have the permission to use this command
|
|
||||||
|
|
||||||
TYPEREPLACE_HELP = §8//§etyreplace §8[§7type§8] §8[§7type§8] §8- §7Replace all blocks of one type with another
|
TYPEREPLACE_HELP = §8//§etyreplace §8[§7type§8] §8[§7type§8] §8- §7Replace all blocks of one type with another
|
||||||
TYPEREPLACE_NO_PERMS = §cYou do not have the permission to use this command
|
|
||||||
|
@ -1267,6 +1267,9 @@ STOP_NO_PERMS = §cDu hast keine Rechte den Server zu stoppen
|
|||||||
STOP_MESSAGE = §eDer Server wird gestoppt
|
STOP_MESSAGE = §eDer Server wird gestoppt
|
||||||
WORLD_EDIT_NO_PERMS = §cDu darfst hier kein WorldEdit benutzen
|
WORLD_EDIT_NO_PERMS = §cDu darfst hier kein WorldEdit benutzen
|
||||||
|
|
||||||
|
KICKALL_HELP = §8/§ekickall §8- §7Kickt alle Spieler vom Server außer den Owner
|
||||||
|
KICKALL_NO_PERM = §cDies ist nicht deine Welt!
|
||||||
|
|
||||||
# Techhider
|
# Techhider
|
||||||
TECHHIDER_HELP = §8/§etechhider §8- §7Techhider umschalten
|
TECHHIDER_HELP = §8/§etechhider §8- §7Techhider umschalten
|
||||||
TECHHIDER_GLOBAL = §cKein Techhider in der globalen region
|
TECHHIDER_GLOBAL = §cKein Techhider in der globalen region
|
||||||
@ -1282,7 +1285,5 @@ XRAY_OFF = §cXray deaktiviert
|
|||||||
|
|
||||||
# WorldEdit
|
# WorldEdit
|
||||||
COLORREPLACE_HELP = §8//§ecolorreplace §8[§7color§8] §8[§7color§8] §8- §7Ersetzt eine Farbe mit einer anderen
|
COLORREPLACE_HELP = §8//§ecolorreplace §8[§7color§8] §8[§7color§8] §8- §7Ersetzt eine Farbe mit einer anderen
|
||||||
COLORREPLACE_NO_PERMS = §cDu hast keine Rechte um Farben zu ersetzen
|
|
||||||
|
|
||||||
TYPEREPLACE_HELP = §8//§etyreplace §8[§7type§8] §8[§7type§8] §8- §7Ersetzt einen Blockgruppe mit einer anderen
|
TYPEREPLACE_HELP = §8//§etyreplace §8[§7type§8] §8[§7type§8] §8- §7Ersetzt einen Blockgruppe mit einer anderen
|
||||||
TYPEREPLACE_NO_PERMS = §cDu hast keine Rechte um Blockgruppen zu ersetzen
|
|
||||||
|
@ -0,0 +1,54 @@
|
|||||||
|
/*
|
||||||
|
* This file is a part of the SteamWar software.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2022 SteamWar.de-Serverteam
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package de.steamwar.bausystem.features.world;
|
||||||
|
|
||||||
|
import de.steamwar.bausystem.config.BauServer;
|
||||||
|
import de.steamwar.bausystem.linkage.LinkageType;
|
||||||
|
import de.steamwar.bausystem.linkage.Linked;
|
||||||
|
import de.steamwar.bausystem.linkage.LinkedInstance;
|
||||||
|
import de.steamwar.command.SWCommand;
|
||||||
|
import de.steamwar.command.TypeValidator;
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@Linked(LinkageType.COMMAND)
|
||||||
|
public class KickallCommand extends SWCommand {
|
||||||
|
|
||||||
|
@LinkedInstance
|
||||||
|
public BauServer bauServer;
|
||||||
|
|
||||||
|
public KickallCommand() {
|
||||||
|
super("/kickall");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Register(description = "KICKALL_HELP")
|
||||||
|
public void genericCommand(@Validator Player player) {
|
||||||
|
Bukkit.getOnlinePlayers().forEach(p -> {
|
||||||
|
if (!bauServer.getOwner().equals(p.getUniqueId())) p.kickPlayer("");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@ClassValidator(value = Player.class, local = true)
|
||||||
|
public TypeValidator<Player> validator() {
|
||||||
|
return (commandSender, player, messageSender) -> {
|
||||||
|
return !messageSender.send(!bauServer.getOwner().equals(player.getUniqueId()), "KICKALL_NO_PERM");
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
In neuem Issue referenzieren
Einen Benutzer sperren