Archiviert
1
0

Merge branch 'master' into deadline

# Conflicts:
#	CommonCore
Dieser Commit ist enthalten in:
Lixfel 2022-06-15 18:07:38 +02:00
Commit f2006dd218
4 geänderte Dateien mit 14 neuen und 16 gelöschten Zeilen

@ -1 +1 @@
Subproject commit 492894ca8d41ee0bde4dcb9d520db5f7478c50c7
Subproject commit 8dbab5b132d2fd84db202d691fd1f817f91579d6

Datei anzeigen

@ -264,6 +264,7 @@ public class BungeeCore extends Plugin {
get().getLogger().log(Level.SEVERE, msg, e);
}
private static void loadConfig(){
Configuration config;
try{

Datei anzeigen

@ -564,11 +564,6 @@ public class TeamCommand extends BasicCommand {
}
private void tp(ProxiedPlayer player, SteamwarUser user, Team team, String[] args){
if (!user.getUserGroup().isAdminGroup()) {
Message.send("DISABLED", player);
return;
}
if(args.length == 1){
if(notInTeam(player, user))
return;
@ -615,11 +610,6 @@ public class TeamCommand extends BasicCommand {
}
private void server(ProxiedPlayer player, SteamwarUser user, Team team, String[] args){
if (!user.getUserGroup().isAdminGroup()) {
Message.send("DISABLED", player);
return;
}
if(notLeader(player, user, team))
return;
if (user.isPunishedWithMessage(ChatSender.of(player), Punishment.PunishmentType.NoTeamServer)) {

Datei anzeigen

@ -39,21 +39,28 @@ public class SWCommand extends AbstractSWCommand<CommandSender> {
TypeUtils.init();
}
private String permission;
private Command command;
private List<String> defaultHelpMessages = new ArrayList<>();
protected SWCommand(String command) {
super(CommandSender.class, command);
this(command, null);
}
protected SWCommand(String command, String... aliases) {
protected SWCommand(String command, String permission) {
super(CommandSender.class, command);
this.permission = permission;
}
protected SWCommand(String command, String permission, String... aliases) {
super(CommandSender.class, command, aliases);
this.permission = permission;
}
@Override
protected void createAndSafeCommand(String command, String[] aliases) {
this.command = new TabCompletableCommand(command, aliases) {
this.command = new TabCompletableCommand(command, permission, aliases) {
@Override
public void execute(CommandSender commandSender, String[] strings) {
SWCommand.this.execute(commandSender, null, strings);
@ -67,8 +74,8 @@ public class SWCommand extends AbstractSWCommand<CommandSender> {
}
private abstract static class TabCompletableCommand extends Command implements TabExecutor {
public TabCompletableCommand(String name, String... aliases) {
super(name, null, aliases);
public TabCompletableCommand(String name, String permission, String... aliases) {
super(name, permission, aliases);
}
}