Skip to content

SharedInstanceModule

SharedInstanceModule is an implementation of InstanceModule that creates a single SharedInstance for each game. All instances on the same map of a game with this module will share the same block data, resulting in reduced memory usage compared to other instance modules.

Dependencies

This module depends on the following modules:

Usage

Import the module:

import com.bluedragonmc.server.module.instance.SharedInstanceModule
import com.bluedragonmc.server.module.map.MapProviderModule // dependency

Use the module in your game’s initialize function:

use(MapProviderModule(data.mapSource)) // This is how you specify map location - see MapProviderModule docs for more info
use(SharedInstanceModule())