InstancesPlugin

public class InstancesPlugin extends JavaPlugin

The main plugin class for Instances. This plugin provides gameplay features for the Hytale server. Extend this class to create a plugin.

java.lang.Object > JavaPlugin > InstancesPlugin

Field Summary

eventRegistry

final EventRegistry eventRegistry

Field eventRegistry.

chunkStoreRegistry

final ComponentRegistryProxy chunkStoreRegistry

Field chunkStoreRegistry.

holder

final Holder holder

Field holder.

universe

final Universe universe

Field universe.

path

final Path path

Field path.

assetPath

final Path assetPath

Field assetPath.

uuid

final UUID uuid

Field uuid.

worldPath

final Path worldPath

Field worldPath.

finalWorldKey

final String finalWorldKey

Field finalWorldKey.

instanceConfig

final InstanceWorldConfig instanceConfig

Field instanceConfig.

start

final long start

Field start.

rel

final Path rel

Field rel.

toPath

final Path toPath

Field toPath.

originalWorld

final World originalWorld

Field originalWorld.

transformComponent

final TransformComponent transformComponent

Field transformComponent.

originalPosition

final Transform originalPosition

Field originalPosition.

playerRefComponent

final PlayerRef playerRefComponent

Field playerRefComponent.

world

final World world

Field world.

obj

final PlayerRef obj

Field obj.

uuidComponent

final UUIDComponent uuidComponent

Field uuidComponent.

playerUUID

final UUID playerUUID

Field playerUUID.

finalPlayerConfig

final InstanceEntityConfig finalPlayerConfig

Field finalPlayerConfig.

spawnProvider

final ISpawnProvider spawnProvider

Field spawnProvider.

spawnPoint

final Transform spawnPoint

Field spawnPoint.

defaultWorld

final World defaultWorld

Field defaultWorld.

originalWorldConfig

final WorldConfig originalWorldConfig

Field originalWorldConfig.

targetWorldConfig

final WorldConfig targetWorldConfig

Field targetWorldConfig.

headRotationComponent

final HeadRotation headRotationComponent

Field headRotationComponent.

headRotation

final Vector3f headRotation

Field headRotation.

spawnHeadRotation

final Vector3f spawnHeadRotation

Field spawnHeadRotation.

entityConfig

final InstanceEntityConfig entityConfig

Field entityConfig.

config

final WorldConfig config

Field config.

targetWorld

final World targetWorld

Field targetWorld.

teleportComponent

final Teleport teleportComponent

Field teleportComponent.

chunkStore

final Store chunkStore

Field chunkStore.

worldName

final String worldName

Field worldName.

instances

final List instances

Field instances.

relative

final Path relative

Field relative.

name

final String name

Field name.

playerComponent

final Player playerComponent

Field playerComponent.

playerConfig

final PlayerConfigData playerConfig

Field playerConfig.

lastWorldName

final String lastWorldName

Field lastWorldName.

fallbackWorld

final WorldReturnPoint fallbackWorld

Field fallbackWorld.

transform

final Transform transform

Field transform.

rotationClone

final Vector3f rotationClone

Field rotationClone.

worldConfig

final InstanceWorldConfig worldConfig

Field worldConfig.

override

final WorldReturnPoint override

Field override.

player

final Player player

Field player.

instanceWorldConfig

final InstanceWorldConfig instanceWorldConfig

Field instanceWorldConfig.

discoveryConfig

final InstanceDiscoveryConfig discoveryConfig

Field discoveryConfig.

playerConfigData

final PlayerConfigData playerConfigData

Field playerConfigData.

instanceUuid

final UUID instanceUuid

Field instanceUuid.

discoveredInstances

final Set discoveredInstances

Field discoveredInstances.

playerRef

final Ref playerRef

Field playerRef.

store

final Store store

Field store.

discoverInstanceEvent

final DiscoverInstanceEvent.Display discoverInstanceEvent

Field discoverInstanceEvent.

subtitleKey

final String subtitleKey

Field subtitleKey.

subtitle

final Message subtitle

Field subtitle.

discoverySoundEventId

final String discoverySoundEventId

Field discoverySoundEventId.

assetIndex

final int assetIndex

Field assetIndex.

returnPoint

final WorldReturnPoint returnPoint

Field returnPoint.

returnWorld

final World returnWorld

Field returnWorld.

hytaleMetadata

final Schema.HytaleMetadata hytaleMetadata

Field hytaleMetadata.

errors

final StringBuilder errors

Field errors.

instanceAssets

final List instanceAssets

Field instanceAssets.

sb

final StringBuilder sb

Field sb.

instancePath

final Path instancePath

Field instancePath.

storage

final IChunkStorageProvider storage

Field storage.

options

final EnumSet options

Field options.

Method Detail

get

static InstancesPlugin get ()

Method get.

InstancesPlugin

public public InstancesPlugin (@Nonnull final JavaPluginInit init)

Method InstancesPlugin.

Parameters:
@Nonnull final JavaPluginInit init

setup

protected void setup ()

Method setup.

InstancesCommand

public new InstancesCommand ()

Method InstancesCommand.

RemovalSystem

public new RemovalSystem ()

Method RemovalSystem.

spawnInstance

public CompletableFuture spawnInstance (@Nonnull final String name, @Nonnull final World forWorld, @Nonnull final Transform returnPoint)

Method spawnInstance.

Parameters:
@Nonnull final String name
@Nonnull final World forWorld
@Nonnull final Transform returnPoint

WorldReturnPoint

public new WorldReturnPoint (forWorld.getWorldConfig()

Method WorldReturnPoint.

Parameters:
forWorld.getWorldConfig( forWorld.getWorldConfig(

teleportPlayerToLoadingInstance

static void teleportPlayerToLoadingInstance (@Nonnull final Ref entityRef, @Nonnull final ComponentAccessor componentAccessor, @Nonnull final CompletableFuture worldFuture, @Nullable final Transform overrideReturn)

Method teleportPlayerToLoadingInstance.

Parameters:
@Nonnull final Ref entityRef
@Nonnull final ComponentAccessor componentAccessor
@Nonnull final CompletableFuture worldFuture
@Nullable final Transform overrideReturn

teleportPlayerToInstance

static void teleportPlayerToInstance (@Nonnull final Ref playerRef, @Nonnull final ComponentAccessor componentAccessor, @Nonnull final World targetWorld, @Nullable final Transform overrideReturn)

Method teleportPlayerToInstance.

Parameters:
@Nonnull final Ref playerRef
@Nonnull final ComponentAccessor componentAccessor
@Nonnull final World targetWorld
@Nullable final Transform overrideReturn

Teleport

public new Teleport (targetWorld, spawnPoint)

Method Teleport.

Parameters:
targetWorld targetWorld
spawnPoint spawnPoint

exitInstance

static void exitInstance (@Nonnull final Ref targetRef, @Nonnull final ComponentAccessor componentAccessor)

Method exitInstance.

Parameters:
@Nonnull final Ref targetRef
@Nonnull final ComponentAccessor componentAccessor

safeRemoveInstance

static void safeRemoveInstance (@Nonnull final String worldName)

Method safeRemoveInstance.

Parameters:
@Nonnull final String worldName

getInstanceAssetPath

static Path getInstanceAssetPath (@Nonnull final String name)

Method getInstanceAssetPath.

Parameters:
@Nonnull final String name

doesInstanceAssetExist

static boolean doesInstanceAssetExist (@Nonnull final String name)

Method doesInstanceAssetExist.

Parameters:
@Nonnull final String name

loadInstanceAssetForEdit

static CompletableFuture loadInstanceAssetForEdit (@Nonnull final String name)

Method loadInstanceAssetForEdit.

Parameters:
@Nonnull final String name

getInstanceAssets

public List getInstanceAssets ()

Method getInstanceAssets.

preVisitDirectory

public FileVisitResult preVisitDirectory (@Nonnull final Path dir, @Nonnull final BasicFileAttributes attrs)

Method preVisitDirectory.

Parameters:
@Nonnull final Path dir
@Nonnull final BasicFileAttributes attrs

onPlayerConnect

static void onPlayerConnect (@Nonnull final PlayerConnectEvent event)

Method onPlayerConnect.

Parameters:
@Nonnull final PlayerConnectEvent event

if

public else if (lastWorld != null)

Method if.

Parameters:
lastWorld != null

onPlayerAddToWorld

static void onPlayerAddToWorld (@Nonnull final AddPlayerToWorldEvent event)

Method onPlayerAddToWorld.

Parameters:
@Nonnull final AddPlayerToWorldEvent event

onPlayerReady

static void onPlayerReady (@Nonnull final PlayerReadyEvent event)

Method onPlayerReady.

Parameters:
@Nonnull final PlayerReadyEvent event

showInstanceDiscovery

static void showInstanceDiscovery (@Nonnull final Ref ref, @Nonnull final Store store, @Nonnull final UUID instanceUuid, @Nonnull InstanceDiscoveryConfig discoveryConfig)

Method showInstanceDiscovery.

Parameters:
@Nonnull final Ref ref
@Nonnull final Store store
@Nonnull final UUID instanceUuid
@Nonnull InstanceDiscoveryConfig discoveryConfig

onPlayerDrainFromWorld

static void onPlayerDrainFromWorld (@Nonnull final DrainPlayerFromWorldEvent event)

Method onPlayerDrainFromWorld.

Parameters:
@Nonnull final DrainPlayerFromWorldEvent event

generateSchema

static void generateSchema (@Nonnull final GenerateSchemaEvent event)

Method generateSchema.

Parameters:
@Nonnull final GenerateSchemaEvent event

StringSchema

public new StringSchema ()

Method StringSchema.

ObjectSchema

public new ObjectSchema ()

Method ObjectSchema.

validateInstanceAssets

private void validateInstanceAssets (@Nonnull final LoadAssetEvent event)

Method validateInstanceAssets.

Parameters:
@Nonnull final LoadAssetEvent event

MigrationChunkStorageProvider

public new MigrationChunkStorageProvider (new IChunkStorageProvider[] { storage }, EmptyChunkStorageProvider.INSTANCE)

Method MigrationChunkStorageProvider.

Parameters:
new IChunkStorageProvider[] { storage }
EmptyChunkStorageProvider.INSTANCE EmptyChunkStorageProvider.INSTANCE

safeName

static String safeName (@Nonnull final String name)

Method safeName.

Parameters:
@Nonnull final String name

getInstanceDataResourceType

public InstanceDataResource> getInstanceDataResourceType ()

Method getInstanceDataResourceType.

getInstanceEntityConfigComponentType

public InstanceEntityConfig> getInstanceEntityConfigComponentType ()

Method getInstanceEntityConfigComponentType.

getInstanceBlockComponentType

public InstanceBlock> getInstanceBlockComponentType ()

Method getInstanceBlockComponentType.

getConfigurableInstanceBlockComponentType

public ConfigurableInstanceBlock> getConfigurableInstanceBlockComponentType ()

Method getConfigurableInstanceBlockComponentType.