Code:int count = 0; for (int j = 0; j < c.playerEquipment.length; j++) { if (c.playerEquipment[j] <= 0) { count++; } } if(count == c.playerEquipment.length) { c.sendMessage("you have no items on"); }
|
This is the method if you have any items on it will see that. But what about if you have no items on ?
Code:for (int j = 0; j < c.playerEquipment.length; j++) { if (c.playerEquipment[j] > 0) { c.sendMessage("@red@You may not wear items while using this command.");
Code:int count = 0; for (int j = 0; j < c.playerEquipment.length; j++) { if (c.playerEquipment[j] <= 0) { count++; } } if(count == c.playerEquipment.length) { c.sendMessage("you have no items on"); }
i dont get the question?you want one that checks if playerEquipment == 0? whats the difference from that and the one you have?...
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |