AssetEditorPlugin
Package: com.hypixel.hytale.builtin.asseteditor
public class AssetEditorPlugin extends JavaPluginCentral plugin entry point for the asset editor system. Manages the complete lifecycle of asset editing: client connections, asset pack data sources, JSON schema distribution, asset type registration, live asset updates, undo/redo, and asset export. Registered as a singleton via instance.
Key Fields
Section titled “Key Fields”| Field | Type | Description |
|---|---|---|
globalEditLock | StampedLock | Global lock for serializing edit operations |
uuidToEditorClients | Map<UUID, Set<EditorClient>> | Maps player UUIDs to their editor sessions |
clientOpenAssetPathMapping | Map<EditorClient, AssetPath> | Tracks which asset each client has open |
schemas | Map<String, Schema> | Loaded JSON schemas for asset types |
assetPackDataSources | Map<String, DataSource> | Data sources keyed by asset pack name |
assetTypeRegistry | AssetTypeRegistry | Registry of all asset type handlers |
undoRedoManager | UndoRedoManager | Per-asset undo/redo stack manager |
Static Access
Section titled “Static Access”public static AssetEditorPlugin get()Returns the singleton instance.
During setup(), the plugin:
- Registers data sources for all existing asset packs
- Registers
AssetEditorGamePacketHandleras a sub-packet handler onServerManager - Sets
AssetEditorPacketHandleras the editor packet handler supplier onInitialPacketHandler - Registers
AssetStoreTypeHandlerfor eachAssetStorein theAssetRegistry - Registers
CommonAssetTypeHandlerinstances for Texture (.png), Model (.blockymodel), Animation (.blockyanim), Sound (.ogg), UI (.ui), and Language (.lang) - Registers event listeners for asset store/pack registration, asset monitoring, translations, and common asset changes
- Calls
AssetSpecificFunctionality.setup()for model/item/weather preview handlers
Key Methods
Section titled “Key Methods”| Method | Description |
|---|---|
DataSource registerDataSourceForPack(AssetPack) | Creates a StandardDataSource for an asset pack |
AssetTypeRegistry getAssetTypeRegistry() | Returns the asset type registry |
UndoRedoManager getUndoRedoManager() | Returns the undo/redo manager |
Map<EditorClient, AssetPath> getClientOpenAssetPathMapping() | Returns the client-to-open-asset mapping |
AssetPath getOpenAssetPath(EditorClient) | Returns the asset currently open by a client |
Set<EditorClient> getEditorClients(UUID) | Returns all editor clients for a player UUID |
Schema getSchema(String) | Returns a loaded JSON schema by name |
Inner Enums
Section titled “Inner Enums”InitState
Section titled “InitState”Tracks the plugin’s initialization state for deferred client setup:
NOT_INITIALIZED— Plugin not yet initializedINITIALIZING— In progressINITIALIZED— Ready to serve clients
Hydex is an independent community resource. Hytale is a trademark of Hypixel Studios. Hydex is not affiliated with or endorsed by Hypixel Studios.