Interface ServerCommandHelper
- All Superinterfaces:
CommandHelper<net.minecraft.commands.CommandSourceStack>
- All Known Implementing Classes:
FabricServerCommandHelper
public interface ServerCommandHelper
extends CommandHelper<net.minecraft.commands.CommandSourceStack>
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.server.level.ServerPlayergetPlayer(net.minecraft.commands.CommandSourceStack source) default Predicate<net.minecraft.commands.CommandSourceStack> Returns aPredicateto determine if the provided command source has the given permissions to use a commandMethods inherited from interface CommandHelper
argument, literal, sendFailure, sendSystemMessage
-
Field Details
-
COMMAND_PERMISSION
-
-
Method Details
-
getPlayer
net.minecraft.server.level.ServerPlayer getPlayer(net.minecraft.commands.CommandSourceStack source) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Specified by:
getPlayerin interfaceCommandHelper<net.minecraft.commands.CommandSourceStack>- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
requirePermissions
default Predicate<net.minecraft.commands.CommandSourceStack> requirePermissions(ServerCommandHelper.CommandPermission permission) Returns a
Predicateto determine if the provided command source has the given permissions to use a commandUse of this is recommended over checking a vanilla permission level to allow for future support of a permissions API.
-