Freemarker
Last updated
Was this helpful?
Last updated
Was this helpful?
The default templating engine used by Tubing is . It is a very basic Java templating engine which we can use to dynamically build our Tubing GUI XML.
When using the Freemarker templating engine, Tubing provides us with some utility methods that can be used inside the template.
The are 2 types of permission checks that we can use inside the templates.
$permissions is a utility class that can be used inside the Freemarker templates. The "has" method can check if a player has a certain permission. The "player" variable is also provided by Tubing. It is the player that has opened the GUI.
The Tubing GUI XML also provides a permission attribute. As can be seen in the XSD scheme. The permission attribute will hide the element if the current player does not have the provided permission.