Slimefun-Addon-Community / Supreme

An addon for slimefun
GNU General Public License v3.0
6 stars 20 forks source link

Fix error when using the latest version of bukkit/paper caused by obsolete methods... #59

Closed DeuzivanLima closed 4 months ago

DeuzivanLima commented 5 months ago

Details

This PR fixes an error that occurs when using the latest versions of the bukkit API, and updates some dependencies.

Versions

Paper

I used the paper as a reference to correct it, and after the correction the plugin started to work normally, without any warnings or errors.

Screenshots

2024-04-18-100034_1920x1080_scrot

Boomer-1 commented 4 months ago

supreme already works on the latest versions of minecraft, 1.20.4. you have to download the latest version from https:\blob.build

ybw0014 commented 4 months ago

this will break the compatibility below 1.20.2 as Registry.EFFECT is added on 1.20.3.

DeuzivanLima commented 4 months ago

When I use these versions:

Causes this error.

[16:47:46 INFO]: [Supreme] Enabling Supreme vDEV - 29 (git f9e70053)
[16:47:46 INFO]: [Supreme] ########################################
[16:47:46 INFO]: [Supreme]       Supreme 2.0  - By RelativoBR
[16:47:46 INFO]: [Supreme] ########################################
[16:47:46 INFO]: [Supreme] Auto Update: enable
[16:47:46 INFO]: [Supreme] Loaded language Supreme: en-US
[16:47:46 INFO]: [Supreme] Legacy SupremeExpansion IDs: disable
[16:47:46 ERROR]: Error occurred while enabling Supreme vDEV - 29 (git f9e70053) (Is it up to date?)
java.lang.InstantiationError: org.bukkit.enchantments.EnchantmentWrapper
    at com.github.relativobr.supreme.util.EnchantsAndEffectsUtil.getEnchants(EnchantsAndEffectsUtil.java:123) ~[Supreme - DEV 29 (git f9e70).jar:?]
    at com.github.relativobr.supreme.util.EnchantsAndEffectsUtil.addGearBasicEnchants(EnchantsAndEffectsUtil.java:104) ~[Supreme - DEV 29 (git f9e70).jar:?]
    at com.github.relativobr.supreme.gear.AbstractWeapons.setup(AbstractWeapons.java:26) ~[Supreme - DEV 29 (git f9e70).jar:?]
    at com.github.relativobr.supreme.setup.MainSetup.setup(MainSetup.java:26) ~[Supreme - DEV 29 (git f9e70).jar:?]
    at com.github.relativobr.supreme.Supreme.onEnable(Supreme.java:172) ~[Supreme - DEV 29 (git f9e70).jar:?]
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:287) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?]
    at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:188) ~[paper-1.20.4.jar:git-Paper-484]
    at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:104) ~[paper-1.20.4.jar:git-Paper-484]
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:507) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.craftbukkit.v1_20_R3.CraftServer.enablePlugin(CraftServer.java:639) ~[paper-1.20.4.jar:git-Paper-484]
    at org.bukkit.craftbukkit.v1_20_R3.CraftServer.enablePlugins(CraftServer.java:550) ~[paper-1.20.4.jar:git-Paper-484]
    at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:671) ~[paper-1.20.4.jar:git-Paper-484]
    at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:431) ~[paper-1.20.4.jar:git-Paper-484]
    at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:309) ~[paper-1.20.4.jar:git-Paper-484]
    at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1131) ~[paper-1.20.4.jar:git-Paper-484]
    at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319) ~[paper-1.20.4.jar:git-Paper-484]
    at java.lang.Thread.run(Thread.java:840) ~[?:?]

This occurs in 1.20.4 even if I use the release versions.

Boomer-1 commented 4 months ago

as I said this has already been fixed. you do not have the latest version of supreme. as already mentioned you must download it from https://blob.build

Boomer-1 commented 4 months ago

please close this PR as it is not needed