[SPIGOT-3304] Weather command duration not working Created: 09/Jun/17 Updated: 09/Jun/17 Resolved: 09/Jun/17 |
|
Status: | Resolved |
Project: | Spigot |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Bug | Priority: | Minor |
Reporter: | SpiderRobotMan | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | Craftbukkit, bug | ||
Environment: |
CraftBukkit |
Attachments: |
![]() |
Plugin: | N/A |
Description |
Steps to reproduce:
Expected result:
Actual result:
This was tested on both Vanilla 1.12 and CraftBukkit 1.12, it was only reproducible on CraftBukkit, I did not test on Spigot.
This is due to the duration being set before it is set to rain or thunder, I have attached a patch for the CommandWeather class that resolves this bug. |
Comments |
Comment by SpiderRobotMan [ 09/Jun/17 ] |
I beleive the fix lies in the WorldData class at line 455 and 483, the methods set the duration to 0, so the vanilla command has its duration values overridden. |
Comment by SpiderRobotMan [ 09/Jun/17 ] |
@md_5 I figured that may be the case, this fixed what I had needed it to for now but I figured I'd open a bug report so that someone with more experience could find a proper solution. |
Comment by md_5 [ 09/Jun/17 ] |
That's likely not a proper fix. The fix probably should be outside the command methods and fix the behaviour of the other methods to match vanilla instead. |