Add Plugin Chunk Ticket API

Allows plugins to force certain chunks to be kept loaded for as long as they are enabled.

By: Spottedleaf <Spottedleaf@users.noreply.github.com>
This commit is contained in:
CraftBukkit/Spigot
2019-07-08 12:14:16 +10:00
parent 09309c363f
commit aedce73dd1
6 changed files with 268 additions and 2 deletions

View File

@@ -0,0 +1,20 @@
--- a/net/minecraft/server/Ticket.java
+++ b/net/minecraft/server/Ticket.java
@@ -6,7 +6,7 @@
private final TicketType<T> a;
private final int b;
- private final T c;
+ public final T c; // CraftBukkit - private -> public // PAIL identifier
private final long d;
protected Ticket(TicketType<T> tickettype, int i, T t0, long j) {
@@ -24,7 +24,7 @@
} else {
int j = Integer.compare(System.identityHashCode(this.a), System.identityHashCode(ticket.a));
- return j != 0 ? j : this.a.a().compare(this.c, ticket.c);
+ return j != 0 ? j : this.a.a().compare(this.c, (T) ticket.c); // CraftBukkit - decompile error
}
}