geforkt von Mirrors/Paper
SPIGOT-5504: cancelling InventoryMoveItemEvent on composter doesn't properly cancel
Dieser Commit ist enthalten in:
Ursprung
108b44ca20
Commit
99cf10e4c7
@ -42,7 +42,23 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -313,8 +317,9 @@
|
||||
@@ -306,15 +310,23 @@
|
||||
|
||||
@Override
|
||||
public void update() {
|
||||
- BlockComposter.d(this.a, this.b, this.c);
|
||||
- this.d = true;
|
||||
+ // CraftBukkit start - allow putting items back (eg cancelled InventoryMoveItemEvent)
|
||||
+ if (this.isNotEmpty()) {
|
||||
+ BlockComposter.d(this.a, this.b, this.c);
|
||||
+ this.d = true;
|
||||
+ } else {
|
||||
+ this.b.setTypeAndData(this.c, this.a, 3);
|
||||
+ this.d = false;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
}
|
||||
|
||||
static class ContainerEmpty extends InventorySubcontainer implements IWorldInventory {
|
||||
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren