RuneHive-Game
Loading...
Searching...
No Matches
ClanResourceBox.java
Go to the documentation of this file.
1package com.runehive.content.itemaction.impl;
2
3import com.runehive.content.itemaction.ItemAction;
4import com.runehive.game.world.entity.mob.player.Player;
5import com.runehive.game.world.items.Item;
6
7public 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}
Handles executing an item action.
boolean inventory(Player player, Item item, int opcode)
The execution method of the action.
This class represents a character controlled by a player.
Definition Player.java:125
The container class that represents an item that can be interacted with.
Definition Item.java:21