In the latest version 1.21, Paper has changed some internals so that the plugins are apparently loaded from the path /plugins/.paper-remapped/ instead of /plugins/. This also causes the error messages to change the plugin path from /plugins/<filename> to /plugins/.paper-remapped/<filename>.
We extract the plugin path from the log and use it in the problem message that we display to the user.
We also use the plugin path to display it in solutions. E.g.: Delete the file plugins/.paper-remapped/mclogs-bukkit-dev.jar.
But the user cannot see or access the .paper-remapped folder, so they cannot delete the file from there.
This can lead to confusion.
Therefore, this PR changes this behavior and replaces the path /plugins/.paper-remapped/ with /plugins/ in all places.
In addition, this PR changes the following:
Two new functions have been added to the PluginProblem class :
correctPluginPath changes plugins/.paper-remapped/ to plugins/
extractPluginName can extract the name of the plugin from the path, this can simplify some regexes in the problem classes
:warning: Many of the problems that are actually plugin problems now extend from the PluginProblem class, so the member variable $pluginName can be removed and they offer the PluginInstallDifferentVersionSolution
Adds some new tests for PaperMC 1.21.1
Adds the PluginInstallDifferentVersionSolution to UnsupportedClassVersionProblem
In the latest version 1.21, Paper has changed some internals so that the plugins are apparently loaded from the path
/plugins/.paper-remapped/
instead of/plugins/
. This also causes the error messages to change the plugin path from/plugins/<filename>
to/plugins/.paper-remapped/<filename>
.We extract the plugin path from the log and use it in the problem message that we display to the user. We also use the plugin path to display it in solutions. E.g.: Delete the file
plugins/.paper-remapped/mclogs-bukkit-dev.jar
. But the user cannot see or access the .paper-remapped folder, so they cannot delete the file from there. This can lead to confusion. Therefore, this PR changes this behavior and replaces the path/plugins/.paper-remapped/
with/plugins/
in all places.In addition, this PR changes the following:
PluginProblem
class :correctPluginPath
changesplugins/.paper-remapped/
toplugins/
extractPluginName
can extract the name of the plugin from the path, this can simplify some regexes in the problem classes$pluginName
can be removed and they offer thePluginInstallDifferentVersionSolution
PluginInstallDifferentVersionSolution
toUnsupportedClassVersionProblem