ComuCator
This API is there to send Messages without any limitations. You can use it even if no Players are online or if you won't use Minecraft Threads to handle much Messages.
!!! Also works in Bukkit/Spigot !!!
You will find the BungeeCord Version in this Resource.
The Bukkit Version is on Jenkins.
Jenkins: http://jenkins.cube-space.net/job/ComuCator/
You will find the BungeeCord Version in this Resource.
The Bukkit Version is on Jenkins.
Jenkins: http://jenkins.cube-space.net/job/ComuCator/
Maven:
Repository: http://nexus.cube-space.net/content/groups/public/
Code (Text):
<dependency>
<groupId>net.cubespace</groupId>
<artifactId>ComuCator-Core</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<groupId>net.cubespace</groupId>
<artifactId>ComuCator-Core</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
You need to define Messages which you want to send over the Network. There is a AbstractMessage which need to be implemented. Here is a example of a Message:
Code (Text):
@Channel("Test")
public class TestPacket extends AbstractMessage {
@Getter
@Setter
private String test;
public TestPacket() {}
@Override
public Message write(DataOutputStream outputStream) {
try {
DefinedPacket.writeString(test, outputStream);
} catch (IOException e) {
Logger.error("Could not write Message :(");
}
return this;
}
@Override
public Message read(DataInputStream inputStream) {
try {
test = DefinedPacket.readString(inputStream);
} catch (IOException e) {
Logger.error("Could not read Message :(");
}
return this;
}
}
public class TestPacket extends AbstractMessage {
@Getter
@Setter
private String test;
public TestPacket() {}
@Override
public Message write(DataOutputStream outputStream) {
try {
DefinedPacket.writeString(test, outputStream);
} catch (IOException e) {
Logger.error("Could not write Message :(");
}
return this;
}
@Override
public Message read(DataInputStream inputStream) {
try {
test = DefinedPacket.readString(inputStream);
} catch (IOException e) {
Logger.error("Could not read Message :(");
}
return this;
}
}
Now you need to register the Packet via the PacketManager:
Code (Text):
PacketManager.registerPacket(TestPacket.class);
Code (Text):
TestPacket testPacket = new TestPacket();
testPacket.setTest("test");
testPacket.send();
testPacket.setTest("test");
testPacket.send();
A listener looks like this:
Code (Text):
@Channel("Test")
public class TestListener extends AbstractPacketListener {
@PacketHandler
public void onTestMessage(TestPacket testPacket) {
}
}
public class TestListener extends AbstractPacketListener {
@PacketHandler
public void onTestMessage(TestPacket testPacket) {
}
}
Code (Text):
PacketManager.registerListener(new TestListener());
Development and Support
▬ ▬ ▬ ▬ ▬ ▬ ▬ ▬ ▬ ▬ ▬ ▬ ▬ ▬ ▬ ▬ ▬ ▬
The fastest way to get support is via IRC. Join #geNAZt on Esper.net.
▬ ▬ ▬ ▬ ▬ ▬ ▬ ▬ ▬ ▬ ▬ ▬ ▬ ▬ ▬ ▬ ▬ ▬
I will create some Tutorials in the Wiki: http://www.spigotmc.org/wiki/genazt-s-plugins/. If you want to help me go ahead
If you found a Bug please make sure you have a Reportfile about it. It makes lifes easier
In case you found a problem / bug or have a feature request, don't hesitate to let us know! If you are a developer, you can find the source of this plugin on geNAZt's GitHub profile. Development builds can be found on our Jenkins system.
Current Build Status:
If you like what i do and want to spend me a Cookie:
![[IMG]](http://proxy.spigotmc.org/544b47f0d72019ba8f35e18fe60f06aa43a7e2dd?url=http%3A%2F%2Freachcastshow.com%2Ffiles%2F2013%2F01%2Fpaypal-donate-button.png)
Quick facts
- Edition: Minecraft Java
- File type: .jar
- How to install: Install the matching mod loader (Forge, Fabric or NeoForge) for your Minecraft version. → Download the .jar. → Put it in the .minecraft/mods folder and launch that loader profile.
- Where to get it: Opens on Spigot — not every file is mirrored on our own servers.
Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.
ComuCator is a free Minecraft Java mod. Downloaded 2,254 times (via Spigot). Download it and open it directly in the game.