1package com.runehive.content.staff;
3import com.runehive.Config;
4import com.runehive.content.dialogue.DialogueFactory;
5import com.runehive.game.world.InterfaceConstants;
6import com.runehive.game.world.World;
7import com.runehive.game.world.entity.mob.Mob;
8import com.runehive.game.world.entity.mob.UpdateFlag;
9import com.runehive.game.world.entity.mob.npc.definition.NpcDefinition;
10import com.runehive.game.world.entity.mob.player.Player;
11import com.runehive.game.world.entity.mob.player.PlayerRight;
12import com.runehive.game.world.entity.mob.player.persist.PlayerSerializer;
13import com.runehive.game.world.entity.mob.player.profile.ProfileRepository;
14import com.runehive.game.world.entity.skill.Skill;
15import com.runehive.game.world.items.containers.pricechecker.PriceType;
16import com.runehive.net.packet.out.SendInputAmount;
17import com.runehive.net.packet.out.SendInputMessage;
18import com.runehive.net.packet.out.SendItemOnInterface;
19import com.runehive.net.packet.out.SendString;
20import com.runehive.util.Utility;
23import java.util.concurrent.TimeUnit;
25import static com.runehive.game.world.entity.mob.player.PlayerRight.*;
54 other.
message(
"<col=FF0D5D>You have been force teleported to " + player.
getName() +
".");
66 other.pvpInstance =
false;
67 other.
message(
"<col=FF0D5D>You have been force teleported home by " + player.
getName() +
".");
79 player.
message(
"<col=FF0D5D>You have force kicked: " + other.
getName() +
".");
97 },
"Jail by hour", () -> {
102 },
"Jail by minute", () -> {
107 },
"Jail forever", () -> {
125 other.
message(
"<col=FF0D5D>You have been unjailed by: " + player.
getName());
126 player.
message(
"<col=FF0D5D>You have unjailed: " + other.
getName());
143 },
"Mute by hour", () -> {
148 },
"Mute by minute", () -> {
153 },
"Mute forever", () -> {
171 other.
message(
"<col=FF0D5D>You have been unmuted by: " + player.
getName());
172 player.
message(
"<col=FF0D5D>You have unmuted: " + other.
getName());
200 if (!list.isEmpty()) {
201 for (
int index = 0; index < 50; index++) {
202 String name = index >= list.size() ?
"" : list.get(index);
224 player.
message(
"You have promoted " + other.
getName() +
" to helper.");
225 },
"Moderator", () -> {
229 player.
message(
"You have promoted " + other.
getName() +
" to moderator.");
230 },
"Administrator", () -> {
234 player.
message(
"You have promoted " + other.
getName() +
" to administrator.");
260 player.
message(
"<col=FF0D5D>You have copied " + other.
getName() +
".");
272 player.
message(
"<col=FF0D5D>You have X-copied " + other.
getName() +
".");
304 int id = Integer.parseInt(input);
342 factory.
sendStatement(
"Are you sure you want to execute this action?");
343 factory.
sendOption(
"Confirm action", runnable,
"Nevermind", factory::clear);
349 if (management.ordinal() == ordinal) {
The class that contains setting-related constants for the server.
static final Position DEFAULT_POSITION
The default, i.e.
Represents a factory class that contains important functions for building dialogues.
final DialogueFactory execute()
Retrieves the next dialogue in the chain and executes it.
void clear()
Clears the current dialogue chain.
final DialogueFactory onAction(Runnable action)
Sets an action so this action can be executed after dialogues are done.
final DialogueFactory sendInformationBox(String title, String...lines)
final DialogueFactory sendStatement(String... lines)
Appends a StatementDialogue to the current dialogue chain.
final DialogueFactory sendOption(String option1, Runnable action1, String option2, Runnable action2)
Appends the OptionDialogue onto the current dialogue chain.
The class that contains helpful information on interfaces.
static final int WITHDRAW_BANK
static final int INVENTORY_STORE
Represents the game world.
static void kickPlayer(Player other)
static final int DEFAULT_INSTANCE
final SkillManager skills
final EnumSet< UpdateFlag > updateFlags
void move(Position position)
Moves the mob to a set position.
Contains the npc definitions.
static NpcDefinition get(int id)
Gets a npc definition from the definition array.
void openInventory(int identification, int overlay)
Opens an inventory interface for the player.
void open(int identification)
Opens an interface for the player.
void copy(Player other)
Copy's the inventory and equipment of another player.
void transform(int npc)
Tranforms player into npc.
This class represents a character controlled by a player.
void setUsername(String username)
final Inventory inventory
final BankVault bankVault
void message(String message)
String getName()
Gets the name of this entity.
Optional< Player > managing
DialogueFactory dialogueFactory
final PlayerPunishment punishment
final InterfaceManager interfaceManager
void send(OutgoingPacket encoder)
final PlayerAssistant playerAssistant
static void save(Player player)
Handles the profile repository, used for gathering important information for all created profiles.
static List< String > getRegistry(String host)
Gets all the registered accounts to a specific host.
static boolean exist(String name)
Checks if a profile is registered to the parameter.
void jail(long duration, TimeUnit unit)
Jailing.
void mute(long duration, TimeUnit unit)
Muting.
Represents a trainable and usable skill.
static final int SKILL_COUNT
The amount of available skills.
void setMaxLevel(int id, int level)
Sets the max level of a skill.
void setCombatLevel()
Sets the mob's combat level.
void setLevel(int id, int level)
Sets the level of a skill.
void clear()
Removes all of the items from this container.
long containerValue(PriceType type)
Gets the total worth of the container using the item's values.
final Item[] toArray()
Returns a shallow copy of the backing array.
int[] tabAmounts
The tab amount array.
void clear()
Removes all of the items from this container.
The OutgoingPacket that sends a string to a Players itemcontainer in the client.
Handles miscellaneous methods.
static String formatName(final String input)
static PlayerManagement forOrdinal(int ordinal)
PlayerManagement(String string)
static void confirm(Player player, Runnable runnable)
Holds all the player right data.
static String getColor(PlayerRight right)
static boolean isOwner(Player player)
static boolean isModerator(Player player)
Checks if the player is a management member.
static boolean isAdministrator(Player player)
Checks if the player is a privileged member.
VALUE
The value price type.
The action execute of the staff panel.
void handle(final Player player)
Handles the execute of the staff panel action.