Quote Originally Posted by Lumiere View Post
Code:
if (player.getInventory().getFreeSlots() < 28 ||player.getEquipment().getItems() != null) {
If the inventory has less than 28 free slots, OR the player is wearing equipment.

What you want is something like this;

Code:
if (!player.getInventory().isEmpty() && !player.getEquipment().isEmpty()) {
//do stuff
}
This means, if the players inventory is NOT empty, and the players equipment is NOT empty;
Do stuff. You also wont need to use an else statement at all, just start with the next if statement.

Having the else statement is more of personal preference but;
You're checking if the player has items in their inventory or equipment, and if they DO, sending a dialogue, then returning.
You don't need an else statement in this situation, because if they do not have items in their inventory, or equipment, it wont return, and will continue.

EDIT: also, it might be smart to use the WalkToTask method;
Code:
player.setWalkToTask(new WalkToTask(entity, objectPosition, objectSize, new FinalizedMovementTask() {
	public void execute() {

	}
}
I could be wrong, but my assumption is that you'd want to be in-front of, or very nearby to the ditch, before forceMovement is called.
(If you don't already have it being handled this way.)
Thanks for your time,