mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-04 06:28:53 +00:00
Update AsyncChatEvent constructor use
This commit is contained in:
1 file changed
+3
-1
@@ -32,6 +32,7 @@ import net.draycia.carbon.common.users.CarbonPlayerCommon;
|
|||||||
import net.draycia.carbon.common.users.WrappedCarbonPlayer;
|
import net.draycia.carbon.common.users.WrappedCarbonPlayer;
|
||||||
import net.kyori.adventure.audience.Audience;
|
import net.kyori.adventure.audience.Audience;
|
||||||
import net.kyori.adventure.audience.ForwardingAudience;
|
import net.kyori.adventure.audience.ForwardingAudience;
|
||||||
|
import net.kyori.adventure.chat.SignedMessage;
|
||||||
import net.kyori.adventure.key.Key;
|
import net.kyori.adventure.key.Key;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
@@ -170,7 +171,8 @@ public final class CarbonPlayerPaper extends WrappedCarbonPlayer implements Forw
|
|||||||
@Override
|
@Override
|
||||||
public boolean speechPermitted(final String message) {
|
public boolean speechPermitted(final String message) {
|
||||||
// ...........
|
// ...........
|
||||||
return new AsyncPlayerChatEvent(!Bukkit.isPrimaryThread(), this.player().get(), message, Set.of()).callEvent() && new AsyncChatEvent(!Bukkit.isPrimaryThread(), this.player().get(), Set.of(), (player, name, msg, receiver) -> msg, Component.text(message), Component.text(message)).callEvent();
|
return new AsyncPlayerChatEvent(!Bukkit.isPrimaryThread(), this.player().get(), message, Set.of()).callEvent()
|
||||||
|
&& new AsyncChatEvent(!Bukkit.isPrimaryThread(), this.player().get(), Set.of(), (player, name, msg, receiver) -> msg, Component.text(message), Component.text(message), SignedMessage.system(message, null)).callEvent();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in new issue
Block a user