23 package com.realtime.crossfire.jxclient.gui.commands;
30 import org.jetbrains.annotations.NotNull;
31 import org.jetbrains.annotations.Nullable;
45 crossfireServerConnection.sendApply(item.getTag());
54 protected void doExecute(@NotNull
final CfItem item, @NotNull
final CrossfireServerConnection crossfireServerConnection,
final int floor, @NotNull
final CommandQueue commandQueue) {
55 if (item.isLocked()) {
56 crossfireServerConnection.drawInfo(
"This item is locked. To drop it, first unlock by SHIFT+left-clicking on it.", CrossfireDrawinfoListener.NDI_RED);
58 commandQueue.sendMove(floor, item.getTag());
68 protected void doExecute(@NotNull
final CfItem item, @NotNull
final CrossfireServerConnection crossfireServerConnection,
final int floor, @NotNull
final CommandQueue commandQueue) {
69 crossfireServerConnection.sendExamine(item.getTag());
78 protected void doExecute(@NotNull
final CfItem item, @NotNull
final CrossfireServerConnection crossfireServerConnection,
final int floor, @NotNull
final CommandQueue commandQueue) {
79 crossfireServerConnection.sendLock(
true, item.getTag());
88 protected void doExecute(@NotNull
final CfItem item, @NotNull
final CrossfireServerConnection crossfireServerConnection,
final int floor, @NotNull
final CommandQueue commandQueue) {
89 crossfireServerConnection.sendLock(!item.isLocked(), item.getTag());
98 protected void doExecute(@NotNull
final CfItem item, @NotNull
final CrossfireServerConnection crossfireServerConnection,
final int floor, @NotNull
final CommandQueue commandQueue) {
99 crossfireServerConnection.sendMark(item.getTag());
108 protected void doExecute(@NotNull
final CfItem item, @NotNull
final CrossfireServerConnection crossfireServerConnection,
final int floor, @NotNull
final CommandQueue commandQueue) {
109 crossfireServerConnection.sendLock(
false, item.getTag());
119 return guiItem !=
null && guiItem.getItem() !=
null;
130 if (guiItem ==
null) {
134 final CfItem item = guiItem.getItem();
139 doExecute(item, crossfireServerConnection, floor, commandQueue);