Closed arboriginal closed 4 years ago
I've quickly check the code, but as I discover it, for now I got no idea to fix it...
In case it helps:
When compiling, I saw lots of warnings, mainly because of unused imports. I've also seen in AnvilManagementListener#onInventoryClick()
that e.setCursor()
is depreciated and can makes unexpected things. So, you can use player.setItemOnCursor(null);
instead (not tested but must be correct).
Maybe the warning is because of this: https://bugs.openjdk.java.net/browse/JDK-8217225 I only have JDK 12 on my computer, and even if I'm compiling with 1.8 compliance, it could be the reason. See here: https://github.com/powermock/powermock/issues/939#issuecomment-530517158, it gives way to handle it.
OK, because of the last comment, I've installed a second version of Java on my computer and test to launch my server with it... The plugin works.
So, the "warning bug" is for Java 12. It works fine with Java 8.
But the "error bug" can still happen. If I'm right, this is when a player has anvil GUI open when the plugin is disabling: It tries to launch new tasks but it not supposed too. Maybe checking plugin.isEnabled()
or something like that could be enough, depending on what those tasks do...
Edit: Easy way to reproduce: (with Plugman)
/plugman reload MaxRepairCost
You'll see the error given in my first post when disabling the plugin. This let the player in creative mode.
I'll look into this as I am writing the update to further support for 1.14 and clear out previous bugs. Since the plugin is largely being entirely rewritten and directly overriding pre-existing vanilla anvil mechanics instead of externally messing with values with Reflection, I would expect improved performance and fewer bugs. I will keep this report in mind and ensure that such errors do not occur in the future.
In terms of Java 12 support. I may look into adding such support in the future, however I currently use Java 8 for all of my development environments since it is the most commonly used, and as far as I am aware, it's the recommended Java version by Oracle.
This issue was resolved a while ago but I never closed this issue. Please check some of the latest pre-releases. Support for the latest versions of Java was already added.
Hi,
I've just discovered your plugin and tested it on my dev server (localhost). Unfortunately, it seems not working with last version of Paper 1.14.4, nor with a recent one of Spigot 1.14.4.
Hope this report will help you to fix it. Let me know if I forgot to give you an information.
Server Version For my first and main tests:
Paper version git-Paper-209 (MC: 1.14.4) (Implementing API version 1.14.4-R0.1-SNAPSHOT)
Also tested then with a fresh Spigot without other plugins nor datapacks:
CraftBukkit version git-Spigot-9de398a-9c887d4 (MC: 1.14.4) (Implementing API version 1.14.4-R0.1-SNAPSHOT)
(Same results with Paper and Spigot)
Plugin Version
Note: No warnings, nor errors during the startup.
Describe the bug The console is spammed by the same error (see below) when I'm using an anvil, and I cannot enchant item more than default limits. The only thing I've seen with this plugin (except the warnings) is that the "too expansive" message is no more displayed, but the right slot where I'm supposed to get the resulting item is empty + the arrow has the red cross over it.
To Reproduce The warning appears several times each time (I mean for example I do 1 action, I receive it 5x), the minimum seems to be 2x, and I got it 8x the first one I've seen it.
So, it's not breaking vanilla mechanisms, but produces warnings, don't avoid the limit and hide the "too expansive" message which could be confucius for users.
Media Warning spammed in the console: https://gist.github.com/arboriginal/4a64a47ab7c0bf05cba85a6f2892199e
[01:08:26 WARN]: java.lang.NoSuchFieldException: modifiers
Error when stopping the server: (not each times) https://gist.github.com/arboriginal/9a4fc5e0f855fd8e6d8c4f180366344f
Plugin attempted to register task while disabled
Screenshot when I've reached the vanilla limit: screenshot.png
Additional context
/manucheckp
confirms I got the perms)/plugman load MaxRepairCost