Merge pull request #334 from Glitchfinder/fixes

More fixes.
This commit is contained in:
nossr50 2012-12-10 05:36:59 -08:00
commit 7500685115
3 changed files with 25 additions and 12 deletions

View File

@ -121,16 +121,9 @@
<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>spoutplugin</artifactId>
<version>dev-SNAPSHOT</version> <version>dev-SNAPSHOT</version>
<type>jar</type> <type>jar</type>
<scope>compile</scope> <scope>compile</scope>

View File

@ -23,7 +23,7 @@ public class AxesCommand extends SkillCommand {
private int bonusDamageAxesMaxBonusLevel = advancedConfig.getBonusDamageAxesMaxBonusLevel(); private int bonusDamageAxesMaxBonusLevel = advancedConfig.getBonusDamageAxesMaxBonusLevel();
private double critMaxChance = advancedConfig.getAxesCriticalChance(); private double critMaxChance = advancedConfig.getAxesCriticalChance();
private int critMaxBonusLevel = advancedConfig.getAxesCriticalMaxBonusLevel(); private int critMaxBonusLevel = advancedConfig.getAxesCriticalMaxBonusLevel();
private int greaterImpactIncreaseLevel = advancedConfig.getGreaterImpactIncreaseLevel(); private int greaterImpactIncreaseLevel = advancedConfig.getArmorImpactIncreaseLevel();
// private double greaterImpactModifier = advancedConfig.getGreaterImpactModifier(); // private double greaterImpactModifier = advancedConfig.getGreaterImpactModifier();
private int abilityLengthIncreaseLevel = advancedConfig.getAbilityLength(); private int abilityLengthIncreaseLevel = advancedConfig.getAbilityLength();

View File

@ -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) {