Package noppes.npcs.api.handler
Interface IPlayerTransportData
-
public interface IPlayerTransportDataTracks which transport locations a player has unlocked.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddTransport(int id)Unlocks a transport location by ID.voidaddTransport(ITransportLocation location)Unlocks the given transport location.ITransportLocationgetTransport(int id)Returns the transport location with the given ID.ITransportLocation[]getTransports()Returns all unlocked transport locations for the player.booleanhasTransport(int id)voidremoveTransport(int id)Removes an unlocked transport location by ID.
-
-
-
Method Detail
-
hasTransport
boolean hasTransport(int id)
- Parameters:
id- the transport location ID.- Returns:
- true if the player has unlocked this transport.
-
addTransport
void addTransport(int id)
Unlocks a transport location by ID.- Parameters:
id- the transport location ID.
-
addTransport
void addTransport(ITransportLocation location)
Unlocks the given transport location.- Parameters:
location- the transport location.
-
getTransport
ITransportLocation getTransport(int id)
Returns the transport location with the given ID.- Parameters:
id- the transport location ID.- Returns:
- the transport location, or null if not found.
-
getTransports
ITransportLocation[] getTransports()
Returns all unlocked transport locations for the player.- Returns:
- an array of transport locations.
-
removeTransport
void removeTransport(int id)
Removes an unlocked transport location by ID.- Parameters:
id- the transport location ID.
-
-