Destroying orphaned vault
Closed this issue · 3 comments
Hello,
I have trouble to setup gringotts.
I can create a vault by putting a sign on a chest with [Vault], but then when i use a command like: gringotts:balance,
the sign pop off and the vault is destroying.
The only specific message i have in the console is [Gringotts] Destroying orphaned vault
I am using paper 1.19.2 and this plugin list : AureliumSkills, BKCommonLib, Chunky, CMI, CMILib, Gringotts, Lands, LevelledMobs, LuckPerms, My_Worlds, Vault, WorldEdit
Thanks for your help
I removed all the plugins except those 3 : gringotts, luckperms, vault and still have the issue
Ok i found the issue:
i had vault_pattern: '[^\[]*\[(\w*) ?Vault\]'
in my config file.
But in src/main/java/org/gestern/gringotts/AccountChest.java
You have String line0 = lines[0].toLowerCase().trim();
So even if i was writing the first line with [Vault] on my sign, respecting the case on the V, you are lower casing the sign first line everytime before comparing it with regex. So if the regex has an upper case, it will always fail.
That is really interesting. Thank you for providing all the steps to reproduce it. <3 I'll have a look to see if I can reproduce it and possible fix it <3