Package io.papermc.paper.brigadier
Class PaperBrigadier
java.lang.Object
io.papermc.paper.brigadier.PaperBrigadier
Deprecated, for removal: This API element is subject to removal in a future version.
Helper methods to bridge the gaps between Brigadier and Paper-MojangAPI.
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull Component
componentFromMessage
(@NonNull com.mojang.brigadier.Message message) Deprecated, for removal: This API element is subject to removal in a future version.Create a newComponent
from a BrigadierMessage
.static @NonNull com.mojang.brigadier.Message
message
(@NonNull ComponentLike componentLike) Deprecated, for removal: This API element is subject to removal in a future version.Create a new BrigadierMessage
from aComponentLike
.
-
Method Details
-
message
Deprecated, for removal: This API element is subject to removal in a future version.Create a new BrigadierMessage
from aComponentLike
.Mostly useful for creating rich suggestion tooltips in combination with other Paper-MojangAPI APIs.
- Parameters:
componentLike
- TheComponentLike
to use for theMessage
contents- Returns:
- A new Brigadier
Message
-
componentFromMessage
public static @NonNull Component componentFromMessage(@NonNull com.mojang.brigadier.Message message) Deprecated, for removal: This API element is subject to removal in a future version.Create a newComponent
from a BrigadierMessage
.If the
Message
was created from aComponent
, it will simply be converted back, otherwise a newTextComponent
will be created with the content ofMessage.getString()
-
MessageComponentSerializer
for a direct replacement of functionality found in this class. As a general entrypoint to brigadier on paper, seeCommands
.