Fixed a ClassCastException
This commit is contained in:
parent
372d6ae022
commit
d1f21f867a
@ -1,5 +1,5 @@
|
|||||||
name: BloodMoon
|
name: BloodMoon
|
||||||
version: 0.13.2
|
version: 0.13.3
|
||||||
main: uk.co.jacekk.bukkit.bloodmoon.BloodMoon
|
main: uk.co.jacekk.bukkit.bloodmoon.BloodMoon
|
||||||
load: startup
|
load: startup
|
||||||
commands:
|
commands:
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package uk.co.jacekk.bukkit.bloodmoon.entities;
|
package uk.co.jacekk.bukkit.bloodmoon.entities;
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
import java.util.ArrayList;
|
|
||||||
|
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
|
import org.bukkit.craftbukkit.util.UnsafeList;
|
||||||
import org.bukkit.entity.Skeleton;
|
import org.bukkit.entity.Skeleton;
|
||||||
|
|
||||||
import uk.co.jacekk.bukkit.bloodmoon.BloodMoon;
|
import uk.co.jacekk.bukkit.bloodmoon.BloodMoon;
|
||||||
@ -28,7 +28,7 @@ public class BloodMoonEntitySkeleton extends net.minecraft.server.EntitySkeleton
|
|||||||
a.setAccessible(true);
|
a.setAccessible(true);
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
ArrayList<PathfinderGoal> goals = (ArrayList<PathfinderGoal>) a.get(this.goalSelector);
|
UnsafeList<PathfinderGoal> goals = (UnsafeList<PathfinderGoal>) a.get(this.goalSelector);
|
||||||
|
|
||||||
for (Object item : goals){
|
for (Object item : goals){
|
||||||
Field goal = item.getClass().getDeclaredField("a");
|
Field goal = item.getClass().getDeclaredField("a");
|
||||||
|
Loading…
Reference in New Issue
Block a user