Package me.hsgamer.timedtopper.api
Interface TimedTopperAPI
public interface TimedTopperAPI
The API of TimedTopper
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final AtomicReference
<TimedTopperAPI> The reference of the instance of the API -
Method Summary
Modifier and TypeMethodDescriptionGet the data of the holderGet the data of a unique id in the holderGet the name of the available holdersstatic TimedTopperAPI
Get the instance of the APIgetTimeRange
(String holder) Get the time range of the holderboolean
Check if the holder exists
-
Field Details
-
INSTANCE
The reference of the instance of the API
-
-
Method Details
-
getInstance
Get the instance of the API- Returns:
- the instance of the API
-
getHolders
Collection<String> getHolders()Get the name of the available holders- Returns:
- the holder names
-
hasHolder
Check if the holder exists- Parameters:
holder
- the holder- Returns:
- true if it does
-
getData
Get the data of the holder- Parameters:
holder
- the holder- Returns:
- the data
-
getData
Get the data of a unique id in the holder- Parameters:
holder
- the holderuuid
- the unique id- Returns:
- the data, or empty if the id doesn't exist
- Throws:
NullPointerException
- if the holder doesn't exist
-
getTimeRange
Get the time range of the holder- Parameters:
holder
- the holder- Returns:
- the time range
- Throws:
NullPointerException
- if the holder doesn't exist
-