22 package com.realtime.crossfire.jxclient.gui.commands;
28 import org.jetbrains.annotations.NotNull;
29 import org.jetbrains.annotations.Nullable;
44 crossfireServerConnection.sendApply(item.getTag());
55 if (item.isLocked()) {
56 crossfireServerConnection.drawInfo(
"This item is locked. To drop it, first unlock by SHIFT+left-clicking on it.", 3);
58 commandQueue.sendMove(floor, item.getTag());
70 crossfireServerConnection.sendExamine(item.getTag());
81 crossfireServerConnection.sendLock(
true, item.getTag());
92 crossfireServerConnection.sendLock(!item.isLocked(), item.getTag());
103 crossfireServerConnection.sendMark(item.getTag());
114 crossfireServerConnection.sendLock(
false, item.getTag());
124 return guiItem != null && guiItem.getItem() != null;
135 if (guiItem == null) {
139 final CfItem item = guiItem.getItem();
144 doExecute(item, crossfireServerConnection, floor, commandQueue);
static boolean canExecute(@Nullable final GUIItemItem guiItem)
Returns whether the action can be executed.
A GUIElement instance representing an in-game item.
void execute(@Nullable final GUIItemItem guiItem, @NotNull final CrossfireServerConnection crossfireServerConnection, final int floor, @NotNull final CommandQueue commandQueue)
Executes the action.
Adds encoding/decoding of crossfire protocol packets to a ServerConnection.
Maintains the pending (ncom) commands sent to the server.
The representation of a Crossfire Item, client-side.