Begin trying to remove newly-deprecated "magic numbers"

This commit is contained in:
GJ
2013-09-05 14:55:08 -04:00
parent a639a37637
commit fd8d9b02a9
10 changed files with 27 additions and 20 deletions

View File

@ -5,6 +5,7 @@ import org.bukkit.DyeColor;
import org.bukkit.Material;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.material.Dye;
import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.api.SpoutToolsAPI;
@ -499,7 +500,7 @@ public class ItemUtils {
return true;
case INK_SACK:
return item.getData().getData() == DyeColor.BLUE.getDyeData();
return ((Dye) item.getData()).getColor() == DyeColor.BLUE;
default:
return false;
@ -545,7 +546,7 @@ public class ItemUtils {
return true;
case INK_SACK:
return item.getData().getData() == DyeColor.BLUE.getDyeData();
return ((Dye) item.getData()).getColor() == DyeColor.BLUE;
default:
return false;
@ -580,7 +581,7 @@ public class ItemUtils {
return true;
case INK_SACK:
return item.getData().getData() == DyeColor.BROWN.getDyeData();
return ((Dye) item.getData()).getColor() == DyeColor.BROWN;
default:
return false;