PaperMC / paperweight

Gradle build system plugin for Paper and Paper forks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Do not mark getDisplayName() and other functions as deprecated.

DavidBerdik opened this issue · comments

When using paperweight-userdev to develop a Spigot plugin, getDisplayName() is marked as deprecated in favor of displayName() which appears to use some sort of third party library. This is just one of many functions that seems to be like this. I'm also seeing this on functions like getLore(), setPages(), etc. If you make these changes and try to run the plugin on Spigot, it fails with a ClassNotFoundError because apparently the third party library that it is referencing does not exist on Spigot.

To stop this from being an issue, paperweight-userdev should not mark these functions as deprecated. At the very least, a workaround should be present to allow for developers to not have to watch for these deprecation warnings. For now, I'm working around the problem by just adding @SuppressWarnings, but this is a really ugly solution.

paperweight userdev does not mark that stuff as deprecated, thus this is the wrong repo

paper marks this stuff as deprecated as the format used for that stuff was deprecated by mojang 7 years ago

paperweight userdev does not mark that stuff as deprecated, thus this is the wrong repo

paper marks this stuff as deprecated as the format used for that stuff was deprecated by mojang 7 years ago

Then why did this not happen when compiling with Spigot?

Because spigot hasn't deprecated their usage of legacy text formats and have insisted on retaining support for that as the primary mechanism vs moving to the modern text format

Fair enough. In that case, do you have advice on how I can honor the deprecation without breaking Spigot support?

Use the spigot api?

Well, that method isn’t deprecated. So idk what the problem is. Ask about this stuff on the discord.

you're using papers API, in which that stuff is deprecated, if you really must maintain spigot support you're basically just gonna have to deal with the deprecations

This really ain't the place for this discussion, however

Alright. I was afraid of that. Thank you!