Fixed Spout item checks.

This commit is contained in:
GJ 2012-06-01 15:29:16 -04:00
parent 41e9bd3cb5
commit 6637758ad0
2 changed files with 4 additions and 5 deletions

View File

@ -3,10 +3,10 @@ package com.gmail.nossr50.api;
import java.util.ArrayList;
import java.util.List;
import org.getspout.spoutapi.inventory.SpoutItemStack;
import org.bukkit.inventory.ItemStack;
public class SpoutToolsAPI {
public static List<SpoutItemStack> spoutSwords = new ArrayList<SpoutItemStack>();
public static List<ItemStack> spoutSwords = new ArrayList<ItemStack>();
/**
* Add a custom Spout sword to mcMMO for XP gain & ability use.
@ -15,7 +15,7 @@ public class SpoutToolsAPI {
*
* @param spoutSword The sword to add
*/
public void addCustomSword(SpoutItemStack spoutSword) {
public void addCustomSword(ItemStack spoutSword) {
spoutSwords.add(spoutSword);
}
}

View File

@ -1,7 +1,6 @@
package com.gmail.nossr50.util;
import org.bukkit.inventory.ItemStack;
import org.getspout.spoutapi.inventory.SpoutItemStack;
import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.api.SpoutToolsAPI;
@ -33,7 +32,7 @@ public class ItemChecks {
if (customToolsEnabled && CustomToolsConfig.getInstance().customSwordIDs.contains(is.getTypeId())) {
return true;
}
else if (mcMMO.p.spoutEnabled && is instanceof SpoutItemStack && SpoutToolsAPI.spoutSwords.contains((SpoutItemStack) is)) {
else if (mcMMO.p.spoutEnabled && SpoutToolsAPI.spoutSwords.contains(is)) {
return true;
}
else {