Releases: CraftlyWorks/hypsum
Releases · CraftlyWorks/hypsum
v1.1 Release
📝 Create a Placeholder
Here is how you add a new placeholder:
import com.craftlyworks.hypsum.api.HypsumProvider;
import com.craftlyworks.hypsum.api.placeholder.Placeholder;
HypsumApi api = HypsumProvider.get();
api.registerPlaceholder(new Placeholder() {
@Override
public String getIdentifier() {
return "my_placeholder";
}
@Override
public String getValue(PlayerRef player) {
return "Hello, " + player.getDisplayName();
}
});🔍 Use your Placeholders
To replace placeholders in a string:
String text = "Welcome %my_placeholder%!";
String result = HypsumProvider.get().process(player, text);
// Result: "Welcome Hello, PlayerName!"Make sure to add Hypsum as a dependency in your plugin manifest.json to use these features.
If you want an optional integration, use OptionalDependencies instead.
{
"Dependencies": {
"com.craftlyworks.hypsum:Hypsum": ">=1.1"
}
}Enjoy coding with Hypsum! 🔥