Utilities-OG
A collection of utilities and APIs used by TrueOG Network. Developed by christianniehaus & NotAlexNoyle.
Current Target: Purpur 1.19.4
Building:
./gradlew build
The resulting .jar file will be in build/libs
At the moment, any config change requires a server restart to take effect.
Features:
- Mock Bamboo: Enables crafting mock bamboo planks from 2x2 bamboo and mock bamboo wood from 2x2 mock bamboo planks.
- Chain Armor: Enables crafting chain armor from chains.
- Color Codes: Displays information to players about Bukkit's chat color codes and their syntax.
- MiniPlaceholderAPI: Enables a custom, easy-to-use MiniPlaceholders API (Note: May require additional configuration for specific placeholders).
- NoFlippy: Prevents trapdoors from being flipped in WorldGuard regions where the "can-flippy" flag is set to DENY (Requires WorldGuard plugin).
- TogglePhantoms: Allows players to use the
/togglephantomscommand to turn phantom spawning on or off for themselves. - Ping: Provides two commands:
/ping(displays real player ping) and/bing(replicates vanilla /ping functionality). - Ranks Menu: Displays information to players about available ranks at the TrueOG Network Store.
Warning:
- DisableEntityCramming (Default: false): Disables entity cramming damage server-wide. This can cause lag if no other plugin manages entity limits. Enable this Module only if you have a separate plugin managing entity limitations.
Permissions:
utilities.about- Description: Allows players to use the base
/utilitiescommand to get information about the plugin. - Default:
op(Server Operator)
- Description: Allows players to use the base
utilities.colorcodes- Description: Grants permission to use the
/colorcodescommand to view Bukkit chat color code information. - Default:
op(Server Operator)
- Description: Grants permission to use the
utilities.togglephantoms- Description: Allows players to use the
/togglephantomscommand to enable or disable phantom spawning for themselves. - Default:
op(Server Operator)
- Description: Allows players to use the
utilities.togglecramming- Description: Grants permission to use the
/togglecrammingcommand (if enabled) to manage entity cramming damage. - Default:
op(Server Operator)
- Description: Grants permission to use the
utilities.ranks- Description: Allows players to use the
/rankscommand to view information about available ranks on the TrueOG Network Store. - Default:
op(Server Operator)
- Description: Allows players to use the
utilities.ping- Description: Grants permission to use the
/ping(real ping) and/bing(mimics vanilla ping) commands. - Default:
op(Server Operator)
- Description: Grants permission to use the
Please note: These permissions can be modified in the Utilities-OG configuration file config.yml.
API Documentation:
1. trueogSendMessage(Player player, String message)
Send a message to the player with TrueOG formatting (supports legacy and modern formatting).
Player targetPlayer = Bukkit.getPlayer("USERNAME");
UtilitiesOG.trueogSendMessage(targetPlayer, "&6This is a &*message with <green>True&4OG <bold>formatting!");
2. trueogExpandMiniPlaceholders(Player player, String input)
Expands MiniPlaceholders within a string for the given player. (Note: Requires MiniPlaceholdersAPI to be enabled in the config).
Player targetPlayer = Bukkit.getPlayer("SomePlayer");
String message = "Welcome back, <player_display_name>!";
TextComponent expandedMessage = UtilitiesOG.trueogExpandMiniPlaceholders(targetPlayer, message);
UtilitiesOG.trueogSendMessage(targetPlayer, expandedMessage);
3. ranksCommand():
Returns a new instance of the RanksCommand class, allowing you to potentially customize its behavior in the future.
RanksCommand ranksCommand = UtilitiesOG.ranksCommand();
// Future configuration here.
4. pingCommand():
Returns a new instance of the PingCommand class, allowing you to potentially customize its behavior in the future.
PingCommand pingCommand = UtilitiesOG.pingCommand();
// Future configuration here.
TODO:
-
LuckPerms colors for <player_display_name>.
-
trueOGCreateMiniPlaceholderAPI.
-
Customization options for the Ranks and Ping APIs.