Package noppes.npcs.api.handler
Interface IOverlayHandler
-
public interface IOverlayHandlerManages skin overlays applied to an entity or player. Overlays are indexed by ID and rendered on top of the base skin.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidadd(int id, ISkinOverlay overlay)Adds or replaces an overlay at the given ID.voidclear()Removes all overlays.ISkinOverlayget(int id)Returns the overlay at the given ID.booleanhas(int id)Checks whether an overlay exists at the given ID.booleanremove(int id)Removes the overlay at the given ID.intsize()Returns the number of active overlays.
-
-
-
Method Detail
-
add
void add(int id, ISkinOverlay overlay)Adds or replaces an overlay at the given ID.- Parameters:
id- the overlay ID.overlay- the skin overlay to add.
-
get
ISkinOverlay get(int id)
Returns the overlay at the given ID.- Parameters:
id- the overlay ID.- Returns:
- the skin overlay, or null if not found.
-
has
boolean has(int id)
Checks whether an overlay exists at the given ID.- Parameters:
id- the overlay ID.- Returns:
- true if an overlay exists; false otherwise.
-
remove
boolean remove(int id)
Removes the overlay at the given ID.- Parameters:
id- the overlay ID.- Returns:
- true if an overlay was removed; false otherwise.
-
size
int size()
Returns the number of active overlays.- Returns:
- the overlay count.
-
clear
void clear()
Removes all overlays.
-
-