Code Patterns
Copy-paste examples for common plugin tasks. Commands, events, ECS, GUI, and more.
All
225
Command
60
Damage
2
Ecs
27
Entity
5
Gui
75
Interaction
2
Inventory
4
Moderation
3
Permission
2
Player
9
Plugin
4
Storage
2
Teleport
3
Ui
22
Util
5
Player Patterns
9Ban Player
Ban a player using the built-in ban provider.
Chat Formatting
Format chat messages using PlayerChatEvent and Message builder.
Get Player Ping
Get a player's network latency/ping.
Get Player Position
Get the current position of a player using the TransformComponent.
Kick Player
Disconnect a player from the server.
Message Formatting Correct
Correct way to create and combine messages using Message.raw(), .color(), .bold() and Message.join().
Player Profile Lookup
Look up player profile by username, checking online players first then auth service
Send Colored Message
Send colored messages to players using Hytale Message API. Use .color() with Color constants or hex strings like "#RRGGBB". Do NOT use Minecraft ยง color codes - they do not work in Hytale!
Set GameMode
Change a player's game mode.