mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-25 22:56:45 +01:00
Should fix IndexOutOfBoundsException when copying
fixes#2290
This commit is contained in:
parent
4c8457ad14
commit
ed10877431
@ -10,6 +10,8 @@ import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.util.EulerAngle;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public final class ReplicatingEntityWrapper extends EntityWrapper {
|
||||
|
||||
private final short depth;
|
||||
@ -38,9 +40,9 @@ public final class ReplicatingEntityWrapper extends EntityWrapper {
|
||||
if (depth == 0) {
|
||||
return;
|
||||
}
|
||||
Entity passenger = entity.getPassengers().get(0);
|
||||
if (passenger != null) {
|
||||
this.base.passenger = new ReplicatingEntityWrapper(passenger, depth);
|
||||
List<Entity> passengers = entity.getPassengers();
|
||||
if (passengers.size() > 0) {
|
||||
this.base.passenger = new ReplicatingEntityWrapper(passengers.get(0), depth);
|
||||
}
|
||||
this.base.fall = entity.getFallDistance();
|
||||
this.base.fire = (short) entity.getFireTicks();
|
||||
|
Loading…
Reference in New Issue
Block a user