public interface MCLeaksAPI
Modifier and Type | Interface and Description |
---|---|
static class |
MCLeaksAPI.Builder
Builder for creating a MCLeaks checker
|
static class |
MCLeaksAPI.Result
Data storage for the response of the MCLeaks API
|
Modifier and Type | Method and Description |
---|---|
static MCLeaksAPI.Builder |
builder()
Begins building a new MCLeaks API
|
MCLeaksAPI.Result |
checkAccount(String username)
Checks an account blocking the thread that invoked the method
Recommended to use checkAccount(UUID) |
void |
checkAccount(String username,
Consumer<Boolean> callback,
Consumer<Throwable> errorHandler)
Checks whether the specified name is an MCLeaks account
Recommended to use checkAccount(UUID) |
MCLeaksAPI.Result |
checkAccount(UUID uuid)
Checks an account blocking the thread that invoked the method
|
void |
checkAccount(UUID uuid,
Consumer<Boolean> callback,
Consumer<Throwable> errorHandler)
Checks whether the specified name is an MCLeaks account
|
Optional<Boolean> |
getCachedCheck(String username)
Gets either a boolean from the cache or null if not yet cache'd
Will also return null if the
MCLeaksAPI.Builder.nocache() option was used |
Optional<Boolean> |
getCachedCheck(UUID uuid)
Gets either a boolean from the cache or null if not yet cache'd
Will also return null if the
MCLeaksAPI.Builder.nocache() option was used |
void |
shutdown()
Shuts down the API and prevents further requests
|
void checkAccount(String username, Consumer<Boolean> callback, Consumer<Throwable> errorHandler)
checkAccount(UUID)
username
- The name to checkcallback
- Handle the processed resulterrorHandler
- Handle any errors that have occuredMCLeaksAPI.Result checkAccount(String username)
checkAccount(UUID)
username
- The name to checkOptional<Boolean> getCachedCheck(String username)
MCLeaksAPI.Builder.nocache()
option was usedusername
- The username to find in the cachevoid checkAccount(UUID uuid, Consumer<Boolean> callback, Consumer<Throwable> errorHandler)
uuid
- The uuid to checkcallback
- Handle the processed resulterrorHandler
- Handle any errors that have occuredMCLeaksAPI.Result checkAccount(UUID uuid)
uuid
- The name to checkOptional<Boolean> getCachedCheck(UUID uuid)
MCLeaksAPI.Builder.nocache()
option was useduuid
- The UUID to find in the cachevoid shutdown()
static MCLeaksAPI.Builder builder()
Copyright © 2017. All rights reserved.