Wale
  • Welcome!
  • General
    • Getting Started
    • Requirements
    • Detailed plan overview
    • FAQ
  • Wale Documentation
    • Installation
    • Master Configuration
    • Templates
    • Nodes
    • Teams
  • API Documentation
    • Getting Started
    • Events
      • Node Notification
      • Service Notification
      • Network Full
      • Channel Message
    • Listener
    • Executors
      • Channel Executor
      • Player Executor
      • Service Executor
  • Getting Support
    • Discord
    • Tickets
Powered by GitBook
On this page
  • How do I import the API?
  • How do I now use the API in my project?
  1. API Documentation

Getting Started

Here we explain how to use the Wale API correctly.

PreviousTeamsNextEvents

Last updated 1 year ago

How do I import the API?

To integrate the Wale API into your project, we recommend using Gradle or Maven. Do not shade it.

  1. First, you need to register the repository server by using the following URL:

maven {
    name "waleRepositoryReleases"
    url "https://repo.walecloud.com/releases"
}
<repositories>
    <repository>
        <id>waleRepositoryReleases</id>
        <name>waleRepositoryReleases</name>
        <url>https://repo.walecloud.com/releases</url>
    </repository>
</repositories>
  1. After that, add the dependency to your project.

You can always check the latest version on the . For this documentation, version 1.5.8 is used.

dependencies {
    compileOnly "at.stefan:wale-api:VERSION"
}
<dependencies>
    <dependency>
        <groupId>at.stefan</groupId>
        <artifactId>wale-api</artifactId>
        <version>VERSION</version>
        <scope>provided</scope>
    </dependency>
</dependencies>

Important: Do not shade the API yourself; depend on the Wale plugin, which always includes the latest API version.

How do I now use the API in my project?

Create only one instance per plugin. If you have multiple plugins using the API, try to create only one instance and centralize it, as it can save on traffic.

// An example of how to initialize the API
public class Test extends JavaPlugin {
    
    @Getter
    private WaleAPI waleAPI;
    
    @Override
    public void onEnable() {
        waleAPI = new WaleAPI();
    }
}
repository server