Class AbstractNode<T extends me.lucyy.squirtgun.platform.audience.PermissionHolder>

  • All Implemented Interfaces:
    CommandNode<T>
    Direct Known Subclasses:
    PluginInfoNode, SubcommandNode

    public abstract class AbstractNode<T extends me.lucyy.squirtgun.platform.audience.PermissionHolder>
    extends java.lang.Object
    implements CommandNode<T>
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected AbstractNode​(@NotNull java.lang.String name, @NotNull java.lang.String description, @Nullable java.lang.String permission)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getDescription()
      Gets this node's description for use in help commands.
      @NotNull java.lang.String getName()
      Gets this node's name, which will be used as a literal if needed.
      @Nullable java.lang.String getPermission()
      Gets the permission needed to execute this node or any children.
      • Methods inherited from class java.lang.Object

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

      • AbstractNode

        protected AbstractNode​(@NotNull
                               @NotNull java.lang.String name,
                               @NotNull
                               @NotNull java.lang.String description,
                               @Nullable
                               @Nullable java.lang.String permission)
    • Method Detail

      • getName

        @NotNull
        public @NotNull java.lang.String getName()
        Description copied from interface: CommandNode
        Gets this node's name, which will be used as a literal if needed.
        Specified by:
        getName in interface CommandNode<T extends me.lucyy.squirtgun.platform.audience.PermissionHolder>
      • getDescription

        public java.lang.String getDescription()
        Description copied from interface: CommandNode
        Gets this node's description for use in help commands. This should be a simple, one-line sentence.
        Specified by:
        getDescription in interface CommandNode<T extends me.lucyy.squirtgun.platform.audience.PermissionHolder>
      • getPermission

        @Nullable
        public @Nullable java.lang.String getPermission()
        Description copied from interface: CommandNode
        Gets the permission needed to execute this node or any children.
        Specified by:
        getPermission in interface CommandNode<T extends me.lucyy.squirtgun.platform.audience.PermissionHolder>
        Returns:
        the permission, or null if no permission is needed