servertap-io / servertap

ServerTap is a REST API for Bukkit/Spigot/Paper Minecraft servers
https://servertap.io
MIT License
225 stars 57 forks source link

Use native Bukkit/Spigot types when possible #201

Closed ATechAdventurer closed 1 year ago

ATechAdventurer commented 1 year ago

Before we were converting types like Difficulty and Dimension to integers before sending them but there is no reason to do so. This PR changes this by sending the original type.

Effects

Dimensions/Environments 0 => "NORMAL" 1 => "NETHER" 3 => "CUSTOM"

Difficulty 0 => "PEACEFUL" 1 => "EASY"

GAMEMODE 0 => "CREATIVE"

This will in theory make requests take less time and should make the experience of creating programatic requests with something like an SDK easier

However this will be a breaking change

phybros commented 1 year ago

What do you think we should do about the breaking-ness of this change? Just bump to 0.5.x and move on with our lives?

ATechAdventurer commented 1 year ago

What do you think we should do about the breaking-ness of this change? Just bump to 0.5.x and move on with our lives?

I guess so. I am working on an "official" SDK that's why I am going through and cleaning up the response to be more clean and compatible with OpenAPI.