BungeeIPC is a set of APIs and plugins meant for BungeeCord proxies and their backend Bukkit Minecraft Servers. It allows other plugins to use the API to send messages between the servers and proxy without relying on the built-in Minecraft/BungeeCord channels.
You can obtain a copy of BungeeIPC via the following methods:
- Download a pre-built copy from the Releases page. The latest version is release 3.1.0.
- Build from source (see below).
If you need to use BungeeIPC as a dependency for your project, please see the Development API section below.
BungeeIPC uses Apache Maven to build and handle dependencies.
- Java Development Kit (JDK) 8 or higher
- Git
- Apache Maven
Run the following commands to build the plugins:
git clone https://github.com/bspfsystems/BungeeIPC.git
cd BungeeIPC/
mvn clean install
The .jar
files will be located in the bukkit/target/
folder for the Bukkit plugin, and the bungeecord/target/
folder for the BungeeCord plugin.
Please see USAGE.md for more information on installation and in-game usage.
The main purpose of BungeeIPC is to facilitate sending messages between BungeeCord and Bukkit for downstream plugins. Several API modules have been created that can be used by any downstream plugins to access the capabilities in BungeeIPC.
To add BungeeIPC as a dependency to your project, use one of the following common methods (you may use others that exist, these are the common ones):
Maven:
Include the following in your pom.xml
file:
<repositories>
<repository>
<id>sonatype-repo</id>
<url>https://oss.sonatype.org/content/repositories/releases/</url>
</repository>
</repositories>
<!-- For both Bukkit and BungeeCord -->
<dependencies>
<dependency>
<groupId>org.bspfsystems.bungeeipc</groupId>
<artifactId>bungeeipc-common-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
<!-- For Bukkit -->
<dependencies>
<dependency>
<groupId>org.bspfsystems.bungeeipc</groupId>
<artifactId>bungeeipc-client-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
<!-- For BungeeCord -->
<dependencies>
<dependency>
<groupId>org.bspfsystems.bungeeipc</groupId>
<artifactId>bungeeipc-server-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
Gradle:
Include the following in your build.gradle
file:
repositories {
maven {
url "https://oss.sonatype.org/content/repositories/releases/"
}
}
// For both Bukkit and BungeeCord
dependencies {
compileOnly "org.bspfsystems.bungeeipc:bungeeipc-common-api:3.1.0"
}
// For Bukkit
dependencies {
compileOnly "org.bspfsystems.bungeeipc:bungeeipc-client-api:3.1.0"
}
// For BungeeCord
dependencies {
compileOnly "org.bspfsystems.bungeeipc:bungeeipc-server-api:3.1.0"
}
Please Note: The above examples show both the client-side and server-side APIs as dependencies for their common sides (Bukkit or BungeeCord). You will only need the one specific to the side you are using. You will also need bungee-common-api
regardless of which side you are developing on.
These are some basic usages of BungeeIPC; for a full scope of what the plugins offer, please see the Javadocs section below.
// Obtain the common instance of BungeeIPC
IPCPlugin ipcPlugin = (IPCPlugin) Bukkit.getPluginManager().getPlugin("BungeeIPC"); // For Bukkit
IPCPlugin ipcPlugin = (IPCPlugin) ProxyServer.getPluginManager().getPlugin("BungeeIPC"); // For BungeeCord
// Add an implementation of an IPCReader, registered to the channel "example_channel"
ipcPlugin.addReader("example_channel", exampleIPCReader);
// Send a previously-create IPCMessage
ipcPlugin.sendMessage(ipcMessage);
////////////////////////////////////////////////////////////////
// Obtain the Bukkit-specific instance of BungeeIPC (usually the client)
IPCClientPlugin ipcClientPlugin = (IPCClientPlugin) Bukkit.getPluginManager().getPlugin("BungeeIPC");
// Check if the client is connected, and attempts to restart it if it is not
if (!ipcClientPlugin.isConnected()) {
ipcClientPlugin.restartClient();
}
////////////////////////////////////////////////////////////////
// Obtain the BungeeCord-specific instance of BungeeIPC (usually the server)
IPCServerPlugin ipcServerPlugin = (IPCServerPlugin) ProxyServer.getPluginManager().getPlugin("BungeeIPC");
// Check if a server with the name "exampleserver" is registered and connected, and attempts to restart it if it is not
if (ipcServerPlugin.isRegisteredServer("exampleserver") && !ipcServerPlugin.isServerConnected("exampleserver")) {
ipcServerPlugin.restartServer("exampleserver");
}
The API Javadocs can be found here, kindly hosted by javadoc.io.
Please check out CONTRIBUTING.md for more information.
BungeeIPC uses the following licenses for the respective modules:
- Common / Client / Server APIs - The Apache License, Version 2.0
- Bukkit / BungeeCord - The GNU General Public License, Version 3
Contributions to the project will remain licensed under the respective module's license, as defined by the particular license. Copyright/ownership of the contributions shall be governed by the license. The use of an open source license in the hopes that contributions to the project will have better clarity on legal rights of those contributions.
Please Note: This is not legal advice. If you are unsure on what your rights are, please consult a lawyer.