API Documentation for Developers

Documentation for Developers:

EMP 3.0.0 introduces the EnjinServices API. Implementations of the Service interface can be accessed with EnjinServices.getService(Class<T extends Service> service) method. The available services are:

  1. BungeeCordService
  2. MinecraftService
  3. PluginService
  4. PointService
  5. ShopService
  6. TicketService
  7. VoteService

1) BungeeCordService

get(Status status, Map<String, NodeState servers>)

returns RPCData<SyncResponse>

 

2) MinecraftService

getServers()

returns RPCData<List<ServerInfo>>

getPlayers(int serverId, Optional<List<String>> names, Optional<List<String>> uuids)

returns RPCData<List<MinecraftPlayerInfo>>

 

3) PluginService

auth(Optional<String> authkey, Integer port, boolean save)

returns RPCData<Boolean>

sync(Status status)

returns RPCData<SyncResponse>

getTags(String player)

returns RPCData<List<TagData>>

setRank(String player, String group, String world)

returns RPCData<Boolean>

removeRank(String player, String group, String world)

returns RPCData<Boolean>

getStats(Optional<List<Integer>> items)

returns RPCData<Stats>

 

4) PointService

get(String player)

returns RPCData<Integer>

getRecent(Optional<Integer> seconds)

returns RPCData<Map<Long, Integer>>

set(String player, int points)

returns RPCData<Integer>

add(String player, int points)

returns RPCData<Integer>

remove(String player, int points)

returns RPCData<Integer>

 

5) ShopService

get(String player)

returns RPCData<List<Shop>>

getPurchases(String player, boolean commands)

returns RPCData<List<Purchase>>

getItems(String player)

returns RPCData<List<FilteredItem>>

purchase(

String player,

int itemId,

Optional<Map<Integer, String>> variables,

Optional<Integer> customPoints,

Optional<Integer> customPrice,

boolean ignoreMessages

)

returns RPCData<Integer>

 

6) TicketService

getPlayerTickets(int preset, String player)

returns RPCData<List<Ticket>>

getTickets(int preset, TicketStatus status)

returns RPCData<List<Ticket>>

getModules()

returns RPCData<Map<Integer, Module>>

setStatus(int preset, String code, TicketStatus status)

returns RPCData<Boolean>

getPlayerAccess(int preset, String player)

returns RPCData<PlayerAccess>

getReplies(int preset, String code, String player)

returns RPCData<List<Reply>>

createTicket(

int preset,

String subject,

String description,

String player,

List<ExtraQuestion> extraQuestions

)

returns RPCData<Boolean>

sendReply(

int preset,

String code,

String text,

String mode,

TicketStatus status,

String player

)

returns RPCData<RPCSuccess>

 

7) VoteService

get(Map<String, List<Object[]>> votes)

returns RPCData<String>

Was this article helpful?
1 out of 1 found this helpful