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 with BedwarsREL #159

Open
Vennntox opened this issue May 28, 2023 · 1 comment
Open

Error with BedwarsREL #159

Vennntox opened this issue May 28, 2023 · 1 comment

Comments

@Vennntox
Copy link

Vennntox commented May 28, 2023

BkCommonLib version: BKCommonLib 1.19.4-v1
Spigot version: 1.8.8

Problem or bug:

11:16:00 [WARNING] java.lang.ClassCastException: com.bergerkiller.bukkit.common.internal.hooks.LookupEntityClassMap cannot be cast to java.util.HashMap
11:16:00 [WARNING] 	at io.github.bedwarsrel.com.v1_8_r3.TNTSheepRegister.registerEntities(TNTSheepRegister.java:43)
11:16:00 [WARNING] 	at io.github.bedwarsrel.shop.Specials.TNTSheepListener.<init>(TNTSheepListener.java:30)
11:16:00 [WARNING] 	at io.github.bedwarsrel.shop.Specials.SpecialItem.loadSpecials(SpecialItem.java:38)
11:16:00 [WARNING] 	at io.github.bedwarsrel.BedwarsRel.registerListener(BedwarsRel.java:897)
11:16:00 [WARNING] 	at io.github.bedwarsrel.BedwarsRel.onEnable(BedwarsRel.java:791)
11:16:00 [WARNING] 	at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:321)
11:16:01 [WARNING] 	at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:340)
11:16:01 [WARNING] 	at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:405)
11:16:01 [WARNING] 	at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugin(CraftServer.java:357)
11:16:01 [WARNING] 	at org.bukkit.craftbukkit.v1_8_R3.CraftServer.enablePlugins(CraftServer.java:317)
11:16:01 [WARNING] 	at net.minecraft.server.v1_8_R3.MinecraftServer.s(MinecraftServer.java:414)
11:16:01 [WARNING] 	at net.minecraft.server.v1_8_R3.MinecraftServer.k(MinecraftServer.java:378)
11:16:01 [WARNING] 	at net.minecraft.server.v1_8_R3.MinecraftServer.a(MinecraftServer.java:333)
11:16:01 [WARNING] 	at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.java:263)
11:16:01 [WARNING] 	at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:525)
11:16:01 [WARNING] 	at java.lang.Thread.run(Unknown Source)

Expected behaviour:

Steps to reproduce:

Plugins BedwarsREL and BKCommonLib 1.19.4-v1

@bergerkiller
Copy link
Member

bergerkiller commented May 28, 2023

Looks like its going wrong because that plugin is casting the field to its hidden implementation HashMap rather than the field type, Map. https://github.com/BedwarsRel/BedwarsRel/blob/master/v1_8_r3/src/main/java/io/github/bedwarsrel/com/v1_8_r3/TNTSheepRegister.java#L36

The easiest would be if they simply swap the cast from HashMap to Map. I could make that hook class implement HashMap too but then it might break in other cases if some version uses LinkedHashmap or whatever.

That hook class is there to make sure custom entities (Traincarts) properly load in when chunks load.

If that plugin is still maintained you could open an issue ticket there and reference this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants