Skip to content

Commit 0f099df

Browse files
committed
Slightly improve inventory clear performance (#772)
1 parent ea97546 commit 0f099df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/ch/njol/skript/classes/data/DefaultChangers.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ public void change(final Inventory[] invis, final @Nullable Object[] delta, fina
201201
switch (mode) {
202202
case DELETE:
203203
invi.clear();
204-
if (invi instanceof PlayerInventory) {
204+
if (ItemType.oldInvSize && invi instanceof PlayerInventory) {
205205
((PlayerInventory) invi).setArmorContents(new ItemStack[4]);
206206
if (((PlayerInventory) invi).getHolder() instanceof Player) {
207207
final Player p = (Player) ((PlayerInventory) invi).getHolder();

0 commit comments

Comments
 (0)