Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when loading Caveblock blueprint #1037

Closed
tastybento opened this issue Nov 21, 2019 · 1 comment
Closed

Error when loading Caveblock blueprint #1037

tastybento opened this issue Nov 21, 2019 · 1 comment
Assignees
Labels
Status: Done This issue has been completed or answered. This pull request has been merged. Type: Bug

Comments

@tastybento
Copy link
Member

Description

Describe the bug

An error is thrown when loading a CaveBlock blueprint.

Steps to reproduce the behavior

Screenshots and videos

Expected behavior

Environment

Server

  • OS: MacOS________
  • Java version: Java 12________

Plugins

[16:51:10 INFO]: Plugins (5): BentoBox, Multiverse-Core, PermissionsEx*, PlaceholderAPI*, TAB

BentoBox setup

BentoBox and Addons
[16:49:36 INFO]: Running PAPER 1.13.2.
[16:49:36 INFO]: BentoBox version: 1.9.0-SNAPSHOT-LOCAL
[16:49:36 INFO]: Database: JSON
[16:49:36 INFO]: Loaded Game Worlds:
[16:49:36 INFO]: caveblock-world (CaveBlock): Overworld, Nether, End
[16:49:36 INFO]: Loaded Addons:
[16:49:36 INFO]: CaveBlock 1.9.0-SNAPSHOT-b231 (ENABLED)

Configuration
  • Database: JSON

Additional context

[16:47:26 INFO]: 
  ____             _        ____
 |  _ \           | |      |  _ \             by tastybento and Poslovitch
 | |_) | ___ _ __ | |_ ___ | |_) | _____  __  2017 - 2019
 |  _ < / _ \ '_ \| __/ _ \|  _ < / _ \ \/ /
 | |_) |  __/ | | | || (_) | |_) | (_) >  <   v1.9.0-SNAPSHOT-LOCAL
 |____/ \___|_| |_|\__\___/|____/ \___/_/\_\  Loaded in 1536ms.

[16:47:26 INFO]: [BentoBox] Added world CaveBlock (HARD)
[16:47:26 INFO]: [PlaceholderAPI] An update for PlaceholderAPI (v2.10.4) is available at:
[16:47:26 INFO]: [PlaceholderAPI] https://www.spigotmc.org/resources/placeholderapi.6245/
[16:47:26 INFO]: [BentoBox] Loaded Blueprint Bundle 'miner-cave' for CaveBlock
[16:47:26 INFO]: [BentoBox] Loaded Blueprint Bundle 'default' for CaveBlock
[16:47:26 INFO]: [BentoBox] Loaded blueprint 'the nether cave' for CaveBlock
[16:47:26 ERROR]: [org.bukkit.configuration.serialization.ConfigurationSerialization] Could not call method 'public static org.bukkit.inventory.ItemStack org.bukkit.inventory.ItemStack.deserialize(java.util.Map)' of class org.bukkit.inventory.ItemStack for deserialization
java.lang.IllegalArgumentException: Material cannot be null
	at org.apache.commons.lang.Validate.notNull(Validate.java:192) ~[patched_1.13.2.jar:git-Paper-626]
	at org.bukkit.inventory.ItemStack.<init>(ItemStack.java:74) ~[patched_1.13.2.jar:git-Paper-626]
	at org.bukkit.inventory.ItemStack.<init>(ItemStack.java:62) ~[patched_1.13.2.jar:git-Paper-626]
	at org.bukkit.inventory.ItemStack.deserialize(ItemStack.java:493) ~[patched_1.13.2.jar:git-Paper-626]
	at jdk.internal.reflect.GeneratedMethodAccessor9.invoke(Unknown Source) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:567) ~[?:?]
	at org.bukkit.configuration.serialization.ConfigurationSerialization.deserializeViaMethod(ConfigurationSerialization.java:86) ~[patched_1.13.2.jar:git-Paper-626]
	at org.bukkit.configuration.serialization.ConfigurationSerialization.deserialize(ConfigurationSerialization.java:128) ~[patched_1.13.2.jar:git-Paper-626]
	at org.bukkit.configuration.serialization.ConfigurationSerialization.deserializeObject(ConfigurationSerialization.java:208) ~[patched_1.13.2.jar:git-Paper-626]
	at org.bukkit.configuration.file.YamlConstructor$ConstructCustomObject.construct(YamlConstructor.java:39) ~[patched_1.13.2.jar:git-Paper-626]
	at org.yaml.snakeyaml.constructor.BaseConstructor.constructObjectNoCheck(BaseConstructor.java:204) ~[patched_1.13.2.jar:git-Paper-626]
	at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:193) ~[patched_1.13.2.jar:git-Paper-626]
	at org.yaml.snakeyaml.constructor.BaseConstructor.constructMapping2ndStep(BaseConstructor.java:453) ~[patched_1.13.2.jar:git-Paper-626]
	at org.yaml.snakeyaml.constructor.SafeConstructor.constructMapping2ndStep(SafeConstructor.java:184) ~[patched_1.13.2.jar:git-Paper-626]
	at org.yaml.snakeyaml.constructor.BaseConstructor.constructMapping(BaseConstructor.java:434) ~[patched_1.13.2.jar:git-Paper-626]
	at org.yaml.snakeyaml.constructor.SafeConstructor$ConstructYamlMap.construct(SafeConstructor.java:521) ~[patched_1.13.2.jar:git-Paper-626]
	at org.bukkit.configuration.file.YamlConstructor$ConstructCustomObject.construct(YamlConstructor.java:30) ~[patched_1.13.2.jar:git-Paper-626]
	at org.yaml.snakeyaml.constructor.BaseConstructor.constructObjectNoCheck(BaseConstructor.java:204) ~[patched_1.13.2.jar:git-Paper-626]
	at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:193) ~[patched_1.13.2.jar:git-Paper-626]
	at org.yaml.snakeyaml.constructor.BaseConstructor.constructDocument(BaseConstructor.java:159) ~[patched_1.13.2.jar:git-Paper-626]
	at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:146) ~[patched_1.13.2.jar:git-Paper-626]
	at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:524) ~[patched_1.13.2.jar:git-Paper-626]
	at org.yaml.snakeyaml.Yaml.load(Yaml.java:437) ~[patched_1.13.2.jar:git-Paper-626]
	at org.bukkit.configuration.file.YamlConfiguration.loadFromString(YamlConfiguration.java:55) ~[patched_1.13.2.jar:git-Paper-626]
	at world.bentobox.bentobox.database.json.adapters.ItemStackTypeAdapter.read(ItemStackTypeAdapter.java:42) ~[?:?]
	at world.bentobox.bentobox.database.json.adapters.ItemStackTypeAdapter.read(ItemStackTypeAdapter.java:21) ~[?:?]
	at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:41) ~[patched_1.13.2.jar:git-Paper-626]
	at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:187) ~[patched_1.13.2.jar:git-Paper-626]
	at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:145) ~[patched_1.13.2.jar:git-Paper-626]
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:129) ~[patched_1.13.2.jar:git-Paper-626]
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:220) ~[patched_1.13.2.jar:git-Paper-626]
	at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:41) ~[patched_1.13.2.jar:git-Paper-626]
	at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:174) ~[patched_1.13.2.jar:git-Paper-626]
	at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:145) ~[patched_1.13.2.jar:git-Paper-626]
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:129) ~[patched_1.13.2.jar:git-Paper-626]
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:220) ~[patched_1.13.2.jar:git-Paper-626]
	at com.google.gson.Gson.fromJson(Gson.java:887) ~[patched_1.13.2.jar:git-Paper-626]
	at com.google.gson.Gson.fromJson(Gson.java:825) ~[patched_1.13.2.jar:git-Paper-626]
	at world.bentobox.bentobox.managers.BlueprintClipboardManager.loadBlueprint(BlueprintClipboardManager.java:107) ~[?:?]
	at world.bentobox.bentobox.managers.BlueprintsManager.loadBlueprints(BlueprintsManager.java:301) ~[?:?]
	at world.bentobox.bentobox.managers.BlueprintsManager.lambda$loadBlueprintBundles$5(BlueprintsManager.java:196) ~[?:?]
	at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftTask.run(CraftTask.java:84) ~[patched_1.13.2.jar:git-Paper-626]
	at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:52) ~[patched_1.13.2.jar:git-Paper-626]
	at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[patched_1.13.2.jar:git-Paper-626]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
	at java.lang.Thread.run(Thread.java:835) [?:?]
[16:47:26 INFO]: [BentoBox] Loaded blueprint 'the cave' for CaveBlock
[16:47:26 INFO]: [BentoBox] Loaded blueprint 'the end cave' for CaveBlock
[16:47:26 INFO]: [BentoBox] Loaded blueprint 'miner's cave' for CaveBlock
[16:47:26 INFO]: [BentoBox] All blueprints loaded.
[16:47:27 INFO]: [PlaceholderAPI] 163 placeholder expansions are available on the cloud.
[16:47:27 INFO]: [BentoBox] Downloading data from GitHub...
[16:47:27 INFO]: [BentoBox] Updating the Catalog...
[16:47:27 INFO]: [BentoBox] Updating Contributors information...
[16:47:27 INFO]: [BentoBox] Gathering contribution data for: BentoBoxWorld/BentoBox
[16:47:28 INFO]: [BentoBox] Gathering contribution data for: BentoBoxWorld/CaveBlock
[16:47:28 INFO]: [BentoBox] Successfully downloaded data from GitHub.
@tastybento tastybento self-assigned this Nov 21, 2019
@tastybento tastybento added Status: Pending Waiting for a developer to start working on this issue. Status: In progress Working on the issue. and removed Status: Pending Waiting for a developer to start working on this issue. labels Nov 21, 2019
@tastybento
Copy link
Member Author

This is due to 1.14 material SWEET_BERRIES being in the blueprint. When it is loaded as an ItemStack in 1.13.2 it throws an error that cannot be caught. I'll add code to verify the material is valid and if not, just supply AIR.

@Poslovitch Poslovitch added Status: Done This issue has been completed or answered. This pull request has been merged. and removed Status: In progress Working on the issue. labels Nov 21, 2019
@Poslovitch Poslovitch added this to the 1.9.0 - SpigotMC release! milestone Dec 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Done This issue has been completed or answered. This pull request has been merged. Type: Bug
Projects
None yet
Development

No branches or pull requests

2 participants