mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 07:06:45 +01:00
Fixing build issues caused by recent changes to CraftBukkit.
This commit is contained in:
parent
b042d78186
commit
569079fed0
7
pom.xml
7
pom.xml
@ -121,13 +121,6 @@
|
|||||||
<type>jar</type>
|
<type>jar</type>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.bukkit</groupId>
|
|
||||||
<artifactId>craftbukkit</artifactId>
|
|
||||||
<version>LATEST</version>
|
|
||||||
<type>jar</type>
|
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.getspout</groupId>
|
<groupId>org.getspout</groupId>
|
||||||
<artifactId>spoutpluginapi</artifactId>
|
<artifactId>spoutpluginapi</artifactId>
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.gmail.nossr50.skills.gathering;
|
package com.gmail.nossr50.skills.gathering;
|
||||||
|
|
||||||
|
import java.lang.reflect.Method;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -17,8 +18,6 @@ import org.bukkit.event.player.PlayerFishEvent;
|
|||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.material.Wool;
|
import org.bukkit.material.Wool;
|
||||||
|
|
||||||
import org.bukkit.craftbukkit.entity.CraftSkeleton;
|
|
||||||
|
|
||||||
import com.gmail.nossr50.config.AdvancedConfig;
|
import com.gmail.nossr50.config.AdvancedConfig;
|
||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.config.TreasuresConfig;
|
import com.gmail.nossr50.config.TreasuresConfig;
|
||||||
@ -338,7 +337,28 @@ public class Fishing {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case SKELETON:
|
case SKELETON:
|
||||||
if (((CraftSkeleton) le).getHandle().getSkeletonType() == 1) {
|
Object o;
|
||||||
|
Class c;
|
||||||
|
Method m;
|
||||||
|
|
||||||
|
o = le;
|
||||||
|
c = o.getClass();
|
||||||
|
|
||||||
|
boolean isWitherSkeleton = false;
|
||||||
|
|
||||||
|
try {
|
||||||
|
m = c.getDeclaredMethod("getHandle");
|
||||||
|
o = m.invoke(o);
|
||||||
|
|
||||||
|
c = o.getClass();
|
||||||
|
m = c.getDeclaredMethod("getSkeletonType");
|
||||||
|
o = m.invoke(o);
|
||||||
|
|
||||||
|
if(o instanceof Integer)
|
||||||
|
isWitherSkeleton = (((Integer) o) == 1);
|
||||||
|
} catch(Exception e) {}
|
||||||
|
|
||||||
|
if (isWitherSkeleton) {
|
||||||
if (DROP_NUMBER > 95) {
|
if (DROP_NUMBER > 95) {
|
||||||
Misc.dropItem(location, new ItemStack(Material.SKULL_ITEM, 1, (short) 1));
|
Misc.dropItem(location, new ItemStack(Material.SKULL_ITEM, 1, (short) 1));
|
||||||
} else if (DROP_NUMBER > 50) {
|
} else if (DROP_NUMBER > 50) {
|
||||||
|
Loading…
Reference in New Issue
Block a user