File tree Expand file tree Collapse file tree 1 file changed +2
-17
lines changed
common/src/main/java/dev/terminalmc/clientsort/client/inventory/operator Expand file tree Collapse file tree 1 file changed +2
-17
lines changed Original file line number Diff line number Diff line change 6565 */
6666public abstract class SingleUseOperator {
6767
68- private boolean hasOperated = false ;
6968 protected final AbstractContainerScreen <?> screen ;
7069 protected final ContainerScreenHelper <? extends AbstractContainerScreen <?>> screenHelper ;
7170 protected final Operation op ;
@@ -198,20 +197,6 @@ private Slot[] collectSlots(Slot refSlot, Scope scope) {
198197 return collectedSlots .toArray (new Slot [0 ]);
199198 }
200199
201- /**
202- * @return {@code true} if this instance has not previously performed an operation (and
203- * therefore is able to perform one).
204- */
205- private boolean canOperate () {
206- if (hasOperated ) {
207- ClientSort .LOG .warn ("{} can only be used once!" , this .getClass ().getSimpleName ());
208- return false ;
209- } else {
210- hasOperated = true ;
211- return true ;
212- }
213- }
214-
215200 /**
216201 * Sets a flag to indicate that a client interaction operation is in progress.
217202 */
@@ -341,6 +326,7 @@ private static boolean operate(
341326 if (debug ())
342327 ClientSort .LOG .info ("Preparing server operator for {}" , operation .name ());
343328 wrapper .accept (new ServerOperator (screen , originSlot , operation ));
329+ return true ;
344330 }
345331
346332 // Fall back to client ops
@@ -368,9 +354,8 @@ private static boolean operate(
368354 } else {
369355 startClientOp ();
370356 op .run ();
357+ return true ;
371358 }
372-
373- return true ;
374359 }
375360
376361 private static SingleUseOperator getClientOperator (
You can’t perform that action at this time.
0 commit comments