Skip to content

ChunkTicket

Namespace Mc.Scripting.Worlds · Kind class (sealed)

public sealed class ChunkTicket : IDisposable, IPluginResource

A hold on a chunk: while the ticket exists the chunk is kept loaded (and ticking when a player is near enough, like any chunk). Tickets are counted: the chunk unloads after the last holder released it. Create tickets with plugin.ChunkTickets; all of a plugin’s tickets are released when it unloads.

Member Description
int ChunkX { get; } The chunk x.
int ChunkZ { get; } The chunk z.
bool IsActive { get; } Whether the ticket is still held.
bool IsLoaded { get; } Whether the chunk has finished loading (loading takes a few ticks, and a chunk that has to be generated takes longer).
World World { get; } The dimension.
public int ChunkX { get; }

The chunk x.

public int ChunkZ { get; }

The chunk z.

public bool IsActive { get; }

Whether the ticket is still held.

public bool IsLoaded { get; }

Whether the chunk has finished loading (loading takes a few ticks, and a chunk that has to be generated takes longer).

public World World { get; }

The dimension.

Member Description
void Dispose() Same as ChunkTicket.Release.
void Release() Gives the chunk back (it may unload after a grace period).
public void Dispose()

Same as ChunkTicket.Release.

public void Release()

Gives the chunk back (it may unload after a grace period). Does nothing a second time.

IPluginResource · World