So what I am trying to do is when I wear my staff item id 15050 it stops attacking but it is not working.
I was wondering if anyone else had this problem and knows how to solve this here is my wearitem class.

package server.model.players.packets;

import server.model.players.Client;
import server.model.players.PacketType;


/**
* Wear Item
**/
public class WearItem implements PacketType {

@Override
public void processPacket(Client c, int packetType, int packetSize) {
c.wearId = c.getInStream().readUnsignedWord();
c.wearSlot = c.getInStream().readUnsignedWordA();
c.interfaceId = c.getInStream().readUnsignedWordA();

if(!c.getItems().playerHasItem(c.wearId, 1, c.wearSlot)) {
return;
}
int oldCombatTimer = c.attackTimer;
if (c.playerIndex > 0 || c.npcIndex > 0)
c.getCombat().resetPlayerAttack();
if (c.wearId == 15040 || c.wearId == 15050) {
c.getCombat().resetPlayerAttack();
return;
}
if (c.wearId >= 5509 && c.wearId <= 5515) {
int pouch = -1;
int a = c.wearId;
if (a == 5509)
pouch = 0;
if (a == 5510)
pouch = 1;
if (a == 5512)
pouch = 2;
if (a == 5514)
pouch = 3;
c.getPA().emptyPouch(pouch);
return;
}
//c.attackTimer = oldCombatTimer;
c.getItems().wearItem(c.wearId, c.wearSlot);
}

}