ChunkTicket
Namespace Mc.Scripting.Worlds · Kind class (sealed)
public sealed class ChunkTicket : IDisposable, IPluginResourceA 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.
Properties
Section titled “Properties”| 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. |
ChunkX
Section titled “ChunkX”public int ChunkX { get; }The chunk x.
ChunkZ
Section titled “ChunkZ”public int ChunkZ { get; }The chunk z.
IsActive
Section titled “IsActive”public bool IsActive { get; }Whether the ticket is still held.
IsLoaded
Section titled “IsLoaded”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.
Methods
Section titled “Methods”| Member | Description |
|---|---|
void Dispose() |
Same as ChunkTicket.Release. |
void Release() |
Gives the chunk back (it may unload after a grace period). |
Dispose
Section titled “Dispose”public void Dispose()Same as ChunkTicket.Release.
Release
Section titled “Release”public void Release()Gives the chunk back (it may unload after a grace period). Does nothing a second time.