promotional bannermobile promotional banner
premium banner
A powerful Hytale plugin library for creating, managing, and orchestrating temporary worlds with ease.

Description

Bridge - Hytale World Management Library

A powerful Hytale plugin library for creating, managing, and orchestrating temporary worlds with ease. Bridge provides a robust API for handling world lifecycle, player transfers, and customizable world behavior.

✨ Features

- Easy World Management: Create, activate, deactivate, and delete worlds with simple API calls
- Player Transfers: Safely move players between worlds with built-in thread safety
- Custom World Behavior: Extend `BridgeWorldComponent` to add custom logic to your worlds
- Asynchronous Operations: Most operations run asynchronously with optional callbacks
- World Configuration: Control block breaking, placement, gathering, and PvP settings
- Lifecycle Events: Hook into world creation, deletion, and player events

📖 API Reference

BridgeWorldManager:

  1. createWorld(String name, BridgeWorldComponent component, Consumer<BridgeWorld> callback)
  2. getAllVBridgeWorlds() - Get all managed worlds
  3. getDefaultWorldAsBridgeWorld() - Get the default world
  4. deleteWorld(BridgeWorld world) - Permanently delete a world
  5. activateWorld(BridgeWorld world, Consumer<BridgeWorld> callback)
  6. deactivateWorld(BridgeWorld world, World movePlayersTo)

 

BridgeWorld:

  1. activate(Consumer<BridgeWorld> callback) - Load world into memory
  2. deactivate(World movePlayersTo)` - Unload world
  3. transferPlayer(PlayerRef player) - Move player to this world
  4. delete() - Delete this world and its files
  5. setAllowPvP(boolean enabled) - Toggle PvP
  6. setAllowBlockBreaking(boolean enabled) - Toggle block breaking

BridgeWorldComponent Lifecycle Methods:

  1. onCreateWorld(BridgeWorld world)` - When world is created
  2. onDeleteWorld(BridgeWorld world)` - Before world deletion
  3. onPlayerJoinWorld(BridgeWorld world, PlayerRef player)`
  4. onPlayerLeaveWorld(BridgeWorld world, PlayerRef player)`
  5. onPlayerDieInWorld(BridgeWorld world, PlayerRef player)`
  6. onTick(BridgeWorld world, float deltaTime)` - Called every tick