So basically im getting some wierd errors and need a second opinion...
Code:
compiling...
src\com\rs\game\player\content\ItemConstants.java:112: error: cannot find symbol
if (ItemConstants.isDisabled(item.getName().toLowerCase())) {
^
symbol: method getName()
location: variable item of type Item
src\com\rs\game\player\content\ItemConstants.java:116: error: cannot find symbol
if (item.getName().contains("completionist") && (player.getSkills().getLevel(S
kills.ATTACK) < 99 && player.getSkills().getLevel(Skills.DEFENCE) < 99 && player
.getSkills().getLevel(Skills.STRENGTH) < 99 && player.getSkills().getLevel(Skill
s.HITPOINTS) < 99
^
symbol: method getName()
location: variable item of type Item
src\com\rs\game\player\content\ItemConstants.java:131: error: cannot find symbol
return getDefinitions().getName();
^
symbol: method getDefinitions()
location: class ItemConstants
Note: src\com\rs\game\player\Inventory.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
3 errors
Press any key to continue . . .
this is my code.
Code:
public static boolean canWear(Item item, Player player) {
if (ItemConstants.isDisabled(item.getName().toLowerCase())) {
player.getPackets().sendGameMessage("This item has been temporarily disabled by an adminitrator.");
return false;
}
if (item.getName().contains("completionist") && player.getSkills().getTotalLevel() < 2279) {
player.getPackets().sendGameMessage("You do not meet the requirements to wear this.");
return false;
}
return true;
}
public String getName() {
return getDefinitions().getName();
}
public static boolean isDisabled(String name) {
for (String disabled : Settings.DISABLED_ITEMS) {
if (name.contains(disabled.toLowerCase()))
return true;
}
return false;
}
so basically, i have everything imported i just cant seem to shake these few errors.