Class AbstractNode<T extends PermissionHolder>
java.lang.Object
net.lucypoulton.squirtgun.command.node.AbstractNode<T>
- All Implemented Interfaces:
CommandNode<T>
- Direct Known Subclasses:
PluginInfoNode,SubcommandNode
public abstract class AbstractNode<T extends PermissionHolder>
extends Object
implements CommandNode<T>
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractNode(@NotNull String name, @NotNull String description, Condition<PermissionHolder,? extends T> condition) -
Method Summary
Modifier and TypeMethodDescription@NotNull Condition<PermissionHolder,? extends T>Gets the condition needed to execute this node or any children.Gets this node's description for use in help commands.@NotNull StringgetName()Gets this node's name, which will be used as a literal if needed.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.lucypoulton.squirtgun.command.node.CommandNode
execute, getArguments, next, withExtraCondition
-
Constructor Details
-
AbstractNode
protected AbstractNode(@NotNull @NotNull String name, @NotNull @NotNull String description, Condition<PermissionHolder,? extends T> condition)
-
-
Method Details
-
getName
Description copied from interface:CommandNodeGets this node's name, which will be used as a literal if needed.- Specified by:
getNamein interfaceCommandNode<T extends PermissionHolder>
-
getDescription
Description copied from interface:CommandNodeGets this node's description for use in help commands. This should be a simple, one-line sentence.- Specified by:
getDescriptionin interfaceCommandNode<T extends PermissionHolder>
-
getCondition
Description copied from interface:CommandNodeGets the condition needed to execute this node or any children. If not needed, use PermissionHolder as T and returnCondition.alwaysTrue()- Specified by:
getConditionin interfaceCommandNode<T extends PermissionHolder>- Returns:
- the condition
-