Skip to content

Commit 2573fa4

Browse files
committed
fix: replace List.of with Arrays.asList for inventory to allow for null values
1 parent a6aeb5e commit 2573fa4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

buildsystem-core/src/main/java/de/eintosti/buildsystem/player/CachedValuesImpl.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
package de.eintosti.buildsystem.player;
1919

2020
import de.eintosti.buildsystem.api.player.CachedValues;
21+
import java.util.Arrays;
2122
import java.util.List;
2223
import org.bukkit.GameMode;
2324
import org.bukkit.entity.Player;
@@ -53,7 +54,7 @@ public void resetGameModeIfPresent(Player player) {
5354

5455
@Override
5556
public void saveInventory(ItemStack[] inventory) {
56-
this.inventory = List.of(inventory);
57+
this.inventory = Arrays.asList(inventory);
5758
}
5859

5960
@Override

0 commit comments

Comments
 (0)