Multiverse-Inventories

878k Downloads

Infinite death loop when gamemode changes on death

jurajplayercze opened this issue ยท 6 comments

commented

Information

  • Server version: PaperMC 1.17.x 1.17
    Build 75, development

  • Full output of /mv version -p:

  • [10:47:07 INFO]: [Multiverse-Core] Multiverse-Core Version: 4.3.1-SNAPSHOT-b847
    [10:47:07 INFO]: [Multiverse-Core] Bukkit Version: git-Paper-75 (MC: 1.17)
    [10:47:07 INFO]: [Multiverse-Core] Loaded Worlds: [{"MVWorld@75948813":{"Gen":"null","Type":"NORMAL","Env":"THE_END","Name":"world_the_end"}}, {"MVWorld@81421560":{"Gen":"null","Type":"NORMAL","Env":"NORMAL","Name":"world"}}, {"MVWorld@1474859613":{"Gen":"PlotSquared","Type":"NORMAL","Env":"NORMAL","Name":"test"}}, {"MVWorld@357857202":{"Gen":"null","Type":"NORMAL","Env":"NETHER","Name":"world_nether"}}, {"MVWorld@645488798":{"Gen":"null","Type":"FLAT","Env":"NORMAL","Name":"Build"}}, {"MVWorld@1909665037":{"Gen":"null","Type":"NORMAL","Env":"NORMAL","Name":"117"}}, {"MVWorld@1656369936":{"Gen":"null","Type":"FLAT","Env":"NORMAL","Name":"OfficoWorld"}}, {"MVWorld@1424302354":{"Gen":"voidgenerator","Type":"NORMAL","Env":"NORMAL","Name":"event"}}, {"MVWorld@972408448":{"Gen":"PlotSquared","Type":"NORMAL","Env":"NORMAL","Name":"plotme"}}, {"MVWorld@1361461238":{"Gen":"PlotSquared:s=91","Type":"NORMAL","Env":"NORMAL","Name":"plotme2"}}]
    [10:47:07 INFO]: [Multiverse-Core] Multiverse Plugins Loaded: 1
    [10:47:07 INFO]: [Multiverse-Core] Economy being used: CMIEconomy
    [10:47:07 INFO]: [Multiverse-Core] Permissions Plugin: Bukkit Permissions (SuperPerms)
    [10:47:07 INFO]: [Multiverse-Core] Dumping Config Values: (version 2.9)
    [10:47:07 INFO]: [Multiverse-Core] enforceaccess: false
    [10:47:07 INFO]: [Multiverse-Core] prefixchat: false
    [10:47:07 INFO]: [Multiverse-Core] prefixchatformat: [%world%]%chat%
    [10:47:07 INFO]: [Multiverse-Core] useasyncchat: true
    [10:47:07 INFO]: [Multiverse-Core] teleportintercept: true
    [10:47:07 INFO]: [Multiverse-Core] firstspawnoverride: true
    [10:47:07 INFO]: [Multiverse-Core] displaypermerrors: true
    [10:47:07 INFO]: [Multiverse-Core] enablebuscript: true
    [10:47:07 INFO]: [Multiverse-Core] globaldebug: 0
    [10:47:07 INFO]: [Multiverse-Core] silentstart: false
    [10:47:07 INFO]: [Multiverse-Core] messagecooldown: 5000
    [10:47:07 INFO]: [Multiverse-Core] version: 2.9
    [10:47:07 INFO]: [Multiverse-Core] firstspawnworld: OfficoWorld
    [10:47:07 INFO]: [Multiverse-Core] teleportcooldown: 1000
    [10:47:07 INFO]: [Multiverse-Core] defaultportalsearch: false
    [10:47:07 INFO]: [Multiverse-Core] portalsearchradius: 128
    [10:47:07 INFO]: [Multiverse-Core] autopurge: true
    [10:47:07 INFO]: [Multiverse-Core] Special Code: FRN002
    [10:47:07 INFO]: [Multiverse-Inventories] Multiverse-Inventories Version: 4.2.3-SNAPSHOT-b512
    [10:47:07 INFO]: [Multiverse-Inventories] === Settings ===
    [10:47:07 INFO]: [Multiverse-Inventories] First Run: false
    [10:47:07 INFO]: [Multiverse-Inventories] Using Bypass: true
    [10:47:07 INFO]: [Multiverse-Inventories] Default Ungrouped Worlds: false
    [10:47:07 INFO]: [Multiverse-Inventories] Save and Load on Log In and Out: true
    [10:47:07 INFO]: [Multiverse-Inventories] Using GameMode Profiles: true
    [10:47:07 INFO]: [Multiverse-Inventories] === Shares ===
    [10:47:07 INFO]: [Multiverse-Inventories] Optionals for Ungrouped Worlds: true
    [10:47:07 INFO]: [Multiverse-Inventories] Enabled Optionals:
    [10:47:07 INFO]: [Multiverse-Inventories] === Groups ===
    [10:47:07 INFO]: [Multiverse-Inventories] default: {Worlds: [new_world, world, world_the_end, world_nether, build, officoworld, buildersvet], Shares: [hit_points, economy, food_level, saturation, exhaustion, xp, total_xp, lvl, inventory_contents, armor_contents, bed_spawn, maximum_air, remaining_air, fall_distance, fire_ticks, potion_effects, last_location, ender_chest, off_hand]}

  • Server log: https://gist.github.com/jurajplayercze/531f00d8a4d710c167cdff0cff71cba0

Details

I was <able / not able> to reproduce my issue on a freshly setup and up-to-date server with the latest version of Multiverse plugins with no other plugins and with no kinds of other server or client mods.

Description
When player died without one permission (mvinv.bypass.*) it just extremly spammed chat with death message. Now, i can't use different inventories, because it would spam chat, if player died. Choose between spam and different inventories.

Screenshots
https://prnt.sc/18pcakk

Others
Well, we got some plugins, but they don't do anything about dying or writing in chat. When we added the option to bypass every inventory, it stopped, so we decied, it's mvinv bug

commented

Well i found, that ItemsAdder and multiverse doing it together. Alone plugins are good, but together making mess. Is there any idea what can we do with it. But itemsadder shouldn't do anything about dying.

Edit: It doing only multiverse inventories, with itemsadder. Just tried itemsadder with multiverse without inventories and it was good

commented

Test with only mv-core and mv-inv installed. Your server has too many errors from other plugins to justify its an issue with mv-inv. Also test with 1.16 server to see if the issue can be reproduced on that mc version as well.

commented

Do you have any link to or description of what that ItemsAdder plugin does?

commented

Itemsadder is like customitems. Adding custom textures to minecraft. It's paid plugin, and really easy to use. We bought both, but customitems wasn't compatible at all

https://www.spigotmc.org/resources/%E2%9C%85must-have%E2%9C%85-itemsadder%E2%9C%A8custom-items-huds-guis-mobs-3dmodels-emojis-blocks-wings-hats-liquids.73355/

commented

I dont see how mvinv will cause this. I suggest contacting ItemAdder on it.

these are the relevant code for mvinv handling death:

@EventHandler(priority = EventPriority.MONITOR)
public void playerDeath(PlayerDeathEvent event) {
Logging.finer("=== Handling PlayerDeathEvent for: " + event.getEntity().getName() + " ===");
String deathWorld = event.getEntity().getWorld().getName();
ProfileContainer worldProfileContainer = this.inventories.getWorldProfileContainerStore().getContainer(deathWorld);
PlayerProfile profile = worldProfileContainer.getPlayerData(event.getEntity());
profile.set(Sharables.LEVEL, event.getNewLevel());
profile.set(Sharables.EXPERIENCE, (float) event.getNewExp());
profile.set(Sharables.TOTAL_EXPERIENCE, event.getNewTotalExp());
this.inventories.getData().updatePlayerData(profile);
for (WorldGroup worldGroup : this.inventories.getGroupManager().getGroupsForWorld(deathWorld)) {
profile = worldGroup.getGroupProfileContainer().getPlayerData(event.getEntity());
profile.set(Sharables.LEVEL, event.getNewLevel());
profile.set(Sharables.EXPERIENCE, (float) event.getNewExp());
profile.set(Sharables.TOTAL_EXPERIENCE, event.getNewTotalExp());
this.inventories.getData().updatePlayerData(profile);
}
Logging.finer("=== Finished handling PlayerDeathEvent for: " + event.getEntity().getName() + "! ===");
}

commented

Basically the issue is:

  1. E.g. a player in survival gamemode.
  2. PlayerDeathEvent called
  3. Itemadder change gamemode to spectator and health of survival gamemode is store as 0.
  4. Itemadder change gamemode back to survival, player health is set to 0.
  5. PlayerDeathEvent is called again
  6. Repeat of step 1-6 until StackOverflow