Skip to content

Color not showing on chat #1

@Azrielx86

Description

@Azrielx86

When I send a message from the chat, on console it shows an error

I'm using Spigot 1.18.1

Console message:

[18:09:44] [Async Chat Thread - #1/ERROR]: Could not pass event AsyncPlayerChatEvent to NameColor v3.1.0
org.bukkit.event.EventException: null
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:310) ~[spigot-api-1.18.1-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[spigot-api-1.18.1-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:589) [spigot-api-1.18.1-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:576) [spigot-api-1.18.1-R0.1-SNAPSHOT.jar:?]
    at net.minecraft.server.network.PlayerConnection.chat(PlayerConnection.java:1861) [spigot-1.18.1-R0.1-SNAPSHOT.jar:3396-Spigot-f4ff00f-f3828bb]
    at net.minecraft.server.network.PlayerConnection.a(PlayerConnection.java:1795) [spigot-1.18.1-R0.1-SNAPSHOT.jar:3396-Spigot-f4ff00f-f3828bb]
    at net.minecraft.server.network.PlayerConnection.a(PlayerConnection.java:1761) [spigot-1.18.1-R0.1-SNAPSHOT.jar:3396-Spigot-f4ff00f-f3828bb]
    at net.minecraft.network.protocol.game.PacketPlayInChat$1.run(PacketPlayInChat.java:40) [spigot-1.18.1-R0.1-SNAPSHOT.jar:3396-Spigot-f4ff00f-f3828bb]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) [?:?]
    at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
    at java.lang.Thread.run(Thread.java:833) [?:?]
Caused by: java.lang.NullPointerException: null cannot be cast to non-null type dev.xyze.namecolor.NameColor
    at dev.xyze.namecolor.componentplaceholder.segment.NameSegment.toComponent(NameSegment.kt:18) ~[?:?]
    at dev.xyze.namecolor.componentplaceholder.PlaceholderHandler.replacePlaceholderInString(PlaceholderHandler.kt:23) ~[?:?]
    at dev.xyze.namecolor.ChatListener.onPlayerChat(ChatListener.kt:17) ~[?:?]
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
    at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigot-api-1.18.1-R0.1-SNAPSHOT.jar:?]
    ... 12 more

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions