3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-12-26 00:00:28 +01:00

Remove permission requirements for root command (#3502)

Dieser Commit ist enthalten in:
EnZaXD 2023-10-24 05:34:29 +02:00 committet von GitHub
Ursprung f35b4f1fac
Commit eb9bc2fdce
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23
5 geänderte Dateien mit 12 neuen und 44 gelöschten Zeilen

Datei anzeigen

@ -9,49 +9,18 @@ loadbefore: [ ProtocolLib, ProxyPipe, SpigotLib, SkinRestorer ]
softdepend: [ ProtocolSupport, PacketListenerApi ]
commands:
viaversion:
permission: viaversion.command # The permission is also referenced here to filter root suggestions (/via<tab>)
description: Shows ViaVersion Version and more.
aliases: [ viaver, vvbukkit ]
viaversion autoteam:
permission: viaversion.admin.autoteam
description: Toggle automatically teaming to prevent colliding.
aliases: [ autoteam ]
viaversion debug:
permission: viaversion.admin.debug
description: Toggles various debug modes.
aliases: /viaversion debug [clear/logposttransform/add/remove]
viaversion displayleaks:
permission: viaversion.admin.displayleaks
description: Toggles display of memory leaks.
aliases: [ displayleaks ]
viaversion dontbugme:
permission: viaversion.admin.dontbugme
description: Toggle checking for updates.
aliases: [ dontbugme ]
viaversion dump:
permission: viaversion.admin.dump
description: Dump information about your server, this is helpful if you report bugs.
aliases: [ dump ]
viaversion list:
permission: viaversion.admin.list
description: Lists all players with their protocol version.
aliases: [ list ]
viaversion pps:
permission: viaversion.admin.pps
description: Shows the packets per second of online players.
aliases: [ pps ]
viaversion reload:
permission: viaversion.admin.reload
description: Reloads all config files.
aliases: [ reload ]
permissions:
viaversion.admin:
default: op
children:
viaversion.admin.autoteam: true
viaversion.admin.debug: true
viaversion.admin.displayleaks: true
viaversion.admin.dontbugme: true
viaversion.admin.dump: true
viaversion.admin.list: true
viaversion.admin.pps: true
viaversion.admin.reload: true
viaversion.command.autoteam: true
viaversion.command.debug: true
viaversion.command.displayleaks: true
viaversion.command.dontbugme: true
viaversion.command.dump: true
viaversion.command.list: true
viaversion.command.pps: true
viaversion.command.reload: true

Datei anzeigen

@ -25,7 +25,7 @@ public class BungeeCommand extends Command implements TabExecutor {
private final BungeeCommandHandler handler;
public BungeeCommand(BungeeCommandHandler handler) {
super("viaversion", "viaversion.admin", "viaver", "vvbungee"); // The permission is also referenced here to filter root suggestions (/via<tab>)
super("viaversion", "viaversion.command", "viaver", "vvbungee"); // The permission is also referenced here to filter root suggestions (/via<tab>)
this.handler = handler;
}

Datei anzeigen

@ -39,7 +39,6 @@ import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.atomic.AtomicBoolean;
import static com.viaversion.viaversion.api.command.ViaSubCommand.color;

Datei anzeigen

@ -46,7 +46,7 @@ public class SpongeCommandHandler extends ViaCommandHandler implements Command.R
@Override
public boolean canExecute(CommandCause cause) {
return cause.hasPermission("viaversion.admin");
return cause.hasPermission("viaversion.command");
}
@Override

Datei anzeigen

@ -43,6 +43,6 @@ public class VelocityCommandHandler extends ViaCommandHandler implements SimpleC
@Override
public boolean hasPermission(Invocation invocation) {
return invocation.source().hasPermission("viaversion.admin"); // The permission is also referenced here to filter root suggestions (/via<tab>)
return invocation.source().hasPermission("viaversion.command"); // The permission is also referenced here to filter root suggestions (/via<tab>)
}
}