Interface ServerCommandHelper

All Superinterfaces:
CommandHelper<net.minecraft.commands.CommandSourceStack>
All Known Implementing Classes:
FabricServerCommandHelper

public interface ServerCommandHelper extends CommandHelper<net.minecraft.commands.CommandSourceStack>
  • Field Details

  • Method Details

    • getPlayer

      net.minecraft.server.level.ServerPlayer getPlayer(net.minecraft.commands.CommandSourceStack source) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Specified by:
      getPlayer in interface CommandHelper<net.minecraft.commands.CommandSourceStack>
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • requirePermissions

      default Predicate<net.minecraft.commands.CommandSourceStack> requirePermissions(ServerCommandHelper.CommandPermission permission)

      Returns a Predicate to determine if the provided command source has the given permissions to use a command

      Use of this is recommended over checking a vanilla permission level to allow for future support of a permissions API.