Skip to content

Commit

Permalink
Fixed getting spawner keys may lead to creation of CustomKey from Key…
Browse files Browse the repository at this point in the history
…s#ofMaterialAndData (#1864)
  • Loading branch information
OmerBenGera committed Sep 2, 2023
1 parent 1428603 commit 7e38d2c
Showing 1 changed file with 3 additions and 0 deletions.
Expand Up @@ -112,6 +112,9 @@ public static Key ofMaterialAndData(String material, @Nullable String data) {
if (Text.isBlank(data)) {
return Keys.of(blockType);
}
if (blockType == Materials.SPAWNER.toBukkitType()) {
return ofSpawner(data);
}
short blockData = Short.parseShort(data);
return Keys.of(blockType, blockData);
} catch (Exception error) {
Expand Down

0 comments on commit 7e38d2c

Please sign in to comment.