public class Pickup
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
PickupOption |
armor
Pickup mode: armors.
|
PickupOption |
arrow
Pickup mode: arrows.
|
PickupOption |
boot
Pickup mode: boots.
|
PickupOption |
bow
Pickup mode: bows.
|
PickupOption |
cloak
Pickup mode: cloaks.
|
private CommandQueue |
commandQueue
The command queue for sending pickup commands.
|
PickupOption |
container
Pickup mode: container.
|
static long |
DEFAULT_PICKUP_MODE
The default pickup mode.
|
PickupOption |
drink
Pickup mode: drinks.
|
PickupOption |
flesh
Pickup mode: flesh.
|
PickupOption |
food
Pickup mode: food.
|
PickupOption |
glove
Pickup mode: gloves.
|
PickupOption |
helmet
Pickup mode: helmets.
|
PickupOption |
inhibit
Pickup mode: disable pickup.
|
PickupOption |
jewel
Pickup mode: rings and amulets.
|
PickupOption |
key
Pickup mode: keys.
|
PickupOption |
magicalItem
Pickup mode: magical items.
|
PickupOption |
magicDevice
Pickup mode: magic devices.
|
PickupOption |
meleeWeapon
Pickup mode: all weapons.
|
PickupOption |
missileWeapon
Pickup mode: missile weapons.
|
PickupOption |
notCursed
Pickup mode: ignore cursed items.
|
private long |
pickupMode
The pickup mode.
|
private java.util.Collection<PickupOption> |
pickupOptions
All pickup options.
|
PickupOption |
potion
Pickup mode: potions.
|
private static long |
PU_DEBUG
Pickup mode: debug.
|
private static long |
PU_NEW_MODE
Pickup mode: enable newpickup mode.
|
static long |
PU_NOTHING
Pickup mode: nothing.
|
static long |
PU_RATIO
Pickup mode: mask for value/weight ratio.
|
PickupOption |
readable
Pickup mode: normal books and scrolls.
|
PickupOption |
shield
Pickup mode: shields.
|
PickupOption |
skillscroll
Pickup mode: skillscrolls.
|
PickupOption |
spellbook
Pickup mode: spellbooks.
|
PickupOption |
stop
Pickup mode: stop before pickup.
|
PickupOption |
valuables
Pickup mode: money and gems.
|
Constructor and Description |
---|
Pickup(CommandQueue commandQueue,
OptionManager optionManager)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
long |
getPickupMode()
Returns the pickup mode.
|
private PickupOption |
newPickupOption(long option,
java.lang.String tooltipText)
Creates a new
PickupOption . |
void |
setPickupMode(long pickupMode,
boolean set)
Sets or unsets the pickup mode.
|
void |
updatePickupMode(long pickupMode,
boolean sendToServer)
Sets the pickup mode.
|
@NotNull public final PickupOption armor
@NotNull public final PickupOption arrow
@NotNull public final PickupOption boot
@NotNull public final PickupOption bow
@NotNull public final PickupOption cloak
@NotNull private final CommandQueue commandQueue
@NotNull public final PickupOption container
public static final long DEFAULT_PICKUP_MODE
@NotNull public final PickupOption drink
@NotNull public final PickupOption flesh
@NotNull public final PickupOption food
@NotNull public final PickupOption glove
@NotNull public final PickupOption helmet
@NotNull public final PickupOption inhibit
@NotNull public final PickupOption jewel
@NotNull public final PickupOption key
@NotNull public final PickupOption magicalItem
@NotNull public final PickupOption magicDevice
@NotNull public final PickupOption meleeWeapon
@NotNull public final PickupOption missileWeapon
@NotNull public final PickupOption notCursed
private long pickupMode
@NotNull private final java.util.Collection<PickupOption> pickupOptions
@NotNull public final PickupOption potion
private static final long PU_DEBUG
private static final long PU_NEW_MODE
public static final long PU_NOTHING
public static final long PU_RATIO
@NotNull public final PickupOption readable
@NotNull public final PickupOption shield
@NotNull public final PickupOption skillscroll
@NotNull public final PickupOption spellbook
@NotNull public final PickupOption stop
@NotNull public final PickupOption valuables
public Pickup(@NotNull CommandQueue commandQueue, @NotNull OptionManager optionManager) throws OptionException
commandQueue
- the command queue for sending pickup commandsoptionManager
- the option manager to useOptionException
- if an option cannot be registeredpublic long getPickupMode()
@NotNull private PickupOption newPickupOption(long option, @NotNull java.lang.String tooltipText)
PickupOption
.option
- the pickup valuetooltipText
- the tooltip text to explain this optionpublic void setPickupMode(long pickupMode, boolean set)
pickupMode
- the pickup mode(s) to affectset
- true
=set, false
=unsetpublic void updatePickupMode(long pickupMode, boolean sendToServer)
pickupMode
- the pickup modesendToServer
- whether a /pickup command should be sent to the
server