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

UnsupportedOperationException when using a spawner egg #78

Closed
marcbal opened this issue Feb 5, 2025 · 1 comment
Closed

UnsupportedOperationException when using a spawner egg #78

marcbal opened this issue Feb 5, 2025 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@marcbal
Copy link

marcbal commented Feb 5, 2025

Please paste the output from /usb version below

22:27:40 Name: uSkyBlock
22:27:40 Version: 3.1.0-SNAPSHOT
22:27:40 Description: Ultimate SkyBlock v3.1.0-SNAPSHOT-11f78a2
22:27:40 Language: fr (fr)
22:27:40 State: d=200, r=80, i=952, p=1 099, n=true, awe=false
22:27:40 Server: Paper 1.21.4-107-1bb3677 (MC: 1.21.4)
22:27:40 State: online=true, bungee=true
22:27:40 ------------------------------
22:27:40 Vault 1.7.3-b131 (ENABLED)
22:27:40 WorldEdit 7.3.10-beta-01+cb9fd58 (ENABLED)
22:27:40 WorldGuard 7.0.13-beta-2+5c4848b (ENABLED)
22:27:40 Multiverse-Core 4.3.14 (ENABLED)
22:27:40 Multiverse-Portals 4.2.3 (ENABLED)
22:27:40 Multiverse-NetherPortals 4.2.3 (ENABLED)
22:27:40 ------------------------------

What steps will reproduce the problem?

  1. use a spawner egg on your own island
  2. look at the console for the error

If you have any log-files, please paste them to pastebin.com
Full stacktrace: https://pastebin.com/gWCNjNSi

20:56:22 Could not pass event PlayerInteractEvent to uSkyBlock v3.1.0-SNAPSHOT
java.lang.UnsupportedOperationException: Must check item type to get spawned type
at OB.craftbukkit.inventory.CraftMetaSpawnEgg.getSpawnedType(CraftMetaSpawnEgg.java:90)~
at uSkyBlock-3.1.0-SNAPSHOT.jar/us.talabrek.ultimateskyblock.event.SpawnEvents.onSpawnEggEvent(SpawnEvents.java:65)~
at ... (NMS/Bukkit/Paper stuff)

Basic analysis
According to the API documentation, SpawnEggMeta#getSpawnedType method is deprecated for removal, and its contract annotation indicate hat it will always throw an exception when called.
This is exactly what is happening here.

@marcbal marcbal added the bug Something isn't working label Feb 5, 2025
@minoneer minoneer self-assigned this Feb 7, 2025
@minoneer
Copy link
Collaborator

minoneer commented Feb 7, 2025

Thanks for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants