SteamWar/BauSystem2.0
Archiviert
12
0

Add ItemStorage

Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
yoyosource 2021-07-10 16:44:01 +02:00
Ursprung cead428b7a
Commit 7f48bc724a

Datei anzeigen

@ -29,6 +29,7 @@ import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.persistence.PersistentDataContainer; import org.bukkit.persistence.PersistentDataContainer;
import org.bukkit.persistence.PersistentDataType; import org.bukkit.persistence.PersistentDataType;
import java.util.Collections;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.List; import java.util.List;
import java.util.function.IntFunction; import java.util.function.IntFunction;
@ -121,6 +122,9 @@ public class ItemStorage implements DetonatorStorage {
private List<Location> read() { private List<Location> read() {
List<Location> tempLocs = new LinkedList<>(); List<Location> tempLocs = new LinkedList<>();
if (itemStack == null) {
return Collections.emptyList();
}
ItemMeta meta = itemStack.getItemMeta(); ItemMeta meta = itemStack.getItemMeta();
PersistentDataContainer container = meta.getPersistentDataContainer(); PersistentDataContainer container = meta.getPersistentDataContainer();