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 net.kyori.adventure.text.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 net.kyori.adventure.text.ComponentLike componentLike) Deprecated, for removal: This API element is subject to removal in a future version.Create a new BrigadierMessagefrom aComponentLike.
-
Method Details
-
message
public static @NonNull com.mojang.brigadier.Message message(@NonNull net.kyori.adventure.text.ComponentLike componentLike) 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 net.kyori.adventure.text.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()- Parameters:
message- TheMessageto create aComponentfrom- Returns:
- The created
Component
-
MessageComponentSerializerfor a direct replacement of functionality found in this class. As a general entrypoint to brigadier on paper, seeCommands.