Package noppes.npcs.api.handler
Interface ITagHandler
-
public interface ITagHandlerHandles creation, deletion, and retrieval of tags. Tags are labels that can be applied to entities for categorization.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ITagcreate(String name, int color)Creates a new tag with the given name and color.ITagdelete(int id)Deletes the tag with the given ID.ITagget(int id)Returns the tag with the given ID.List<ITag>list()Returns all registered tags.
-
-
-
Method Detail
-
delete
ITag delete(int id)
Deletes the tag with the given ID.- Parameters:
id- the tag ID.- Returns:
- the deleted tag, or null if not found.
-
create
ITag create(String name, int color)
Creates a new tag with the given name and color.- Parameters:
name- the tag name.color- the tag color as a packed RGB integer.- Returns:
- the created tag.
-
get
ITag get(int id)
Returns the tag with the given ID.- Parameters:
id- the tag ID.- Returns:
- the tag, or null if not found.
-
-