StaffChat
Simple and highly configurable staffchat
Download
You can download the plugin from the Spigot resource page or via the GitHub releases
License
This plugin is licensed with the MIT License, for more information see the LICENSE file
Building
To build this yourself just clone the repository and run the shadowJar
task with the Gradle Wrapper
Windows
git clone git@github.com:oskar3123/StaffChat.git
cd StaffChat
gradlew.bat shadowJar
*nix (Linux, FreeBSD, macOS, …)
git clone git@github.com:oskar3123/StaffChat.git
cd StaffChat
./gradlew shadowJar
Event API (For developers)
Bukkit/Spigot
Because the event API in 1.14+ is now strict between sync and async events you should check whether this was called synchronously or asynchronously by using event.isAsynchronous()
public class StaffChatListener implements Listener
{
@EventHandler
public void onStaffChat(StaffChatEvent event)
{
// String format = event.getFormat();
// event.setFormat("&b{NAME} >> {MESSAGE}");
// String message = event.getMessage();
// Player player = event.getPlayer();
// event.setCancelled(true);
}
}
Register the listener with
getServer().getPluginManager().registerEvents(new StaffChatListener(), this);
in your plugin onEnable.
BungeeCord
public class StaffChatListener implements Listener
{
@EventHandler
public void onStaffChat(BungeeStaffChatEvent event)
{
// String format = event.getFormat();
// event.setFormat("&b{NAME} >> {MESSAGE}");
// String message = event.getMessage();
// Player player = event.getPlayer();
// event.setCancelled(true);
}
}
Register the listener with
getProxy().getPluginManager().registerListener(this, new StaffChatListener());
in your plugin onEnable.