1package com.runehive.content.itemaction.impl;
3import com.runehive.content.clanchannel.ClanUtility;
4import com.runehive.content.clanchannel.channel.ClanChannel;
5import com.runehive.content.clanchannel.content.ClanLevel;
6import com.runehive.content.itemaction.ItemAction;
7import com.runehive.game.world.entity.mob.player.Player;
8import com.runehive.game.world.items.Item;
9import com.runehive.net.packet.out.SendMessage;
10import com.runehive.util.Utility;
12import java.util.ArrayList;
19 return "Clan Showcase Box";
28 if (channel ==
null) {
32 if (channel.
getShowcase().showcaseItems.size() >= 28) {
33 player.
send(
new SendMessage(
"You have reached the maximum capacity of showcase items you can hold. Please delete an item to proceed."));
37 List<Item> items =
new ArrayList<>();
40 Item rewardItem =
new Item(reward, 1);
42 if (rewardItem.
getId() != showcase.getId())
43 items.add(rewardItem);
47 if (items.isEmpty()) {
54 channel.
message(
"We just received " + showcaseReward.
getName() +
" from the showcase box!");
This class holds all the util methods for the clan channel system.
static int[] getRewardItems(ClanLevel level)
Gets the rewards based on the clan level.
Handles the clan chat channel.
ClanShowcase getShowcase()
Item[] getShowcaseItems()
void message(Object... messages)
Handles messaging all the members in the clan channel.
Handles executing an item action.
boolean inventory(Player player, Item item, int opcode)
The execution method of the action.
String name()
The name of the action.
This class represents a character controlled by a player.
final Inventory inventory
void send(OutgoingPacket encoder)
The container class that represents an item that can be interacted with.
final int getId()
Gets the identification of this item.
boolean remove(Item item)
Attempts to withdraw item from this container.
The OutgoingPacket that sends a message to a Players chatbox in the client.
Handles miscellaneous methods.
static< T > T randomElement(Collection< T > collection)
Picks a random element out of any array type.
Handles the clan levels (based off the total experience earned).