Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-11-20 06:50:08 +01:00
Remove permission requirements for root command (#3502)
Dieser Commit ist enthalten in:
Ursprung
f35b4f1fac
Commit
eb9bc2fdce
@ -9,49 +9,18 @@ loadbefore: [ ProtocolLib, ProxyPipe, SpigotLib, SkinRestorer ]
|
|||||||
softdepend: [ ProtocolSupport, PacketListenerApi ]
|
softdepend: [ ProtocolSupport, PacketListenerApi ]
|
||||||
commands:
|
commands:
|
||||||
viaversion:
|
viaversion:
|
||||||
|
permission: viaversion.command # The permission is also referenced here to filter root suggestions (/via<tab>)
|
||||||
description: Shows ViaVersion Version and more.
|
description: Shows ViaVersion Version and more.
|
||||||
aliases: [ viaver, vvbukkit ]
|
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:
|
permissions:
|
||||||
viaversion.admin:
|
viaversion.admin:
|
||||||
default: op
|
default: op
|
||||||
children:
|
children:
|
||||||
viaversion.admin.autoteam: true
|
viaversion.command.autoteam: true
|
||||||
viaversion.admin.debug: true
|
viaversion.command.debug: true
|
||||||
viaversion.admin.displayleaks: true
|
viaversion.command.displayleaks: true
|
||||||
viaversion.admin.dontbugme: true
|
viaversion.command.dontbugme: true
|
||||||
viaversion.admin.dump: true
|
viaversion.command.dump: true
|
||||||
viaversion.admin.list: true
|
viaversion.command.list: true
|
||||||
viaversion.admin.pps: true
|
viaversion.command.pps: true
|
||||||
viaversion.admin.reload: true
|
viaversion.command.reload: true
|
||||||
|
@ -25,7 +25,7 @@ public class BungeeCommand extends Command implements TabExecutor {
|
|||||||
private final BungeeCommandHandler handler;
|
private final BungeeCommandHandler handler;
|
||||||
|
|
||||||
public BungeeCommand(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;
|
this.handler = handler;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,7 +39,6 @@ import java.util.List;
|
|||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
|
||||||
|
|
||||||
import static com.viaversion.viaversion.api.command.ViaSubCommand.color;
|
import static com.viaversion.viaversion.api.command.ViaSubCommand.color;
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ public class SpongeCommandHandler extends ViaCommandHandler implements Command.R
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canExecute(CommandCause cause) {
|
public boolean canExecute(CommandCause cause) {
|
||||||
return cause.hasPermission("viaversion.admin");
|
return cause.hasPermission("viaversion.command");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -43,6 +43,6 @@ public class VelocityCommandHandler extends ViaCommandHandler implements SimpleC
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hasPermission(Invocation invocation) {
|
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>)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren