1package com.runehive.content.itemaction.impl;
3import com.runehive.content.itemaction.ItemAction;
4import com.runehive.game.world.entity.mob.player.Player;
5import com.runehive.game.world.items.Item;
6import com.runehive.game.world.items.ItemDefinition;
7import com.runehive.net.packet.out.SendInputAmount;
8import com.runehive.util.Utility;
38 System.out.println(
"Recharge craws bow");
82 player.crawsBowCharges = 0;
100 player.crawsBowCharges += amount;
101 player.
message(
"You added " + amount +
" charges to your "+
name()+
"");
Handles executing an item action.
String name()
The name of the action.
boolean drop(Player player, Item item)
static final short CRAWS_CHARGED_ID
boolean inventory(Player player, Item item, int opcode)
The execution method of the action.
static final short ETHER_ID
boolean equipment(Player player, Item item, int opcode)
boolean itemOnItem(Player player, Item first, Item second)
void check(Player player)
static final short CRAWS_UNCHARGED_ID
void charge(Player player, int amount)
This class represents a character controlled by a player.
final Inventory inventory
void message(String message)
void send(OutgoingPacket encoder)
Represents all of an in-game Item's attributes.
static ItemDefinition get(int id)
Gets an item definition.
String getName()
Gets the item name.
The container class that represents an item that can be interacted with.
final int getId()
Gets the identification of this item.
final int computeAmountForId(int id)
Computes the total quantity of the Items in this container with id.
boolean remove(Item item)
Attempts to withdraw item from this container.
boolean add(Item item)
Attempts to deposit item into this container.
boolean contains(int id)
Determines if this container contains id.
void refresh()
Refreshes the players inventory.
Handles miscellaneous methods.
static String formatDigits(final int amount)
Formats digits for integers.