mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-11-24 19:25:15 +01:00
Add disable API for chat-to-web processing (for mods to replace it)
This commit is contained in:
parent
cac8527d76
commit
b0ca796213
@ -233,13 +233,11 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
|||||||
@Override
|
@Override
|
||||||
public boolean sendWebChatEvent(String source, String name, String msg) {
|
public boolean sendWebChatEvent(String source, String name, String msg) {
|
||||||
DynmapWebChatEvent evt = new DynmapWebChatEvent(source, name, msg);
|
DynmapWebChatEvent evt = new DynmapWebChatEvent(source, name, msg);
|
||||||
Log.info("sendWebChatEvent(" + msg + ")");
|
|
||||||
getServer().getPluginManager().callEvent(evt);
|
getServer().getPluginManager().callEvent(evt);
|
||||||
return (evt.isCancelled() == false);
|
return ((evt.isCancelled() == false) && (evt.isProcessed() == false));
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public void broadcastMessage(String msg) {
|
public void broadcastMessage(String msg) {
|
||||||
Log.info("broadcastMessage(" + msg + ")");
|
|
||||||
getServer().broadcastMessage(msg);
|
getServer().broadcastMessage(msg);
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
@ -1052,4 +1050,9 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
|||||||
Plugin plugin) {
|
Plugin plugin) {
|
||||||
core.assertPlayerVisibility(player.getName(), is_visible, plugin.getDescription().getName());
|
core.assertPlayerVisibility(player.getName(), is_visible, plugin.getDescription().getName());
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
public boolean setDisableChatToWebProcessing(boolean disable) {
|
||||||
|
return core.setDisableChatToWebProcessing(disable);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user