DimStorage

DimStorage

9M Downloads

DimStorage owner breaks with colors

Yamza opened this issue ยท 5 comments

commented

When setting owner on the chest it seems to be including any name color with the name, so if a players name color changes they will no longer have access to the chest.
https://i.imgur.com/gzwx8zc.gifv

commented

Hi, I already have a solution ready for this bug. How do you change the color of the name?

commented

Currently using this mod https://www.curseforge.com/minecraft/mc-mods/colouredchat
Sounds like the issue might be that it's setting players into fake teams and not the color itself?

commented

The problem is with using display names as a reference to a player. This can change with players changing their minecraft name or if any mod or minecraft itself modifies the display name. (In this issue minecraft itself is changing the display name of players in teams with a team colour)

https://github.com/Edivad99/DimStorage/blob/1.15.x/src/main/java/edivad/dimstorage/tile/TileFrequencyOwner.java#L44

return getOwner().equals(player.getDisplayName().getFormattedText());

These should all be changed to save the players uuid instead and only get the display name when you display the players name in guis

commented

In fact, I solved it this way

commented

When the update comes out, before updating you must move all the inventory you had to the private part, to the public part. This is due to the change of the key system useful for saving the contents of the chest. When the update comes out, I will also inform you via the minecraft terminal.