lmk02 / BlockParty

BlockParty Plugin for Spigot/Bukkit servers
GNU General Public License v3.0
7 stars 17 forks source link

Detect unknown bukkit versions with the dataversion #53

Open Joo200 opened 2 years ago

Joo200 commented 2 years ago

I removed the duplicated MinecraftVersion class and added some code to detect the used Minecraft version based on the DataVersion of the server.

The DataVersion is accesible through Bukkit.getUnsafe().getDataVersion() since 1.13.x. https://minecraft.fandom.com/wiki/Data_version#List_of_data_versions

Depending on your used server the version string might be malformed. The DataVersion should work but is not accessible in Bukkit =< 1.12