Universe

public class Universe extends JavaPlugin implements IMessageReceiver, MetricProvider

Class Universe. Provides universe functionality for the Hytale server.

java.lang.Object > JavaPlugin > Universe

Field Summary

playerStorage

private PlayerStorage playerStorage

Field playerStorage.

worldConfigProvider

private WorldConfigProvider worldConfigProvider

Field worldConfigProvider.

universeReady

private CompletableFuture universeReady

Field universeReady.

frequencyMinutes

final int frequencyMinutes

Field frequencyMinutes.

componentStore

final Store componentStore

Field componentStore.

data

final ChunkSavingSystems.Data data

Field data.

componentStore2

final Store componentStore2

Field componentStore2.

data2

final ChunkSavingSystems.Data data2

Field data2.

eventRegistry

final EventRegistry eventRegistry

Field eventRegistry.

chunkStoreRegistry

final ComponentRegistryProxy chunkStoreRegistry

Field chunkStoreRegistry.

entityStoreRegistry

final ComponentRegistryProxy entityStoreRegistry

Field entityStoreRegistry.

commandRegistry

final CommandRegistry commandRegistry

Field commandRegistry.

config

final HytaleServerConfig config

Field config.

defaultConfigProvider

final WorldConfigProvider.Default defaultConfigProvider

Field defaultConfigProvider.

event

final PrepareUniverseEvent event

Field event.

blockIdMapPath

final Path blockIdMapPath

Field blockIdMapPath.

path

final Path path

Field path.

bsonDocument

final BsonDocument bsonDocument

Field bsonDocument.

loadingWorlds

final ObjectArrayList> loadingWorlds

Field loadingWorlds.

worldsPath

final Path worldsPath

Field worldsPath.

name

final String name

Field name.

worldName

final String worldName

Field worldName.

iterator

final Iterator iterator

Field iterator.

world

final World world

Field world.

savePath

final Path savePath

Field savePath.

provider

final IWorldGenProvider provider

Field provider.

provider2

final IChunkStorageProvider provider2

Field provider2.

pluginManager

final PluginManager pluginManager

Field pluginManager.

oldWorldByName

final World oldWorldByName

Field oldWorldByName.

oldWorldByUuid

final World oldWorldByUuid

Field oldWorldByUuid.

nameLower

final String nameLower

Field nameLower.

playerConnection

final GamePacketHandler playerConnection

Field playerConnection.

chunkTrackerComponent

final ChunkTracker chunkTrackerComponent

Field chunkTrackerComponent.

playerRefComponent

final PlayerRef playerRefComponent

Field playerRefComponent.

playerComponent

final Player playerComponent

Field playerComponent.

playerConfig

final PlayerConfigData playerConfig

Field playerConfig.

entityViewerComponent

final EntityTrackerSystems.EntityViewer entityViewerComponent

Field entityViewerComponent.

entityViewerComponent2

final EntityTrackerSystems.EntityViewer entityViewerComponent2

Field entityViewerComponent2.

existingPlayer

final PlayerRef existingPlayer

Field existingPlayer.

lastWorldName

final String lastWorldName

Field lastWorldName.

lastWorld

final World lastWorld

Field lastWorld.

playerConnectEvent

final PlayerConnectEvent playerConnectEvent

Field playerConnectEvent.

ref

final Ref ref

Field ref.

playerComponent2

final Player playerComponent2

Field playerComponent2.

uuid

final UUID uuid

Field uuid.

oldPlayer

final Player oldPlayer

Field oldPlayer.

newPlayer

final Player newPlayer

Field newPlayer.

leaveWorld

final CompletableFuture leaveWorld

Field leaveWorld.

viewer

final EntityTrackerSystems.EntityViewer viewer

Field viewer.

viewer2

final EntityTrackerSystems.EntityViewer viewer2

Field viewer2.

optionSet

final OptionSet optionSet

Field optionSet.

Method Detail

get

static Universe get ()

Method get.

Universe

public public Universe (@Nonnull final JavaPluginInit init)

Method Universe.

Parameters:
@Nonnull final JavaPluginInit init

minute

public d minute (s)

Method minute.

Parameters:
s s

runBackup

public CompletableFuture runBackup ()

Method runBackup.

setup

protected void setup ()

Method setup.

WorldPregenerateSystem

public new WorldPregenerateSystem ()

Method WorldPregenerateSystem.

WorldConfigSaveSystem

public new WorldConfigSaveSystem ()

Method WorldConfigSaveSystem.

PlayerPingSystem

public new PlayerPingSystem ()

Method PlayerPingSystem.

PlayerConnectionFlushSystem

public new PlayerConnectionFlushSystem (this.playerRefComponentType)

Method PlayerConnectionFlushSystem.

Parameters:
this.playerRefComponentType this.playerRefComponentType

PlayerRefAddedSystem

public new PlayerRefAddedSystem (this.playerRefComponentType)

Method PlayerRefAddedSystem.

Parameters:
this.playerRefComponentType this.playerRefComponentType

SetTickingCommand

public new SetTickingCommand ()

Method SetTickingCommand.

BlockCommand

public new BlockCommand ()

Method BlockCommand.

BlockSelectCommand

public new BlockSelectCommand ()

Method BlockSelectCommand.

WorldCommand

public new WorldCommand ()

Method WorldCommand.

start

protected void start ()

Method start.

PrepareUniverseEvent

public new PrepareUniverseEvent (defaultConfigProvider)

Method PrepareUniverseEvent.

Parameters:
defaultConfigProvider defaultConfigProvider

shutdown

protected void shutdown ()

Method shutdown.

disconnectAllPLayers

public void disconnectAllPLayers ()

Method disconnectAllPLayers.

shutdownAllWorlds

public void shutdownAllWorlds ()

Method shutdownAllWorlds.

toMetricResults

public MetricResults toMetricResults ()

Method toMetricResults.

getUniverseReady

public CompletableFuture getUniverseReady ()

Method getUniverseReady.

getIndexedStorageCacheResourceType

public IndexedStorageChunkStorageProvider.IndexedStorageCache> getIndexedStorageCacheResourceType ()

Method getIndexedStorageCacheResourceType.

isWorldLoadable

public boolean isWorldLoadable (@Nonnull final String name)

Method isWorldLoadable.

Parameters:
@Nonnull final String name

addWorld

public CompletableFuture addWorld (@Nonnull final String name)

Method addWorld.

Parameters:
@Nonnull final String name

makeWorld

public CompletableFuture makeWorld (@Nonnull final String name, @Nonnull final Path savePath, @Nonnull final WorldConfig worldConfig)

Method makeWorld.

Parameters:
@Nonnull final String name
@Nonnull final Path savePath
@Nonnull final WorldConfig worldConfig

AddWorldEvent

public new AddWorldEvent (world)

Method AddWorldEvent.

Parameters:
world world

loadWorldFromStart

private CompletableFuture loadWorldFromStart (@Nonnull final Path savePath, @Nonnull final String name)

Method loadWorldFromStart.

Parameters:
@Nonnull final Path savePath
@Nonnull final String name

loadWorld

public CompletableFuture loadWorld (@Nonnull final String name)

Method loadWorld.

Parameters:
@Nonnull final String name

getWorld

public World getWorld (@Nullable final String worldName)

Method getWorld.

Parameters:
@Nullable final String worldName

getDefaultWorld

public World getDefaultWorld ()

Method getDefaultWorld.

removeWorld

public boolean removeWorld (@Nonnull final String name)

Method removeWorld.

Parameters:
@Nonnull final String name

RemoveWorldEvent

public new RemoveWorldEvent (world, RemoveWorldEvent.RemovalReason.GENERAL)

Method RemoveWorldEvent.

Parameters:
world world
RemoveWorldEvent.RemovalReason.GENERAL RemoveWorldEvent.RemovalReason.GENERAL

removeWorldExceptionally

public void removeWorldExceptionally (@Nonnull final String name)

Method removeWorldExceptionally.

Parameters:
@Nonnull final String name

getPath

public Path getPath ()

Method getPath.

getWorlds

public World> getWorlds ()

Method getWorlds.

getPlayers

public List getPlayers ()

Method getPlayers.

getPlayer

public PlayerRef getPlayer (@Nonnull final UUID uuid)

Method getPlayer.

Parameters:
@Nonnull final UUID uuid

getPlayerByUsername

public PlayerRef getPlayerByUsername (@Nonnull final String value, @Nonnull final NameMatching matching)

Method getPlayerByUsername.

Parameters:
@Nonnull final String value
@Nonnull final NameMatching matching

getPlayerCount

public int getPlayerCount ()

Method getPlayerCount.

addPlayer

public CompletableFuture addPlayer (@Nonnull final Channel channel, @Nonnull final String language, @Nonnull final ProtocolVersion protocolVersion, @Nonnull final UUID uuid, @Nonnull final String username, @Nonnull final PlayerAuthentication auth, final int clientViewRadiusChunks, @Nullable final PlayerSkin skin)

Method addPlayer.

Parameters:
@Nonnull final Channel channel
@Nonnull final String language
@Nonnull final ProtocolVersion protocolVersion
@Nonnull final UUID uuid
@Nonnull final String username
@Nonnull final PlayerAuthentication auth
final int clientViewRadiusChunks
@Nullable final PlayerSkin skin

UUIDComponent

public new UUIDComponent (uuid)

Method UUIDComponent.

Parameters:
uuid uuid

PlayerSkinComponent

public new PlayerSkinComponent (skin)

Method PlayerSkinComponent.

Parameters:
skin skin

ModelComponent

public new ModelComponent (CosmeticsModule.get()

Method ModelComponent.

Parameters:
CosmeticsModule.get( CosmeticsModule.get(

PlayerConnectEvent

public new PlayerConnectEvent (holder, playerRefComponent, (lastWorld != null)

Method PlayerConnectEvent.

Parameters:
holder holder
playerRefComponent playerRefComponent
(lastWorld != null

ServerTags

public new ServerTags (AssetRegistry.getClientTags()

Method ServerTags.

Parameters:
AssetRegistry.getClientTags( AssetRegistry.getClientTags(

if

public else if (playerComponent.wasRemoved()

Method if.

Parameters:
playerComponent.wasRemoved( playerComponent.wasRemoved(

removePlayer

public void removePlayer (@Nonnull final PlayerRef playerRef)

Method removePlayer.

Parameters:
@Nonnull final PlayerRef playerRef

PlayerDisconnectEvent

public new PlayerDisconnectEvent (playerRef)

Method PlayerDisconnectEvent.

Parameters:
playerRef playerRef

finalizePlayerRemoval

private void finalizePlayerRemoval (@Nonnull final PlayerRef playerRef)

Method finalizePlayerRemoval.

Parameters:
@Nonnull final PlayerRef playerRef

resetPlayer

public CompletableFuture resetPlayer (@Nonnull final PlayerRef oldPlayer)

Method resetPlayer.

Parameters:
@Nonnull final PlayerRef oldPlayer

sendMessage

public void sendMessage (@Nonnull final Message message)

Method sendMessage.

Parameters:
@Nonnull final Message message

broadcastPacket

public void broadcastPacket (@Nonnull final Packet packet)

Method broadcastPacket.

Parameters:
@Nonnull final Packet packet

broadcastPacketNoCache

public void broadcastPacketNoCache (@Nonnull final Packet packet)

Method broadcastPacketNoCache.

Parameters:
@Nonnull final Packet packet

getPlayerStorage

public PlayerStorage getPlayerStorage ()

Method getPlayerStorage.

setPlayerStorage

public void setPlayerStorage (@Nonnull final PlayerStorage playerStorage)

Method setPlayerStorage.

Parameters:
@Nonnull final PlayerStorage playerStorage

getWorldConfigProvider

public WorldConfigProvider getWorldConfigProvider ()

Method getWorldConfigProvider.

getPlayerRefComponentType

public PlayerRef> getPlayerRefComponentType ()

Method getPlayerRefComponentType.

getLegacyBlockIdMap

public String> getLegacyBlockIdMap ()

Method getLegacyBlockIdMap.

getWorldGenPath

static Path getWorldGenPath ()

Method getWorldGenPath.