Skip to content

Class endstone::Translatable

ClassList > endstone > Translatable

Represents an object with a text representation that can be translated by the Minecraft client.

  • #include <endstone/lang/translatable.h>

Public Functions

Type Name
Translatable (std::string text, std::vector< std::string > params={})
bool empty () const
Check if the message to be translated is empty.
const std::vector< std::string > & getParameters () const
Get the translation parameters.
const std::string & getText () const
Get the text to be translated.

Public Functions Documentation

function Translatable

inline explicit endstone::Translatable::Translatable (
    std::string text,
    std::vector< std::string > params={}
) 

function empty

Check if the message to be translated is empty.

inline bool endstone::Translatable::empty () const

Returns:

true if the message to be translated is empty, false otherwise


function getParameters

Get the translation parameters.

inline const std::vector< std::string > & endstone::Translatable::getParameters () const

Returns:

the translation parameters


function getText

Get the text to be translated.

inline const std::string & endstone::Translatable::getText () const

Returns:

the text to be translated



The documentation for this class was generated from the following file include/endstone/lang/translatable.h