Skip to content

Commit

Permalink
Pequena melhoiria SCPlayerListener
Browse files Browse the repository at this point in the history
  • Loading branch information
SrBedrock committed Aug 15, 2024
1 parent 8cdf2d2 commit b09c8d6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,10 @@ public void onPlayerKick(PlayerKickEvent event) {
private void registerChatListener() {
EventPriority priority = EventPriority.valueOf(settingsManager.getString(CLANCHAT_LISTENER_PRIORITY));
plugin.getServer().getPluginManager().registerEvent(AsyncPlayerChatEvent.class, this, priority, (l, e) -> {
if (!(e instanceof AsyncPlayerChatEvent)) {
if (!(e instanceof AsyncPlayerChatEvent event)) {
return;
}
AsyncPlayerChatEvent event = (AsyncPlayerChatEvent) e;

Player player = event.getPlayer();
ClanPlayer cp = plugin.getClanManager().getClanPlayer(player.getUniqueId());
if (cp == null || isBlacklistedWorld(player)) {
Expand Down

0 comments on commit b09c8d6

Please sign in to comment.