ops options for commands
This commit is contained in:
1 parent
c2f22a141a
commit
b52b5c335f
16 files changed
+133
-51
No files matched your search
@@ -2,6 +2,7 @@ package carpet.commands;
|
||||
|
||||
import carpet.settings.CarpetSettings;
|
||||
import carpet.helpers.TickSpeed;
|
||||
import carpet.settings.SettingsManager;
|
||||
import carpet.utils.CarpetProfiler;
|
||||
import carpet.utils.Messenger;
|
||||
import com.mojang.brigadier.CommandDispatcher;
|
||||
@@ -26,7 +27,7 @@ public class TickCommand
|
||||
public static void register(CommandDispatcher<ServerCommandSource> dispatcher)
|
||||
{
|
||||
LiteralArgumentBuilder<ServerCommandSource> literalargumentbuilder = literal("tick").
|
||||
requires((player) -> CarpetSettings.commandTick).
|
||||
requires((player) -> SettingsManager.canUseCommand(player, CarpetSettings.commandTick)).
|
||||
then(literal("rate").
|
||||
executes((c) -> queryTps(c.getSource())).
|
||||
then(argument("rate", floatArg(0.1F, 500.0F)).
|
||||
|
||||
Reference in new issue
Block a user