MohistMC / Mohist

Minecraft Forge Hybrid server implementing the Spigot/Bukkit API, formerly known as Thermos/Cauldron/MCPC+
https://mohistmc.com
GNU General Public License v3.0
1.24k stars 204 forks source link

[1.20.1] Incompatibility with EconomyShopGUI Premium 5.11.2 plugin #3133

Closed won983212 closed 1 month ago

won983212 commented 1 month ago

Minecraft Version : 1.20.1

Mohist Version : 695

Operating System : Mohist runs on Centos 7.8

Logs : https://pastebin.com/yV6DB08g

Plugin list : EconomyShopGUI 5.11.2

Description of issue :

The current 1.20.1 build is not compatible with the EconomyShopGUI Premium plugin. Below is the actual error that occurred:

java.lang.NoSuchFieldError: Class org.bukkit.inventory.meta.trim.TrimPattern does not have member field 'org.bukkit.inventory.meta.trim.TrimPattern HOST'

Upon analyzing the cause, it was found that the TrimPattern class does not actually contain the HOST field. It seems necessary to add this missing field.

Historically, some missing fields(HOST, ...) were also present in older versions of Spigot but were patched subsequently. You can refer to this commit for more details: Spigot: Add missing trim patterns added in 1.20

Currently, Mohist appears to be using the code from before this patch(above commit) was applied. Mohist: TrimPattern.java I will be submitting a PR soon. Please review it later.