307f890b52d37f3d0d2d391fb44ed5107293785c
Quick fix for having the author displayed as null due to an invalid bungee.yml. This could prevent the plugin from being loaded through external Bungee plugin managers :)
escape backslashes and dollarsigns correctly, fixed #3 and add event to cancel or change the format programmatically
StaffChat
Simple and highly configurable staffchat
Download
You can download the plugin from the Spigot resource page or via the GitHub releases
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.