mirror of
https://github.com/darksaid98/TownyChat.git
synced 2026-12-04 06:28:57 +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
+16
-2
No files matched your search
@@ -172,3 +172,6 @@ v0.36:
|
|||||||
|
|
||||||
v0.37:
|
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)
|
@EventHandler(priority = EventPriority.LOWEST)
|
||||||
public void onPlayerCommandPreprocess(PlayerCommandPreprocessEvent event) {
|
public void onPlayerCommandPreprocess(PlayerCommandPreprocessEvent event) {
|
||||||
|
|
||||||
Player player = event.getPlayer();
|
final Player player = event.getPlayer();
|
||||||
|
|
||||||
// Test if this player is registered with Towny.
|
// Test if this player is registered with Towny.
|
||||||
try {
|
try {
|
||||||
@@ -137,7 +137,18 @@ public class TownyChatPlayerListener implements Listener {
|
|||||||
event.setMessage(message);
|
event.setMessage(message);
|
||||||
|
|
||||||
directedChat.put(player, command);
|
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);
|
event.setCancelled(true);
|
||||||
|
|||||||
Reference in new issue
Block a user