# Conflicts: # CommonCore
Dieser Commit ist enthalten in:
Commit
f2006dd218
@ -1 +1 @@
|
|||||||
Subproject commit 492894ca8d41ee0bde4dcb9d520db5f7478c50c7
|
Subproject commit 8dbab5b132d2fd84db202d691fd1f817f91579d6
|
@ -264,6 +264,7 @@ public class BungeeCore extends Plugin {
|
|||||||
get().getLogger().log(Level.SEVERE, msg, e);
|
get().getLogger().log(Level.SEVERE, msg, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private static void loadConfig(){
|
private static void loadConfig(){
|
||||||
Configuration config;
|
Configuration config;
|
||||||
try{
|
try{
|
||||||
|
@ -564,11 +564,6 @@ public class TeamCommand extends BasicCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void tp(ProxiedPlayer player, SteamwarUser user, Team team, String[] args){
|
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(args.length == 1){
|
||||||
if(notInTeam(player, user))
|
if(notInTeam(player, user))
|
||||||
return;
|
return;
|
||||||
@ -615,11 +610,6 @@ public class TeamCommand extends BasicCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void server(ProxiedPlayer player, SteamwarUser user, Team team, String[] args){
|
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))
|
if(notLeader(player, user, team))
|
||||||
return;
|
return;
|
||||||
if (user.isPunishedWithMessage(ChatSender.of(player), Punishment.PunishmentType.NoTeamServer)) {
|
if (user.isPunishedWithMessage(ChatSender.of(player), Punishment.PunishmentType.NoTeamServer)) {
|
||||||
|
@ -39,21 +39,28 @@ public class SWCommand extends AbstractSWCommand<CommandSender> {
|
|||||||
TypeUtils.init();
|
TypeUtils.init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String permission;
|
||||||
private Command command;
|
private Command command;
|
||||||
|
|
||||||
private List<String> defaultHelpMessages = new ArrayList<>();
|
private List<String> defaultHelpMessages = new ArrayList<>();
|
||||||
|
|
||||||
protected SWCommand(String command) {
|
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);
|
super(CommandSender.class, command, aliases);
|
||||||
|
this.permission = permission;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void createAndSafeCommand(String command, String[] aliases) {
|
protected void createAndSafeCommand(String command, String[] aliases) {
|
||||||
this.command = new TabCompletableCommand(command, aliases) {
|
this.command = new TabCompletableCommand(command, permission, aliases) {
|
||||||
@Override
|
@Override
|
||||||
public void execute(CommandSender commandSender, String[] strings) {
|
public void execute(CommandSender commandSender, String[] strings) {
|
||||||
SWCommand.this.execute(commandSender, null, 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 {
|
private abstract static class TabCompletableCommand extends Command implements TabExecutor {
|
||||||
public TabCompletableCommand(String name, String... aliases) {
|
public TabCompletableCommand(String name, String permission, String... aliases) {
|
||||||
super(name, null, aliases);
|
super(name, permission, aliases);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren