mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-03 08:39:11 +00:00
Make event handler comments consistent.
This commit is contained in:
@@ -6,7 +6,7 @@ import org.apollo.game.event.impl.ButtonEvent;
|
||||
import org.apollo.game.model.Player;
|
||||
|
||||
/**
|
||||
* An {@link EventHandler} which responds to {@link ButtonEvent}s for withdrawing items as notes.
|
||||
* An {@link EventHandler} that responds to {@link ButtonEvent}s for withdrawing items as notes.
|
||||
*
|
||||
* @author Graham
|
||||
*/
|
||||
|
||||
@@ -10,7 +10,7 @@ import org.apollo.game.model.inter.bank.BankUtils;
|
||||
import org.apollo.game.model.inter.bank.BankWithdrawEnterAmountListener;
|
||||
|
||||
/**
|
||||
* An event handler which handles withdrawing and depositing items from/to a player's bank.
|
||||
* An {@link EventHandler} that handles withdrawing and depositing items from/to a player's bank.
|
||||
*
|
||||
* @author Graham
|
||||
*/
|
||||
@@ -21,7 +21,7 @@ public final class BankEventHandler extends EventHandler<ItemActionEvent> {
|
||||
*
|
||||
* @param option The option.
|
||||
* @return The amount.
|
||||
* @throws IllegalArgumentException If the option is not legal.
|
||||
* @throws IllegalArgumentException If the option is invalid.
|
||||
*/
|
||||
private static final int optionToAmount(int option) {
|
||||
switch (option) {
|
||||
@@ -51,10 +51,8 @@ public final class BankEventHandler extends EventHandler<ItemActionEvent> {
|
||||
if (amount == -1) {
|
||||
player.getInterfaceSet().openEnterAmountDialog(
|
||||
new BankDepositEnterAmountListener(player, event.getSlot(), event.getId()));
|
||||
} else {
|
||||
if (!BankUtils.deposit(player, event.getSlot(), event.getId(), amount)) {
|
||||
ctx.breakHandlerChain();
|
||||
}
|
||||
} else if (!BankUtils.deposit(player, event.getSlot(), event.getId(), amount)) {
|
||||
ctx.breakHandlerChain();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import org.apollo.game.model.Player;
|
||||
import org.apollo.game.sync.block.SynchronizationBlock;
|
||||
|
||||
/**
|
||||
* An event handler which broadcasts public chat messages.
|
||||
* An {@link EventHandler} that broadcasts public chat messages.
|
||||
*
|
||||
* @author Graham
|
||||
*/
|
||||
|
||||
@@ -6,7 +6,7 @@ import org.apollo.game.event.impl.ChatEvent;
|
||||
import org.apollo.game.model.Player;
|
||||
|
||||
/**
|
||||
* An event handler which verifies chat events.
|
||||
* An {@link EventHandler} that verifies {@link ChatEvent}s.
|
||||
*
|
||||
* @author Graham
|
||||
*/
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.apollo.game.model.Player;
|
||||
import org.apollo.game.model.World;
|
||||
|
||||
/**
|
||||
* An {@link EventHandler} which dispatches {@link CommandEvent}s.
|
||||
* An {@link EventHandler} that dispatches {@link CommandEvent}s.
|
||||
*
|
||||
* @author Graham
|
||||
*/
|
||||
|
||||
@@ -13,7 +13,7 @@ import org.apollo.game.model.inv.SynchronizationInventoryListener;
|
||||
import org.apollo.util.LanguageUtil;
|
||||
|
||||
/**
|
||||
* An event handler which equips items.
|
||||
* An {@link EventHandler} that equips items.
|
||||
*
|
||||
* @author Major
|
||||
* @author Graham
|
||||
|
||||
@@ -10,7 +10,7 @@ import org.apollo.game.model.inter.bank.BankConstants;
|
||||
import org.apollo.game.model.inv.SynchronizationInventoryListener;
|
||||
|
||||
/**
|
||||
* An {@link EventHandler} which verifies the target item in {@link ItemOnItemEvent}s.
|
||||
* An {@link EventHandler} that verifies the target item in {@link ItemOnItemEvent}s.
|
||||
*
|
||||
* @author Chris Fletcher
|
||||
*/
|
||||
@@ -32,6 +32,7 @@ public final class ItemOnItemVerificationHandler extends EventHandler<ItemOnItem
|
||||
inventory = player.getBank();
|
||||
break;
|
||||
default:
|
||||
ctx.breakHandlerChain();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -10,15 +10,12 @@ import org.apollo.game.model.inter.bank.BankConstants;
|
||||
import org.apollo.game.model.inv.SynchronizationInventoryListener;
|
||||
|
||||
/**
|
||||
* An {@link EventHandler} which verifies {@link InventoryItemEvent}s.
|
||||
* An {@link EventHandler} that verifies {@link InventoryItemEvent}s.
|
||||
*
|
||||
* @author Chris Fletcher
|
||||
*/
|
||||
public final class ItemVerificationHandler extends EventHandler<InventoryItemEvent> {
|
||||
|
||||
/**
|
||||
* Checks if the information provided by the event is valid, breaking the handler chain if it isn't.
|
||||
*/
|
||||
@Override
|
||||
public void handle(EventHandlerContext ctx, Player player, InventoryItemEvent event) {
|
||||
Inventory inventory;
|
||||
@@ -35,6 +32,7 @@ public final class ItemVerificationHandler extends EventHandler<InventoryItemEve
|
||||
inventory = player.getBank();
|
||||
break;
|
||||
default:
|
||||
ctx.breakHandlerChain();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import org.apollo.game.event.impl.PlayerDesignEvent;
|
||||
import org.apollo.game.model.Player;
|
||||
|
||||
/**
|
||||
* A handler which handles {@link PlayerDesignEvent}s.
|
||||
* An {@link EventHandler} that handles {@link PlayerDesignEvent}s.
|
||||
*
|
||||
* @author Graham
|
||||
*/
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.apollo.game.model.Player;
|
||||
import org.apollo.game.model.settings.Gender;
|
||||
|
||||
/**
|
||||
* A handler which verifies {@link PlayerDesignEvent}s.
|
||||
* An {@link EventHandler} that verifies {@link PlayerDesignEvent}s.
|
||||
*
|
||||
* @author Graham
|
||||
*/
|
||||
|
||||
@@ -10,7 +10,7 @@ import org.apollo.game.model.def.ItemDefinition;
|
||||
import org.apollo.game.model.inv.SynchronizationInventoryListener;
|
||||
|
||||
/**
|
||||
* An event handler which removes equipped items.
|
||||
* An {@link EventHandler} that removes equipped items.
|
||||
*
|
||||
* @author Graham
|
||||
* @author Major
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.apollo.game.model.Position;
|
||||
import org.apollo.game.model.WalkingQueue;
|
||||
|
||||
/**
|
||||
* A handler for the {@link WalkEvent}.
|
||||
* A{@link EventHandler} that handles {@link WalkEvent}s.
|
||||
*
|
||||
* @author Graham
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user