mirror of
https://github.com/Aust1n46/VentureChat.git
synced 2025-05-23 10:39:05 +00:00
Scope helper method private
This commit is contained in:
parent
b6cbc846c6
commit
6b3112f6a4
@ -467,20 +467,14 @@ public class ChatListener implements Listener {
|
|||||||
String globalJSON = formatService.convertToJson(mcp, format, chat);
|
String globalJSON = formatService.convertToJson(mcp, format, chat);
|
||||||
format = FormatUtils.FormatStringAll(PlaceholderAPI.setBracketPlaceholders(mcp.getPlayer(), FormatUtils.FormatStringAll(format)));
|
format = FormatUtils.FormatStringAll(PlaceholderAPI.setBracketPlaceholders(mcp.getPlayer(), FormatUtils.FormatStringAll(format)));
|
||||||
String message = FormatUtils.stripColor(format + chat); // UTF-8 encoding issues.
|
String message = FormatUtils.stripColor(format + chat); // UTF-8 encoding issues.
|
||||||
int hash = message.hashCode();
|
final VentureChatEvent ventureChatEvent = new VentureChatEvent(mcp, mcp.getName(), plugin.getVaultPermission().getPrimaryGroup(mcp.getPlayer()), eventChannel, recipients,
|
||||||
|
recipientCount, format, chat, globalJSON, message.hashCode(), eventChannel.getBungee());
|
||||||
// Create VentureChatEvent
|
|
||||||
VentureChatEvent ventureChatEvent = new VentureChatEvent(mcp, mcp.getName(), plugin.getVaultPermission().getPrimaryGroup(mcp.getPlayer()), eventChannel, recipients,
|
|
||||||
recipientCount, format, chat, globalJSON, hash, eventChannel.getBungee());
|
|
||||||
// Fire event and wait for other plugin listeners to act on it
|
|
||||||
plugin.getServer().getPluginManager().callEvent(ventureChatEvent);
|
plugin.getServer().getPluginManager().callEvent(ventureChatEvent);
|
||||||
// Call method to send the processed chat
|
|
||||||
handleVentureChatEvent(ventureChatEvent);
|
handleVentureChatEvent(ventureChatEvent);
|
||||||
// Reset quick chat flag
|
|
||||||
mcp.setQuickChat(false);
|
mcp.setQuickChat(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void handleVentureChatEvent(VentureChatEvent event) {
|
private void handleVentureChatEvent(VentureChatEvent event) {
|
||||||
VentureChatPlayer ventureChatPlayer = event.getVentureChatPlayer();
|
VentureChatPlayer ventureChatPlayer = event.getVentureChatPlayer();
|
||||||
ChatChannel channel = event.getChannel();
|
ChatChannel channel = event.getChannel();
|
||||||
Set<Player> recipients = event.getRecipients();
|
Set<Player> recipients = event.getRecipients();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user