Class Pickup
java.lang.Object
com.realtime.crossfire.jxclient.settings.options.Pickup
Defines constants for pickup mode.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final long
Pickup mode: everything.static final long
Pickup mode: enable newpickup mode.static final long
Pickup mode: nothing. -
Constructor Summary
ConstructorsConstructorDescriptionPickup
(@NotNull CommandQueue commandQueue, @NotNull OptionManager optionManager) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionlong
Returns the pickup mode.void
setPickupModeNewMode
(long pickupMode, boolean set) Sets or unsets the pickup mode inPU_NEW_MODE
.void
setPickupModeOldMode
(long pickupMode) Sets or unsets the pickup mode withoutPU_NEW_MODE
.void
updatePickupMode
(long pickupMode, boolean sendToServer) Sets the pickup mode.
-
Field Details
-
PU_NOTHING
public static final long PU_NOTHINGPickup mode: nothing.- See Also:
-
PU_EVERYTHING
public static final long PU_EVERYTHINGPickup mode: everything.- See Also:
-
PU_NEW_MODE
public static final long PU_NEW_MODEPickup mode: enable newpickup mode.- See Also:
-
-
Constructor Details
-
Pickup
public Pickup(@NotNull @NotNull CommandQueue commandQueue, @NotNull @NotNull OptionManager optionManager) throws OptionException Creates a new instance. Registers pickup related options.- Parameters:
commandQueue
- the command queue for sending pickup commandsoptionManager
- the option manager to use- Throws:
OptionException
- if an option cannot be registered
-
-
Method Details
-
updatePickupMode
public void updatePickupMode(long pickupMode, boolean sendToServer) Sets the pickup mode.- Parameters:
pickupMode
- the pickup modesendToServer
- whether a /pickup command should be sent to the server
-
getPickupMode
public long getPickupMode()Returns the pickup mode.- Returns:
- the pickup mode
-
setPickupModeOldMode
public void setPickupModeOldMode(long pickupMode) Sets or unsets the pickup mode withoutPU_NEW_MODE
.- Parameters:
pickupMode
- the pickup mode to set
-
setPickupModeNewMode
public void setPickupModeNewMode(long pickupMode, boolean set) Sets or unsets the pickup mode inPU_NEW_MODE
.- Parameters:
pickupMode
- the pickup mode(s) to affectset
-true
=set,false
=unset
-