Logoff on non-main inventory world... return to main world to destroyed inventory
mrcoffee1026 opened this issue ยท 11 comments
(Moved from issue #1875 Multiverse-Core... realized it belonged here)
Anything with special characters in the item title (colors, etc.) results in this. Screen shot examples:
https://imgur.com/a/Q9QE2
Most items I picture are SlimeFun related which liked to use color titles, but any item with "special" characteristics qualifies for destruction: vote keys from CratesPlus... Signed books (such as "colors" -- book bundled with Essentials). Items lose special properties or entirety of function (book is no longer a book (not useable)... Slimefun items are useless other than as "skulls", crate keys no longer access crates.
I have two groups... one inventory group for all 'survival' worlds, one for all 'creative' worlds. If you log out while in a creative world with "special items" in your (not currently active survival) inventory, they are destroyed when you return to the survival world.
mv version output:
[20:42:49] [Server thread/INFO]: [Multiverse-Inventories] Multiverse-Inventories Version: 2.5.0-SNAPSHOT-b443
[20:42:49] [Server thread/INFO]: [Multiverse-Inventories] First Run: false
[20:42:49] [Server thread/INFO]: [Multiverse-Inventories] Using Bypass: false
[20:42:49] [Server thread/INFO]: [Multiverse-Inventories] Default Ungrouped Worlds: false
[20:42:49] [Server thread/INFO]: [Multiverse-Inventories] Using GameMode Profiles: false
[20:42:49] [Server thread/INFO]: [Multiverse-Inventories] === Groups ===
[20:42:49] [Server thread/INFO]: [Multiverse-Inventories] default: {Worlds: [world, world_the_end, world_nether, pvp], 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]}
[20:42:49] [Server thread/INFO]: [Multiverse-Inventories] CreativeMaps: {Worlds: [staff_creative, event, creative, pixelmap], 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]}
[20:42:49] [Server thread/INFO]: [Multiverse-Core] [Multiverse-Core] Multiverse-Core Version: 2.6.0-SNAPSHOT-b736
[20:42:49] [Server thread/INFO]: [Multiverse-Core] [Multiverse-Core] Bukkit Version: git-Spigot-5695bca-53fccdf (MC: 1.12.2)
[20:42:49] [Server thread/INFO]: [Multiverse-Core] [Multiverse-Core] Loaded Worlds: [{"MVWorld@248304490":{"Gen":"null","Type":"NORMAL","Env":"THE_END","Name":"world_the_end"}}, {"MVWorld@1466964761":{"Gen":"null","Type":"NORMAL","Env":"NORMAL","Name":"world"}}, {"MVWorld@1340554846":{"Gen":"null","Type":"NORMAL","Env":"NORMAL","Name":"Creative"}}, {"MVWorld@740268914":{"Gen":"null","Type":"FLAT","Env":"NORMAL","Name":"PixelMap"}}, {"MVWorld@1668123099":{"Gen":"null","Type":"NORMAL","Env":"NETHER","Name":"world_nether"}}, {"MVWorld@714176366":{"Gen":"PlotSquared","Type":"NORMAL","Env":"NORMAL","Name":"PixelMapTwo"}}, {"MVWorld@48304298":{"Gen":"null","Type":"FLAT","Env":"NORMAL","Name":"staff_creative"}}, {"MVWorld@327531482":{"Gen":"null","Type":"FLAT","Env":"NORMAL","Name":"Event"}}, {"MVWorld@884419041":{"Gen":"null","Type":"FLAT","Env":"NORMAL","Name":"pvp"}}, {"MVWorld@910201301":{"Gen":"null","Type":"NORMAL","Env":"NORMAL","Name":"RolePlay"}}]
[20:42:49] [Server thread/INFO]: [Multiverse-Core] [Multiverse-Core] Multiverse Plugins Loaded: 2
[20:42:49] [Server thread/INFO]: [Multiverse-Core] [Multiverse-Core] Economy being used: Essentials Economy
[20:42:49] [Server thread/INFO]: [Multiverse-Core] [Multiverse-Core] Permissions Plugin: Bukkit Permissions (SuperPerms)
[20:42:49] [Server thread/INFO]: [Multiverse-Core] [Multiverse-Core] Dumping Config Values: (version 2.9)
[20:42:49] [Server thread/INFO]: [Multiverse-Core] [Multiverse-Core] messagecooldown: 10000
[20:42:49] [Server thread/INFO]: [Multiverse-Core] [Multiverse-Core] teleportcooldown: 10000
[20:42:49] [Server thread/INFO]: [Multiverse-Core] [Multiverse-Core] worldnameprefix: false
[20:42:49] [Server thread/INFO]: [Multiverse-Core] [Multiverse-Core] worldnameprefixFormat: [%world%]%chat%
[20:42:49] [Server thread/INFO]: [Multiverse-Core] [Multiverse-Core] enforceaccess: true
[20:42:49] [Server thread/INFO]: [Multiverse-Core] [Multiverse-Core] displaypermerrors: true
[20:42:49] [Server thread/INFO]: [Multiverse-Core] [Multiverse-Core] teleportintercept: true
[20:42:49] [Server thread/INFO]: [Multiverse-Core] [Multiverse-Core] firstspawnoverride: true
[20:42:49] [Server thread/INFO]: [Multiverse-Core] [Multiverse-Core] firstspawnworld: world
[20:42:49] [Server thread/INFO]: [Multiverse-Core] [Multiverse-Core] debug: 0
[20:42:49] [Server thread/INFO]: [Multiverse-Core] [Multiverse-Core] Special Code: FRN002
[20:42:49] [Server thread/INFO]: [Multiverse-Core] [Multiverse-Portals] Multiverse-Portals Version: 2.5.2-SNAPSHOT-b762
[20:42:49] [Server thread/INFO]: [Multiverse-Core] [Multiverse-Portals] Loaded Portals: 19
[20:42:49] [Server thread/INFO]: [Multiverse-Core] [Multiverse-Portals] Dumping Portal Values: (version 2.7)
[20:42:49] [Server thread/INFO]: [Multiverse-Core] [Multiverse-Portals] wand: 271
[20:42:49] [Server thread/INFO]: [Multiverse-Core] [Multiverse-Portals] useonmove: true
[20:42:49] [Server thread/INFO]: [Multiverse-Core] [Multiverse-Portals] enforceportalaccess: true
[20:42:49] [Server thread/INFO]: [Multiverse-Core] [Multiverse-Portals] portalsdefaulttonether: false
[20:42:49] [Server thread/INFO]: [Multiverse-Core] [Multiverse-Portals] portalcooldown: 10000
[20:42:49] [Server thread/INFO]: [Multiverse-Core] [Multiverse-Portals] clearonremove: false
[20:42:49] [Server thread/INFO]: [Multiverse-Core] [Multiverse-Portals] Special Code: FRN001
[20:42:49] [Server thread/INFO]: [Multiverse-Core] [Multiverse-Inventories] Multiverse-Inventories Version: 2.5.0-SNAPSHOT-b443
[20:42:49] [Server thread/INFO]: [Multiverse-Core] [Multiverse-Inventories] First Run: false
[20:42:49] [Server thread/INFO]: [Multiverse-Core] [Multiverse-Inventories] Using Bypass: false
[20:42:49] [Server thread/INFO]: [Multiverse-Core] [Multiverse-Inventories] Default Ungrouped Worlds: false
[20:42:49] [Server thread/INFO]: [Multiverse-Core] [Multiverse-Inventories] Using GameMode Profiles: false
[20:42:49] [Server thread/INFO]: [Multiverse-Core] [Multiverse-Inventories] === Groups ===
[20:42:49] [Server thread/INFO]: [Multiverse-Core] [Multiverse-Inventories] default: {Worlds: [world, world_the_end, world_nether, pvp], 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]}
[20:42:49] [Server thread/INFO]: [Multiverse-Core] [Multiverse-Inventories] CreativeMaps: {Worlds: [staff_creative, event, creative, pixelmap], 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]}
mv-inv config:
# Multiverse-Inventories Settings
# ===[ Multiverse Inventories Config ]===
settings:
# This is the locale you wish to use.
locale: en
# If this is true it will generate world groups for you based on MV worlds.
first_run: false
# If this is set to true, it will enable bypass permissions (Check the wiki for more info.)
use_bypass: false
# If set to true, any world not listed in a group will automatically use the settings for the default group!
default_ungrouped_worlds: false
# The default and suggested setting for this is FALSE.
# False means Multiverse-Inventories will not attempt to load or save any player data when they log in and out.
# That means that MINECRAFT will handle that exact thing JUST LIKE IT DOES NORMALLY.
# Changing this to TRUE will have Multiverse-Inventories save player data when they log out and load it when they log in.
# The biggest potential drawback here is that if your server crashes, player stats/inventories may be lost/rolled back!
save_load_on_log_in_out: false
# If this is set to true, players will have different inventories/stats for each game mode.
# Please note that old data migrated to the version that has this feature will have their data copied for both game modes.
use_game_mode_profiles: false
shares:
# When set to true, optional shares WILL be utilized in cases where a group does not cover their uses for a world.
# An example of this in action would be an ungrouped world using last_location. When this is true, players will return to their last location in that world.
# When set to false, optional shares WILL NOt be utilized in these cases, effectively disabling it for ungrouped worlds.
optionals_for_ungrouped_worlds: true
# You must specify optional shares you wish to use here or they will be ignored.
# The only built in optional share is "economy"
use_optionals: []
This issue seems to occur SOMETIMES when restarting -- given that last group user was in is not "primary" (what is currently in the vanilla .dat file for player).
This does appear to only happen if a server restart happens while players are not using the primary group's inventory. Not sure if there's a different routine that parses the contents of the .json files on startup than the one that does during world swapping... but it seems the one that runs on startup is the one that fails.
If you read the readme u should see
Multiverse-Inventories is no longer supported. We highly recommend switching to Per World Inventory which supports importing your inventories from Multiverse-Inventories.
Yes and then I saw that Per World Inventory hasn't been updated to 1.12 yet... so it doesn't appear to be supported either. There was also a note on this site to weigh in on the whole revamp thing even if that meant the possibility of having to rebuild player inventories from empty (excluding chests, obviously)... and so I went to the suggested IRC channel... which said to go to the Discord... which said "we're still developing the plugin and the website hasn't been updated". So this isn't helpful, but thanks.
Clicked on that link then I saw on PWI's spigot page
Tested Minecraft Versions: 1.8, 1.9, 1.10, 1.11, 1.12
If it doesnt work or you nd further support then try ask author of PWI. https://github.com/Gnat008/PerWorldInventory/issues
I mailed the dev of this directly, said they'd be working on it as time permits. That PWI finally updated to post 1.9 months after I loaded this... This is still being developed, I don't need YOUR personal assistance on this if you're not involved in the project, nor do I need you steering me to another project with another set of issues.
This seems to be a problem on some of the odder Linux distros only (I had issues with tinycore). So it's not a widespread issue obviously, and I am certain most admins would have worked it out right away so you could just ignore it.
Or the way to fix it is as Ryan the leech suggested is to enforce a character set in code. I believe that you are using the FileConfiguration
methods provided by bukkit/spigot to save and load inventories? If so then they do not provide an option for an encoding type, so that would mean replacing or override them.
I can try take a crack at fixing it, but you know your own code/methodology better and would do a better job I am sure.
resolved as character set issue?
Change character set in use to en-US.utf-8 to resolve issue
locale <-- command to see current setting
enter these two commands to change character set temporarily...
LANG=en_US.utf-8
LANGUAGE=en_US.utf-8:
Make the changes permanent, browse to /etc/default/locale and change contents to:
/etc/default/locale
LANG="en_US.utf-8"
LANGUAGE="en_US.utf-8:"
Reboot and all should be well going forward (any previously glitched stuff will still be glitched so... rip).
I thought it had something to do with that... I just couldn't remember how it was fixed previously. I'm not sure what I can do to make it any better.
Googling suggests it should be possible to force a given encoding when setting the input and output streams for snakeyaml somehow.
the lack of roundtrip will be due to a difference in the method of encoding between the saving and the loading.
https://jd.bukkit.org/org/bukkit/configuration/file/YamlConfiguration.html has a deprecated field regarding the ability to force UTF8, I wonder why it was deprecated.