1package com.runehive.game.action.impl;
3import com.runehive.game.action.Action;
4import com.runehive.game.action.policy.WalkablePolicy;
5import com.runehive.game.world.entity.mob.Direction;
6import com.runehive.game.world.entity.mob.player.Player;
7import com.runehive.game.world.position.Position;
8import com.runehive.game.world.object.GameObject;
9import com.runehive.net.packet.out.SendMessage;
10import com.runehive.util.MessageColor;
11import com.runehive.util.Utility;
13import java.util.function.Predicate;
29 this(player,
door, destination,
face,
null,
null);
33 super(player, 1,
true);
36 this.position = destination;
54 if (!
getMob().movement.isMoving())
59 if (
getMob().getCombat().inCombat())
60 getMob().getCombat().reset();
65 }
else if (
count == 1) {
T getMob()
Gets the player.
Action(T mob, int delay, boolean instant)
Creates a new Action randomevent.
void onCancel(boolean logout)
A function executed on cancellation.
boolean prioritized()
Determines if this action is prioritized.
final Predicate< Player > condition
DoorAction(Player player, GameObject door, Position destination, Direction face)
boolean canSchedule()
A function executed on registration.
void execute()
A function representing the unit of work that will be carried out.
DoorAction(Player player, GameObject door, Position destination, Direction face, Predicate< Player > condition, String message)
WalkablePolicy getWalkablePolicy()
Gets the WalkablePolicy of this action.
String getName()
Gets the name of this action.
synchronized final void cancel()
Cancels all subsequent executions.
This class represents a character controlled by a player.
Represents a single tile on the game world.
The OutgoingPacket that sends a message to a Players chatbox in the client.
Handles miscellaneous methods.
static boolean within(Position source, Position target, int distance)
A queue policy determines whether the action can occur while walking.
NON_WALKABLE
This indicates actions cannot occur while walking.
Represents the enumerated directions an entity can walk or face.
static Direction getOppositeDirection(Direction direction)
Holds an enum of colors for ease.
Represents a game object.