Skip to content

Commit 7b9a472

Browse files
authored
Fix inverted disabled in CraftCrafter#setSlotDisabled (#13195)
1 parent 81b7a57 commit 7b9a472

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

paper-api/src/main/java/org/bukkit/block/Crafter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public interface Crafter extends Container, com.destroystokyo.paper.loottable.Lo
2828
* have items placed in it.
2929
*
3030
* @param slot slot index
31-
* @return disabled status
31+
* @return whether the slot is disabled
3232
*/
3333
boolean isSlotDisabled(int slot);
3434

@@ -37,7 +37,7 @@ public interface Crafter extends Container, com.destroystokyo.paper.loottable.Lo
3737
* have items placed in it.
3838
*
3939
* @param slot slot index
40-
* @param disabled disabled status
40+
* @param disabled whether the slot should be disabled
4141
*/
4242
void setSlotDisabled(int slot, boolean disabled);
4343

paper-api/src/main/java/org/bukkit/inventory/view/CrafterView.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public interface CrafterView extends InventoryView {
1818
* Checks if the given crafter slot is disabled.
1919
*
2020
* @param slot the slot to check
21-
* @return true if the slot is disabled otherwise false
21+
* @return whether the slot is disabled
2222
*/
2323
boolean isSlotDisabled(int slot);
2424

@@ -33,7 +33,7 @@ public interface CrafterView extends InventoryView {
3333
* Sets the status of the crafter slot.
3434
*
3535
* @param slot the slot to set the status of
36-
* @param disabled true if the slot should be disabled otherwise false
36+
* @param disabled whether the slot should be disabled
3737
*/
3838
void setSlotDisabled(int slot, boolean disabled);
3939
}

paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftCrafter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public boolean isSlotDisabled(int slot) {
6363
public void setSlotDisabled(int slot, boolean disabled) {
6464
Preconditions.checkArgument(slot >= 0 && slot < 9, "Invalid slot index %s for Crafter", slot);
6565

66-
this.getSnapshot().setSlotState(slot, disabled);
66+
this.getSnapshot().setSlotState(slot, !disabled);
6767
}
6868

6969
@Override

0 commit comments

Comments
 (0)