Building the API client library requires Maven to be installed.
To install the API client library to your local Maven repository, simply execute:
mvn installTo deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
mvn deployRefer to the official documentation for more information.
Add this dependency to your project's POM:
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-java-client</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>Add this dependency to your project's build file:
compile "io.swagger:swagger-java-client:1.0.0"At first generate the JAR by executing:
mvn package
Then manually install the following JARs:
- target/swagger-java-client-1.0.0.jar
- target/lib/*.jar
Please follow the installation instruction and execute the following Java code:
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ActiveTimeApi;
import java.io.File;
import java.util.*;
public class ActiveTimeApiExample {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: ApiKeyHeader
ApiKeyAuth ApiKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyHeader");
ApiKeyHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyHeader.setApiKeyPrefix("Token");
// Configure API key authorization: ApiKeyQuery
ApiKeyAuth ApiKeyQuery = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyQuery");
ApiKeyQuery.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyQuery.setApiKeyPrefix("Token");
ActiveTimeApi apiInstance = new ActiveTimeApi();
Boolean details = true; // Boolean | Add to include additional details, omit or false otherwise
String accept = "accept_example"; // String | Override the 'Accept' request header (useful for debugging your requests)
Boolean pretty = true; // Boolean | Add to make the Web-API pretty print the response (useful for debugging your requests)
try {
ServerReport result = apiInstance.getServerReport(details, accept, pretty);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ActiveTimeApi#getServerReport");
e.printStackTrace();
}
}
}All URIs are relative to https://localhost/api/v5
| Class | Method | HTTP request | Description |
|---|---|---|---|
| ActiveTimeApi | getServerReport | GET /active-time | Server report |
| ActiveTimeApi | getUserReport | GET /active-time/user/{uuid} | User report |
| BlockApi | createBlockOperation | POST /block/op | Create a block operation |
| BlockApi | deleteBlockOperation | DELETE /block/op/{uuid} | Stop a block operation |
| BlockApi | getBlock | GET /block/{world}/{x}/{y}/{z} | Get a block |
| BlockApi | getBlockOperation | GET /block/op/{uuid} | Get a block operation |
| BlockApi | listBlockOperations | GET /block/op | List block operations |
| BlockApi | modifyBlockOperation | PUT /block/op/{uuid} | Modify a block operation |
| ChunkApi | createChunkAt | POST /chunk/{world}/{x}/{z} | Load & Generate a chunk |
| ChunkApi | getChunkAt | GET /chunk/{world}/{x}/{z} | Get a chunk |
| ChunkApi | listChunks | GET /chunk/{world} | List chunks |
| CmdSchedulerApi | deleteTask | DELETE /cmd-scheduler/{name} | Delete a task |
| CmdSchedulerApi | listTasks | GET /cmd-scheduler | List tasks |
| CommandApi | getCommand | GET /cmd/{cmd} | Get a command |
| CommandApi | listCommands | GET /cmd | List commands |
| CommandApi | runCommands | POST /cmd | Execute a command |
| EconomyApi | getAccount | GET /economy/account/{id} | List currencies |
| EconomyApi | getCurrencies | GET /economy/currency | List currencies |
| EntityApi | createEntity | POST /entity | Spawn an entity |
| EntityApi | executeMethod | POST /entity/{entity}/method | Execute a method |
| EntityApi | getEntity | GET /entity/{entity} | Get entity |
| EntityApi | listEntities | GET /entity | List entities |
| EntityApi | modifyEntity | PUT /entity/{entity} | Modify an entity |
| EntityApi | removeEntity | DELETE /entity/{entity} | Destroy an entity |
| GwmCratesApi | listCrates | GET /gwm-crates/manager | List managers |
| HistoryApi | getChat | GET /history/message | Get message history |
| HistoryApi | getCommands | GET /history/cmd | Get command history |
| HuskyCratesApi | createCrate | POST /husky-crates/crate | Create a crate |
| HuskyCratesApi | deleteCrate | DELETE /husky-crates/crate/{id} | Delete a crate |
| HuskyCratesApi | getCrate | GET /husky-crates/crate/{id} | Get a crate |
| HuskyCratesApi | listCrates | GET /husky-crates/crate | List crates |
| HuskyCratesApi | modifyCrate | PUT /husky-crates/crate/{id} | Change a crate |
| InfoApi | getInfo | GET /info | Server info |
| InfoApi | getStats | GET /info/stats | Server stats |
| InfoApi | listServlets | GET /info/servlets | List servlets |
| InteractiveMessageApi | getMessage | GET /interactive-message/{uuid} | Get a message |
| InteractiveMessageApi | listMessages | GET /interactive-message | List messages |
| InteractiveMessageApi | sendMessage | POST /interactive-message | Send a message |
| MapApi | getMap | GET /map/{world}/{x}/{z} | Get a map tile |
| MmcRestrictApi | addItem | POST /mmc-restrict/item | Add an item |
| MmcRestrictApi | deleteItem | DELETE /mmc-restrict/item/{id} | Delete an item |
| MmcRestrictApi | listItems | GET /mmc-restrict/item | List items |
| MmcRestrictApi | modifyItem | PUT /mmc-restrict/item/{id} | Modify an item |
| MmcTicketsApi | getTicket | GET /mmc-tickets/ticket/{id} | Get a ticket |
| MmcTicketsApi | listTickets | GET /mmc-tickets/ticket | List tickets |
| MmcTicketsApi | modifyTicket | PUT /mmc-tickets/ticket/{id} | Modify a ticket |
| NucleusApi | createJail | POST /nucleus/jail | Create a jail |
| NucleusApi | createKit | POST /nucleus/kit | Create a kit |
| NucleusApi | deleteJail | DELETE /nucleus/jail/{name} | Delete a jail |
| NucleusApi | deleteKit | DELETE /nucleus/kit/{name} | Delete a kit |
| NucleusApi | getJail | GET /nucleus/jail/{name} | Get a jail |
| NucleusApi | getKit | GET /nucleus/kit/{name} | Get a kit |
| NucleusApi | listHomes | GET /nucleus/home/{player} | List homes |
| NucleusApi | listJails | GET /nucleus/jail | List jails |
| NucleusApi | listKits | GET /nucleus/kit | List kits |
| NucleusApi | listMail | GET /nucleus/mail/{player} | List mail |
| NucleusApi | listMail_0 | GET /nucleus/module | List modules |
| NucleusApi | modifyJail | PUT /nucleus/jail/{name} | Modify a jail |
| NucleusApi | modifyKit | PUT /nucleus/kit/{name} | Modify a kit |
| PermissionApi | getCollection | GET /permission/collection/{id} | Get collection |
| PermissionApi | getSubject | GET /permission/collection/{id}/subject/{subId} | Get subject |
| PermissionApi | listCollections | GET /permission/collection | List collections |
| PermissionApi | listSubjects | GET /permission/collection/{id}/subject | List subjects |
| PlayerApi | executeMethod | POST /player/{player}/method | Execute a method |
| PlayerApi | getPlayer | GET /player/{player} | Get a player |
| PlayerApi | listPlayers | GET /player | List players |
| PlayerApi | modifyPlayer | PUT /player/{player} | Modify a player |
| PluginApi | changePluginConfig | POST /plugin/{plugin}/config | Change plugin configs |
| PluginApi | getPlugin | GET /plugin/{plugin} | Get a plugin |
| PluginApi | getPluginConfig | GET /plugin/{plugin}/config | Get plugin configs |
| PluginApi | listPlugins | GET /plugin | List plugins |
| PluginApi | togglePlugin | PUT /plugin/{plugin} | Toggle a plugin |
| RecipeApi | listRecipes | GET /recipe | List recipes |
| RedProtectApi | createRegion | POST /red-protect/region | Create a region |
| RedProtectApi | deleteRegion | DELETE /red-protect/region/{id} | Delete a region |
| RedProtectApi | getRegion | GET /red-protect/region/{id} | Get a region |
| RedProtectApi | listRegions | GET /red-protect/region | List regions |
| RedProtectApi | modifyRegion | PUT /red-protect/region/{id} | Modify a region |
| RegistryApi | getRegistry | GET /registry/{class} | Get a catalog type |
| ServerApi | listProperties | GET /server/properties | List server properties |
| ServerApi | modifyProperties | PUT /server/properties | Modify server properties |
| TileEntityApi | executeMethod | POST /tile-entity/{world}/{x}/{y}/{z}/method | Execute a method |
| TileEntityApi | getTileEntity | GET /tile-entity/{world}/{x}/{y}/{z} | Get tile entity |
| TileEntityApi | listTileEntities | GET /tile-entity | List tile entities |
| TileEntityApi | modifyTileEntity | PUT /tile-entity/{world}/{x}/{y}/{z} | Modify tile entity |
| UniversalMarketApi | listMarketItems | GET /universal-market/item | List items |
| UserApi | createUser | POST /user | Create a user |
| UserApi | deleteUser | DELETE /user/{name} | Delete a user |
| UserApi | getMe | GET /user/me | Check info |
| UserApi | getUsers | GET /user | List users |
| UserApi | login | POST /user/login | Login |
| UserApi | logout | POST /user/logout | Logout |
| UserApi | logoutRedirect | GET /user/logout | |
| UserApi | modifyUser | PUT /user/{name} | Update a user |
| WebBooksApi | createWebBook | POST /web-books/book | Create a book |
| WebBooksApi | deleteWebBook | DELETE /web-books/book/{id} | Delete a book |
| WebBooksApi | getWebBook | GET /web-books/book/{id} | Get a book |
| WebBooksApi | getWebBookContent | GET /web-books/book/{id}/html | Book HTML |
| WebBooksApi | getWebBookContentPost | POST /web-books/book/{id}/html | Book HTML |
| WebBooksApi | listWebBooks | GET /web-books/book | List books |
| WebBooksApi | modifyWebBook | PUT /web-books/book/{id} | Modify a book |
| WorldApi | createWorld | POST /world | Create a world |
| WorldApi | deleteWorld | DELETE /world/{world} | Delete a world |
| WorldApi | executeMethod | POST /world/{world}/method | Execute a method |
| WorldApi | getWorld | GET /world/{world} | Get a world |
| WorldApi | listWorlds | GET /world | List worlds |
| WorldApi | modifyWorld | PUT /world/{world} | Modify a world |
- AcceptsItems
- Account
- Advancement
- AgeableData
- ArmorSlotType
- ArmorStandData
- AuthenticationRequest
- BannerData
- BeaconData
- BlockOperation
- BlockState
- BreathingData
- BrewingStandData
- CachedObject
- Career
- CatalogType
- CatalogTypeAdvancementTree
- CatalogTypeDifficulty
- CatalogTypeDimensionType
- CatalogTypeGameMode
- CatalogTypeGeneratorType
- CatalogTypeInventoryArchetype
- CatalogTypeItemType
- CatalogTypeSoundType
- CatalogTypeWeather
- Cause
- Chunk
- Color
- Command
- CommandCall
- CommandData
- CommandResult
- CommandTask
- CreateBlockOperationRequest
- CreateEntityRequest
- CreateUserRequest
- CreateWorldRequest
- Currency
- DamageRequest
- DamageableData
- DespawnDelayData
- DurabilityData
- DyeColor
- Enchantment
- EndGatewayData
- Entity
- EntityArchtype
- EntitySnapshot
- EquipmentSlotType
- ExecuteCommandRequest
- ExecuteCommandResponse
- ExecuteMethodParam
- ExecuteMethodRequest
- ExecuteMethodResponse
- ExperienceHolderData
- FallingBlockData
- FireworkEffect
- FireworkRocketData
- FluidStack
- FoodData
- FurnaceData
- FuseData
- GameMode
- GrowthData
- GuiIdProperty
- HealthData
- HideData
- HorseData
- HuskyCratesCrate
- HuskyCratesCrateReward
- HuskyCratesCrateRewardObject
- Identifiable
- IgniteableData
- InlineResponse400
- InlineResponse401
- InlineResponse403
- InlineResponse404
- InlineResponse500
- InlineResponse501
- InteractiveMessage
- InteractiveMessageOption
- Inventory
- InventoryCapacity
- InventoryDimension
- InventoryTitle
- InvisibilityData
- InvulnerabilityData
- ItemStack
- JoinData
- LeashData
- Location
- MMCRestrictItem
- MMCTicketsTicket
- Message
- MinecartBlockData
- MobSpawnerData
- ModifyBlockOperationRequest
- ModifyUserRequest
- NucleusKit
- NucleusMailMessage
- NucleusNamedLocation
- PatternLayer
- PermissionStruct
- PickupDelayData
- Player
- PluginContainer
- PluginDependency
- PotionEffect
- RedProtectRegion
- Schedule
- ServerInfo
- ServerProperty
- ServerReport
- ServerStat
- ServerStatDouble
- ServerStatInteger
- ServerStats
- SlimeData
- Slot
- SlotIndex
- SlotPos
- SlotRequest
- SlotSide
- Stat
- StructureData
- Subject
- SubjectCollection
- TableEntry
- TableEntryEntityArchetype
- TameableData
- TileEntity
- TimeHolder
- TradeOffer
- Transform
- UniversalMarketItem
- UpdateEntityRequest
- UpdatePlayerRequest
- UpdateTileEntityRequest
- UpdateWorldRequest
- UserPermissionStruct
- UserReport
- Vector2i
- Vector3d
- Vector3i
- VehicleData
- WebBooksBook
- WireAttachmentData
- World
- WorldBorder
- BlockChangeOperation
- BlockGetOperation
- ChatMessage
- HuskyCratesCommandReward
- HuskyCratesItemReward
Authentication schemes defined for the API:
- Type: API key
- API key parameter name: X-WebAPI-Key
- Location: HTTP header
- Type: API key
- API key parameter name: key
- Location: URL query string
It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.