Comments (5)
Unclear what you're referring to here. The toString()
output looks correct to me - the BungeeCord text serializer works by "laundering" an Adventure Component
such that when serialized by ComponentSerializer.toString()
it will produce the Adventure component.
Does the output of GsonComponentSerializer.gson().serialize()
on the original component and ComponentSerializer.toString()
on the BaseComponent
returned by BungeeComponentSerializer
disagree with each other?
from adventure-platform.
System.out.println(GsonComponentSerializer.gson().serialize(input.getMessage()));
BaseComponent[] components = BungeeComponentSerializer.get().serialize(input.getMessage());
System.out.println(ComponentSerializer.toString(components));
[12:40:43 INFO]: {"extra":[{"color":"gray","text":"Schreibe den Betrag, welchen du auf dein "},{"color":"gold","text":"Konto einzahlen "},{"color":"gray","text":"möchtest, in den Chat."}],"text":""}
[12:40:43 ERROR]: Could not pass event InventoryClickEvent to Reallife-Spawn v1.0
java.lang.reflect.InaccessibleObjectException: Unable to make field int java.awt.Color.value accessible: module java.desktop does not "opens java.awt" to unnamed module @2a79781f
at java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:357) ~[?:?]
at java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297) ~[?:?]
at java.lang.reflect.Field.checkCanSetAccessible(Field.java:177) ~[?:?]
at java.lang.reflect.Field.setAccessible(Field.java:171) ~[?:?]
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:157) ~[spigot.jar:git-Tuinity-"2683c77"]
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:100) ~[spigot.jar:git-Tuinity-"2683c77"]
at com.google.gson.Gson.getAdapter(Gson.java:423) ~[spigot.jar:git-Tuinity-"2683c77"]
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:115) ~[spigot.jar:git-Tuinity-"2683c77"]
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:164) ~[spigot.jar:git-Tuinity-"2683c77"]
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:100) ~[spigot.jar:git-Tuinity-"2683c77"]
at com.google.gson.Gson.getAdapter(Gson.java:423) ~[spigot.jar:git-Tuinity-"2683c77"]
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:115) ~[spigot.jar:git-Tuinity-"2683c77"]
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:164) ~[spigot.jar:git-Tuinity-"2683c77"]
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:100) ~[spigot.jar:git-Tuinity-"2683c77"]
at com.google.gson.Gson.getDelegateAdapter(Gson.java:506) ~[spigot.jar:git-Tuinity-"2683c77"]
at net.kyori.adventure.text.serializer.bungeecord.SelfSerializable$AdapterFactory.create(SelfSerializable.java:58) ~[adventure-text-serializer-bungeecord-4.0.0-SNAPSHOT.jar:?]
at com.google.gson.Gson.getAdapter(Gson.java:423) ~[spigot.jar:git-Tuinity-"2683c77"]
at com.google.gson.Gson.toJson(Gson.java:661) ~[spigot.jar:git-Tuinity-"2683c77"]
at com.google.gson.Gson.toJson(Gson.java:648) ~[spigot.jar:git-Tuinity-"2683c77"]
at com.google.gson.Gson.toJson(Gson.java:603) ~[spigot.jar:git-Tuinity-"2683c77"]
at com.google.gson.Gson.toJson(Gson.java:583) ~[spigot.jar:git-Tuinity-"2683c77"]
at net.md_5.bungee.chat.ComponentSerializer.toString(ComponentSerializer.java:76) ~[spigot.jar:git-Tuinity-"2683c77"]
at de.cytooxien.reallife.phantom.chat.LabyModPromptInputListener.openInputScreen(LabyModPromptInputListener.java:88) ~[?:?]
at de.cytooxien.reallife.phantom.chat.LabyModPromptInputListener.sendPrompt(LabyModPromptInputListener.java:34) ~[?:?]
at de.cytooxien.reallife.phantom.chat.PlayerChatInputManager.handlePlayerChatInput(PlayerChatInputManager.java:73) ~[?:?]
at de.cytooxien.reallife.phantom.chat.PlayerChatInput.buildFuture(PlayerChatInput.java:107) ~[?:?]
at de.cytooxien.reallife.commons.ghetto.CashTransactionInventory.handleInput(CashTransactionInventory.java:99) ~[?:?]
at de.cytooxien.reallife.commons.ghetto.CashTransactionInventory.lambda$onUpdateInventory$3(CashTransactionInventory.java:64) ~[?:?]
at de.cytooxien.reallife.phantom.inventory.InventoryHandler.onInventoryClick(InventoryHandler.java:177) ~[?:?]
at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor626.execute(Unknown Source) ~[?:?]
at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[spigot.jar:git-Tuinity-"2683c77"]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[spigot.jar:git-Tuinity-"2683c77"]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[spigot.jar:git-Tuinity-"2683c77"]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:624) ~[spigot.jar:git-Tuinity-"2683c77"]
at net.minecraft.server.v1_16_R3.PlayerConnection.a(PlayerConnection.java:2797) ~[spigot.jar:git-Tuinity-"2683c77"]
at net.minecraft.server.v1_16_R3.PacketPlayInWindowClick.a(SourceFile:32) ~[spigot.jar:git-Tuinity-"2683c77"]
at net.minecraft.server.v1_16_R3.PacketPlayInWindowClick.a(SourceFile:10) ~[spigot.jar:git-Tuinity-"2683c77"]
at net.minecraft.server.v1_16_R3.PlayerConnectionUtils.lambda$ensureMainThread$1(PlayerConnectionUtils.java:55) ~[spigot.jar:git-Tuinity-"2683c77"]
at net.minecraft.server.v1_16_R3.TickTask.run(SourceFile:18) ~[spigot.jar:git-Tuinity-"2683c77"]
at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:136) ~[spigot.jar:git-Tuinity-"2683c77"]
at net.minecraft.server.v1_16_R3.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[spigot.jar:git-Tuinity-"2683c77"]
at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:109) ~[spigot.jar:git-Tuinity-"2683c77"]
at net.minecraft.server.v1_16_R3.MinecraftServer.bb(MinecraftServer.java:1325) ~[spigot.jar:git-Tuinity-"2683c77"]
at net.minecraft.server.v1_16_R3.MinecraftServer.executeNext(MinecraftServer.java:1318) ~[spigot.jar:git-Tuinity-"2683c77"]
at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:119) ~[spigot.jar:git-Tuinity-"2683c77"]
at net.minecraft.server.v1_16_R3.MinecraftServer.sleepForTick(MinecraftServer.java:1294) ~[spigot.jar:git-Tuinity-"2683c77"]
at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1138) ~[spigot.jar:git-Tuinity-"2683c77"]
at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:292) ~[spigot.jar:git-Tuinity-"2683c77"]
at java.lang.Thread.run(Thread.java:831) [?:?]```
from adventure-platform.
As an aside, it may be a good idea to override AdapterComponent#toString
, to ease future debugging on the matter and reduce confusion arising from the toString output.
from adventure-platform.
This is caused by the bungeecord-chat library using java.awt.Color
internally.
https://bugs.openjdk.java.net/browse/JDK-8256358
from adventure-platform.
This was already fixed in 1129e6e in December 2020, stop using severely outdated versions of -platform.
from adventure-platform.
Related Issues (20)
- NoSuchMethodError using the Bukkit audiences dependency HOT 1
- 1.19.3 for craftbukkit/spigot
- Internal Exception: io.netty.handler.codec.DecoderException: Received unexpected null component HOT 1
- ViaFacet isn't being consistently used when it is the best applicable approach. HOT 9
- Title with line breaks showing LF character HOT 2
- ViaFacet.Chat causing broken translation keys for newer clients
- Don't implement `AutoClosable` on `AudienceProvider`
- 1.20.4 - `MinecraftComponentSerializer#deserialize(...)` throws `UnsupportedOperationException` HOT 1
- add pls ver 1.19.2 craftbukkit
- `MinecraftComponentSerializer` throws `UnsupportedOperationException` HOT 2
- NoSuchMethodError due to BossBar.setTitle(String) incompatibility with BungeeCord's BaseComponent update
- Consider providing a working `ComponentLogger`
- Bug Report: Invalid Legacy Formatting Warning Specifically with sendActionBar in Older Minecraft Versions HOT 1
- Include version information in debug logs
- Exception when sending Title using BukkitAudiences in Paper 1.20.4
- CraftBukkitFacet creates a component with legacy codes HOT 1
- Setting motd on bungeecord doesn't work HOT 4
- HoverComponents do not work on 1.19 HOT 1
- NoSuchFieldError: LOCALE on Spigot 1.19 when calling BukkitAudiences#create(Plugin) HOT 2
- bukkit: cannot play sounds with self emitter
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adventure-platform.