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 ComponentcomponentFromMessage(@NonNull com.mojang.brigadier.Message message) Deprecated, for removal: This API element is subject to removal in a future version.Create a newComponentfrom a BrigadierMessage.static @NonNull com.mojang.brigadier.Messagemessage(@NonNull ComponentLike componentLike) Deprecated, for removal: This API element is subject to removal in a future version.Create a new BrigadierMessagefrom aComponentLike.
-
Method Details
-
message
Deprecated, for removal: This API element is subject to removal in a future version.Create a new BrigadierMessagefrom aComponentLike.Mostly useful for creating rich suggestion tooltips in combination with other Paper-MojangAPI APIs.
- Parameters:
componentLike- TheComponentLiketo use for theMessagecontents- 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 newComponentfrom a BrigadierMessage.If the
Messagewas created from aComponent, it will simply be converted back, otherwise a newTextComponentwill be created with the content ofMessage.getString()
-
MessageComponentSerializerfor a direct replacement of functionality found in this class. As a general entrypoint to brigadier on paper, seeCommands.