Class DefaultPermissionUserCommandSender

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected de.dytanic.cloudnet.driver.permission.IPermissionManagement permissionManagement  
      protected de.dytanic.cloudnet.driver.permission.IPermissionUser permissionUser  
      protected java.util.Queue<java.lang.String> writtenMessages  
    • Constructor Summary

      Constructors 
      Constructor Description
      DefaultPermissionUserCommandSender​(de.dytanic.cloudnet.driver.permission.IPermissionUser permissionUser, de.dytanic.cloudnet.driver.permission.IPermissionManagement permissionManagement)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getName()
      Returns the name of the command sender
      de.dytanic.cloudnet.driver.permission.IPermissionManagement getPermissionManagement()  
      de.dytanic.cloudnet.driver.permission.IPermissionUser getPermissionUser()  
      java.util.Queue<java.lang.String> getWrittenMessages()  
      boolean hasPermission​(java.lang.String permission)
      Checks, that the commandSender has the permission to execute the command
      void sendMessage​(java.lang.String message)
      Sends a message to the specific sender implementation
      void sendMessage​(java.lang.String... messages)
      Send the messages to the specific sender implementation
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • permissionUser

        protected final de.dytanic.cloudnet.driver.permission.IPermissionUser permissionUser
      • permissionManagement

        protected final de.dytanic.cloudnet.driver.permission.IPermissionManagement permissionManagement
      • writtenMessages

        protected final java.util.Queue<java.lang.String> writtenMessages
    • Constructor Detail

      • DefaultPermissionUserCommandSender

        public DefaultPermissionUserCommandSender​(de.dytanic.cloudnet.driver.permission.IPermissionUser permissionUser,
                                                  de.dytanic.cloudnet.driver.permission.IPermissionManagement permissionManagement)
    • Method Detail

      • getName

        public java.lang.String getName()
        Description copied from interface: ICommandSender
        Returns the name of the command sender
        Specified by:
        getName in interface ICommandSender
      • sendMessage

        public void sendMessage​(java.lang.String message)
        Description copied from interface: ICommandSender
        Sends a message to the specific sender implementation
        Specified by:
        sendMessage in interface ICommandSender
        Parameters:
        message - that should send
      • sendMessage

        public void sendMessage​(java.lang.String... messages)
        Description copied from interface: ICommandSender
        Send the messages to the specific sender implementation
        Specified by:
        sendMessage in interface ICommandSender
        Parameters:
        messages - that should send
      • hasPermission

        public boolean hasPermission​(java.lang.String permission)
        Description copied from interface: ICommandSender
        Checks, that the commandSender has the permission to execute the command
        Specified by:
        hasPermission in interface ICommandSender
        Parameters:
        permission - the permission, that should that
        Returns:
        true if the command sender is authorized that it has the permission