Jump to content

Teleporting with equipped jewelry


Oxyy

Recommended Posts

Hi, can someone help me with this?

 

I'm trying to check what I'm currenrly wearing onmy head (HAT slot). However the if statement is not returning true (which it should) :

if(equipment.isWearingItem(EquipmentSlot.HAT)) { // this is returning false even when I'm wearing something
			log("we have something on the head");
			String item = equipment.getItemInSlot(EquipmentSlot.HAT.slot).getName();
			if(item.equals("whatever")) {
                           // rest of the code

Any help? Also, some equipment methods in the API require slot number. What is it? Is it ID from the interface debugger? This new osb2 equip API is way different than before.

Link to comment
Share on other sites

when the equipment method arugment ask for a slot depends if its an int then its EquipmentSlot.TYPE.slot, else if its a EquipmentSlot then its EquipmentSlot.TYPE

 

i guess the methods is broken. i tryed out the method and it was return false so.. it isnt you

 

Also its better if you do 

if(item.equalsIgnoreCase("whatever")) {

Edited by josedpay
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...