mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-29 05:55:44 +01:00
SPIGOT-5101: Raids crash
This commit is contained in:
parent
e8b39d430a
commit
0c57560333
19
nms-patches/Raid.patch
Normal file
19
nms-patches/Raid.patch
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
--- a/net/minecraft/server/Raid.java
|
||||||
|
+++ b/net/minecraft/server/Raid.java
|
||||||
|
@@ -137,14 +137,14 @@
|
||||||
|
private void y() {
|
||||||
|
Collection<EntityPlayer> collection = this.r.getPlayers();
|
||||||
|
Set<EntityPlayer> set = Sets.newHashSet(collection);
|
||||||
|
- Iterator iterator = collection.iterator();
|
||||||
|
+ Iterator iterator = set.iterator(); // CraftBukkit
|
||||||
|
|
||||||
|
while (iterator.hasNext()) {
|
||||||
|
EntityPlayer entityplayer = (EntityPlayer) iterator.next();
|
||||||
|
BlockPosition blockposition = new BlockPosition(entityplayer);
|
||||||
|
|
||||||
|
if (this.k.c_(blockposition) != this) {
|
||||||
|
- set.remove(entityplayer);
|
||||||
|
+ iterator.remove(); // CraftBukkit
|
||||||
|
this.r.removePlayer(entityplayer);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user