Add ItemStorage
Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
Ursprung
cead428b7a
Commit
7f48bc724a
@ -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();
|
||||||
|
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren