Class TagType<T extends org.bukkit.Keyed>
java.lang.Object
org.skriptlang.skript.bukkit.tags.TagType<T>
- Type Parameters:
T
- see type.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
Adds types to the registered tag types.static TagType<?> @NotNull []
fromParseMark
(int i) Gets tag types by parser mark.static @NotNull String
static @NotNull String
getFullPattern
(boolean required) static TagType<?> @NotNull []
getType
(int i) Gets tag types by index.getTypes()
pattern()
toString()
type()
-
Field Details
-
ITEMS
-
BLOCKS
-
ENTITIES
-
-
Constructor Details
-
TagType
- Parameters:
pattern
- The pattern to use when constructing the selection Skript pattern.type
- The class this tag type applies to.
-
TagType
- Parameters:
pattern
- The pattern to use when constructing the selection Skript pattern.toString
- The string to use when printing a toString.type
- The class this tag type applies to.
-
-
Method Details
-
pattern
-
type
-
toString
-
addType
Adds types to the registered tag types.- Parameters:
type
- The types to add.
-
getTypes
- Returns:
- An unmodifiable list of all the registered types.
-
getType
Gets tag types by index. If a negative value is used, gets all the tag types.- Parameters:
i
- The index of the type to get.- Returns:
- The type at that index, or all tags if index invalid input: '<' 0.
-
fromParseMark
Gets tag types by parser mark. Equivalent togetType(i - 1)
.- Parameters:
i
- The index of the type to get.- Returns:
- The type at that index, or all tags if index invalid input: '<' 0.
- See Also:
-
getFullPattern
- Returns:
- Returns an optional choice pattern for use in Skript patterns. Contains parse marks.
Pass the parse mark to
fromParseMark(int)
to get the selected tag type inSyntaxElement.init(Expression[], int, Kleenean, SkriptParser.ParseResult)
.
-
getFullPattern
- Parameters:
required
- whether the choice should be optional or required.- Returns:
- Returns a choice pattern for use in Skript patterns. Contains parse marks.
Pass the parse mark to
fromParseMark(int)
to get the selected tag type inSyntaxElement.init(Expression[], int, Kleenean, SkriptParser.ParseResult)
.
-