mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-10-31 23:59:33 +01:00
Remove permission requirements for root command (#3502)
This commit is contained in:
parent
f35b4f1fac
commit
eb9bc2fdce
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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
|
||||
|
@ -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>)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user