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
Field eventRegistry.
chunkStoreRegistry
Field chunkStoreRegistry.
holder
Field holder.
universe
Field universe.
path
Field path.
assetPath
Field assetPath.
uuid
Field uuid.
worldPath
Field worldPath.
finalWorldKey
Field finalWorldKey.
instanceConfig
Field instanceConfig.
start
Field start.
rel
Field rel.
toPath
Field toPath.
originalWorld
Field originalWorld.
transformComponent
Field transformComponent.
originalPosition
Field originalPosition.
playerRefComponent
Field playerRefComponent.
world
Field world.
obj
Field obj.
uuidComponent
Field uuidComponent.
playerUUID
Field playerUUID.
finalPlayerConfig
Field finalPlayerConfig.
spawnProvider
Field spawnProvider.
spawnPoint
Field spawnPoint.
defaultWorld
Field defaultWorld.
originalWorldConfig
Field originalWorldConfig.
targetWorldConfig
Field targetWorldConfig.
headRotationComponent
Field headRotationComponent.
headRotation
Field headRotation.
spawnHeadRotation
Field spawnHeadRotation.
entityConfig
Field entityConfig.
config
Field config.
targetWorld
Field targetWorld.
teleportComponent
Field teleportComponent.
chunkStore
Field chunkStore.
worldName
Field worldName.
instances
Field instances.
relative
Field relative.
name
Field name.
playerComponent
Field playerComponent.
playerConfig
Field playerConfig.
lastWorldName
Field lastWorldName.
fallbackWorld
Field fallbackWorld.
transform
Field transform.
rotationClone
Field rotationClone.
worldConfig
Field worldConfig.
override
Field override.
player
Field player.
instanceWorldConfig
Field instanceWorldConfig.
discoveryConfig
Field discoveryConfig.
playerConfigData
Field playerConfigData.
instanceUuid
Field instanceUuid.
discoveredInstances
Field discoveredInstances.
playerRef
Field playerRef.
store
Field store.
discoverInstanceEvent
Field discoverInstanceEvent.
subtitleKey
Field subtitleKey.
subtitle
Field subtitle.
discoverySoundEventId
Field discoverySoundEventId.
assetIndex
Field assetIndex.
returnPoint
Field returnPoint.
returnWorld
Field returnWorld.
hytaleMetadata
Field hytaleMetadata.
errors
Field errors.
instanceAssets
Field instanceAssets.
sb
Field sb.
instancePath
Field instancePath.
storage
Field storage.
options
Field options.
Method Detail
setup
void
setup
()
Method setup.
InstancesCommand
new
InstancesCommand
()
Method InstancesCommand.
RemovalSystem
new
RemovalSystem
()
Method RemovalSystem.
spawnInstance
CompletableFuture
spawnInstance
(@Nonnull final String name, @Nonnull final World forWorld, @Nonnull final Transform returnPoint)
Method spawnInstance.
- Parameters:
@Nonnull final Stringname@Nonnull final WorldforWorld@Nonnull final TransformreturnPoint
WorldReturnPoint
new
WorldReturnPoint
(forWorld.getWorldConfig()
Method WorldReturnPoint.
- Parameters:
forWorld.getWorldConfig(forWorld.getWorldConfig(
teleportPlayerToLoadingInstance
void
teleportPlayerToLoadingInstance
(@Nonnull final Ref entityRef, @Nonnull final ComponentAccessor componentAccessor, @Nonnull final CompletableFuture worldFuture, @Nullable final Transform overrideReturn)
Method teleportPlayerToLoadingInstance.
- Parameters:
@Nonnull final RefentityRef@Nonnull final ComponentAccessorcomponentAccessor@Nonnull final CompletableFutureworldFuture@Nullable final TransformoverrideReturn
teleportPlayerToInstance
void
teleportPlayerToInstance
(@Nonnull final Ref playerRef, @Nonnull final ComponentAccessor componentAccessor, @Nonnull final World targetWorld, @Nullable final Transform overrideReturn)
Method teleportPlayerToInstance.
- Parameters:
@Nonnull final RefplayerRef@Nonnull final ComponentAccessorcomponentAccessor@Nonnull final WorldtargetWorld@Nullable final TransformoverrideReturn
Teleport
new
Teleport
(targetWorld, spawnPoint)
Method Teleport.
- Parameters:
targetWorldtargetWorldspawnPointspawnPoint
exitInstance
void
exitInstance
(@Nonnull final Ref targetRef, @Nonnull final ComponentAccessor componentAccessor)
Method exitInstance.
- Parameters:
@Nonnull final ReftargetRef@Nonnull final ComponentAccessorcomponentAccessor
safeRemoveInstance
void
safeRemoveInstance
(@Nonnull final String worldName)
Method safeRemoveInstance.
- Parameters:
@Nonnull final StringworldName
getInstanceAssetPath
Path
getInstanceAssetPath
(@Nonnull final String name)
Method getInstanceAssetPath.
- Parameters:
@Nonnull final Stringname
doesInstanceAssetExist
boolean
doesInstanceAssetExist
(@Nonnull final String name)
Method doesInstanceAssetExist.
- Parameters:
@Nonnull final Stringname
loadInstanceAssetForEdit
CompletableFuture
loadInstanceAssetForEdit
(@Nonnull final String name)
Method loadInstanceAssetForEdit.
- Parameters:
@Nonnull final Stringname
getInstanceAssets
List
getInstanceAssets
()
Method getInstanceAssets.
preVisitDirectory
FileVisitResult
preVisitDirectory
(@Nonnull final Path dir, @Nonnull final BasicFileAttributes attrs)
Method preVisitDirectory.
- Parameters:
@Nonnull final Pathdir@Nonnull final BasicFileAttributesattrs
if
else
if
(lastWorld != null)
Method if.
- Parameters:
lastWorld !=null
onPlayerAddToWorld
Method onPlayerAddToWorld.
- Parameters:
@Nonnull final AddPlayerToWorldEventevent
showInstanceDiscovery
void
showInstanceDiscovery
(@Nonnull final Ref ref, @Nonnull final Store store, @Nonnull final UUID instanceUuid, @Nonnull InstanceDiscoveryConfig discoveryConfig)
Method showInstanceDiscovery.
- Parameters:
@Nonnull final Refref@Nonnull final Storestore@Nonnull final UUIDinstanceUuid@Nonnull InstanceDiscoveryConfigdiscoveryConfig
onPlayerDrainFromWorld
Method onPlayerDrainFromWorld.
- Parameters:
@Nonnull final DrainPlayerFromWorldEventevent
StringSchema
new
StringSchema
()
Method StringSchema.
ObjectSchema
new
ObjectSchema
()
Method ObjectSchema.
validateInstanceAssets
Method validateInstanceAssets.
- Parameters:
@Nonnull final LoadAssetEventevent
MigrationChunkStorageProvider
new
MigrationChunkStorageProvider
(new IChunkStorageProvider[] { storage }, EmptyChunkStorageProvider.INSTANCE)
Method MigrationChunkStorageProvider.
- Parameters:
new IChunkStorageProvider[] { storage}EmptyChunkStorageProvider.INSTANCEEmptyChunkStorageProvider.INSTANCE
safeName
String
safeName
(@Nonnull final String name)
Method safeName.
- Parameters:
@Nonnull final Stringname
getInstanceDataResourceType
InstanceDataResource>
getInstanceDataResourceType
()
Method getInstanceDataResourceType.
getInstanceEntityConfigComponentType
InstanceEntityConfig>
getInstanceEntityConfigComponentType
()
Method getInstanceEntityConfigComponentType.
getInstanceBlockComponentType
InstanceBlock>
getInstanceBlockComponentType
()
Method getInstanceBlockComponentType.
getConfigurableInstanceBlockComponentType
ConfigurableInstanceBlock>
getConfigurableInstanceBlockComponentType
()
Method getConfigurableInstanceBlockComponentType.