[SPIGOT-5727] GameRule doImmediateRespawn cannot be set per-world Created: 07/May/20 Updated: 09/May/20 Resolved: 09/May/20 |
|
Status: | Resolved |
Project: | Spigot |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Bug | Priority: | Minor |
Reporter: | Kermina Awad | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | API, GameRules, api, gamerule | ||
Environment: |
Windows 10 1909 |
Attachments: |
![]() |
Version: | CraftBukkit version git-Spigot-2040c4c-933e909 (MC: 1.15.2) (Implementing API version 1.15.2-R0.1-SNAPSHOT) |
Guidelines Read: | Yes |
Description |
Time Spent: Approximately one hour. I'm unsure if this affects other gamerules. This issue was reported to the Multiverse team, and I was able to reproduce it with both Multiverse and Hyperverse. So I believe it is a Bukkit bug. Please see this comment and the one that follows it for related behaviour.
Reproduction Plugin Source: https://github.com/nicegamer7/GameRuleBug |
Comments |
Comment by Kermina Awad [ 08/May/20 ] |
Awesome! Thanks for the speedy fix. Unfortunately I don't have access to view PRs, so could you let me know if and when it gets merged? |
Comment by Shane Bee [ 08/May/20 ] |
No problem. Im working on a PR right now. It was a really easy fix, just doing some testing before posting said PR PR Submitted, if you have access to viewing PRs you can see it here: |
Comment by Kermina Awad [ 08/May/20 ] |
Yeah, by "does not affect Vanilla", I meant that it's expected that this gamerule would be global. Sorry, I should've been more clear. Thanks for taking the time to look into this issue. |
Comment by Shane Bee [ 08/May/20 ] |
This actually works quite different in vanilla. In vanilla, the game rule is not per world. Testing on a single player game, if I change the game rule, its the same in all worlds. Looking at how this works, as well as looking at Minecraft's code, it appears the game rule is handled by the client. When setting the game rule via command, a packet is sent to all clients telling them the game rule has changed. I would assume the same happens when you log into the server. My assumption to fix this would be sending this packet to the client when the player changes worlds. |