ops options for commands
This commit is contained in:
1 parent
c2f22a141a
commit
b52b5c335f
16 files changed
+133
-51
No files matched your search
@@ -4,6 +4,7 @@ import carpet.helpers.EntityPlayerActionPack;
|
||||
import carpet.settings.CarpetSettings;
|
||||
import carpet.fakes.ServerPlayerEntityInterface;
|
||||
import carpet.patches.EntityPlayerMPFake;
|
||||
import carpet.settings.SettingsManager;
|
||||
import carpet.utils.Messenger;
|
||||
import com.google.common.collect.Sets;
|
||||
import com.mojang.authlib.GameProfile;
|
||||
@@ -44,7 +45,7 @@ public class PlayerCommand
|
||||
public static void register(CommandDispatcher<ServerCommandSource> dispatcher)
|
||||
{
|
||||
LiteralArgumentBuilder<ServerCommandSource> literalargumentbuilder = literal("player")
|
||||
.requires((player) -> CarpetSettings.commandPlayer)
|
||||
.requires((player) -> SettingsManager.canUseCommand(player, CarpetSettings.commandPlayer))
|
||||
.then(argument("player", StringArgumentType.word())
|
||||
.suggests( (c, b) -> suggestMatching(getPlayers(c.getSource()), b))
|
||||
.then(literal("stop").executes(PlayerCommand::stop))
|
||||
|
||||
Reference in new issue
Block a user