RuneHive-Game
Loading...
Searching...
No Matches
ClanResourceBox.java
Go to the documentation of this file.
1
package
com.runehive.content.itemaction.impl;
2
3
import
com.runehive.content.itemaction.ItemAction;
4
import
com.runehive.game.world.entity.mob.player.Player;
5
import
com.runehive.game.world.items.Item;
6
7
public
class
ClanResourceBox
extends
ItemAction
{
8
9
@Override
10
public
String
name
() {
11
return
"Clan Resource Box"
;
12
}
13
14
@Override
15
public
boolean
inventory
(
Player
player,
Item
item,
int
opcode) {
16
// if (opcode != 1)
17
return
false
;
18
// Clan channel = ClanRepository.get(player.clan);
19
// if (channel == null) {
20
// player.send(new SendMessage("You need to be in a clan to do this!"));
21
// return true;
22
// }
23
// player.inventory.remove(item);
24
// Item showcaseReward = new Item(Utility.randomElement(ClanUtility.getRewardItems(channel)));
25
// channel.showcaseItems.add(showcaseReward.getId());
26
// player.send(new SendMessage("Inside the box you found " + showcaseReward.getName() + "! Showcase size: " + channel.showcaseItems.size() + "/28", SendMessage.MessageColor.DARK_PURPLE));
27
// return true;
28
}
29
}
com.runehive.content.itemaction.ItemAction
Handles executing an item action.
Definition
ItemAction.java:11
com.runehive.content.itemaction.impl.ClanResourceBox
Definition
ClanResourceBox.java:7
com.runehive.content.itemaction.impl.ClanResourceBox.inventory
boolean inventory(Player player, Item item, int opcode)
The execution method of the action.
Definition
ClanResourceBox.java:15
com.runehive.content.itemaction.impl.ClanResourceBox.name
String name()
The name of the action.
Definition
ClanResourceBox.java:10
com.runehive.game.world.entity.mob.player.Player
This class represents a character controlled by a player.
Definition
Player.java:125
com.runehive.game.world.items.Item
The container class that represents an item that can be interacted with.
Definition
Item.java:21