SPIGOT-6208: Throwing ender pearl into end portal causes NPE

This commit is contained in:
Parker Hawke 2021-01-31 14:26:05 +11:00 committed by md_5
parent aeb95e3a30
commit 085fe67aac
No known key found for this signature in database
GPG Key ID: E8E901AC7C617C11

View File

@ -101,7 +101,15 @@
}
public <T> void addTicket(TicketType<T> tickettype, ChunkCoordIntPair chunkcoordintpair, int i, T t0) {
@@ -251,6 +281,26 @@
@@ -210,6 +240,7 @@
public void b(SectionPosition sectionposition, EntityPlayer entityplayer) {
long i = sectionposition.r().pair();
ObjectSet<EntityPlayer> objectset = (ObjectSet) this.c.get(i);
+ if (objectset == null) return; // CraftBukkit - SPIGOT-6208
objectset.remove(entityplayer);
if (objectset.isEmpty()) {
@@ -251,6 +282,26 @@
return this.i.a();
}