mirror of
https://github.com/darksaid98/TownyChat.git
synced 2026-12-01 22:22:19 +00:00
v0.38:
- Fire chat Async so it matches all other chat.
This commit is contained in:
1 parent
3fb6dc5df3
commit
ffafc8c66e
2 files changed
+17
-3
No files matched your search
+4
-1
@@ -171,4 +171,7 @@ v0.36:
|
||||
permission: townychat.mod.unmute
|
||||
|
||||
v0.37:
|
||||
- Remove mute alias on 'chmute' So TownyChat does not block Essentials mute.
|
||||
- Remove mute alias on 'chmute' So TownyChat does not block Essentials mute.
|
||||
|
||||
v0.38:
|
||||
- Fire chat Async so it matches all other chat.
|
||||
@@ -72,7 +72,7 @@ public class TownyChatPlayerListener implements Listener {
|
||||
@EventHandler(priority = EventPriority.LOWEST)
|
||||
public void onPlayerCommandPreprocess(PlayerCommandPreprocessEvent event) {
|
||||
|
||||
Player player = event.getPlayer();
|
||||
final Player player = event.getPlayer();
|
||||
|
||||
// Test if this player is registered with Towny.
|
||||
try {
|
||||
@@ -137,7 +137,18 @@ public class TownyChatPlayerListener implements Listener {
|
||||
event.setMessage(message);
|
||||
|
||||
directedChat.put(player, command);
|
||||
player.chat(message);
|
||||
|
||||
final String msg = message;
|
||||
|
||||
// Fire this Async so we match other incoming chat.
|
||||
plugin.getServer().getScheduler().runTaskAsynchronously(plugin, new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
player.chat(msg);
|
||||
|
||||
}});
|
||||
}
|
||||
|
||||
event.setCancelled(true);
|
||||
|
||||
Reference in new issue
Block a user