Class ConsoleSender

java.lang.Object
com.hypixel.hytale.server.core.console.ConsoleSender
All Implemented Interfaces:
CommandSender, PermissionHolder, IMessageReceiver

public class ConsoleSender extends Object implements CommandSender
  • Field Details

  • Method Details

    • sendMessage

      public void sendMessage(@Nonnull Message message)
      Description copied from interface: IMessageReceiver
      Called to send a message to this receiver.
      Specified by:
      sendMessage in interface IMessageReceiver
      Parameters:
      message - The message to be sent.
    • getUsername

      @Nonnull public String getUsername()
      Specified by:
      getUsername in interface CommandSender
      Returns:
      the username of the command sender.
    • getUuid

      @Nonnull public UUID getUuid()
      Specified by:
      getUuid in interface CommandSender
      Returns:
      the unique identifier of the command sender.
    • hasPermission

      public boolean hasPermission(@Nonnull String id)
      Description copied from interface: PermissionHolder
      Whether their attached permissions contains the id. This will also attempt to find wildcard matches.

      For example, if their permissions contain "hytale.*", the check "hytale.permission-test" will return true.

      If they have the root "*" permission, all returns will be true.
      Specified by:
      hasPermission in interface PermissionHolder
      Parameters:
      id - the permission.
      Returns:
      true if they have the permission, false otherwise.
    • hasPermission

      public boolean hasPermission(@Nonnull String id, boolean def)
      Description copied from interface: PermissionHolder
      Determines whether the associated instance has the given permission.
      Specified by:
      hasPermission in interface PermissionHolder
      Parameters:
      id - The identifier of the permission.
      def - The default value to return if the player does not have the permission.
      Returns:
      true if they have the permission, false otherwise.