-
-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.21 Compability #176
Comments
Exact same problem. I am hosting it on falixnodes and also have Chestshop, Dynmap, floodgate, geyser, gringotts, maptowny, towny, townychat, townycombat, townyprovinces, and vault installed.
|
I'm not a git pro or a programmer, BUT I was able to fix/work around this (probably incorrectly) by changing line 106 of Configuration.java: Change: and recompile. With this hack, was able to get the mod to successfully load on paper-1.21-63.jar Haven't done much testing yet, just running a small server for my kids. Hope this helps someone! |
Hi. I'm going to try to do the same. Where is the configuration.java file located? |
This may have got the plugin to compile with 1.21 but I am unable to withdraw/deposit money |
Same situation, including me not being much of a (Java) programmer. To make the plugin load I've changed the same line in itemByName() to |
You have to clone this repository, then edit the file \src\main\java\org\gestern\gringotts\Configuration.java as described and compile the whole thing using Apache Maven. |
@gurkleffe - This error is fixed by creating an empty file called "ebean.properties" in the server's main directory, the same place your server.jar, server.properties ... live. The ebean Java classes provide database connectivity, that's what Gringotts is using to interact with its SQLite database. |
According to my survey to the source code, Even though the Material of Denomination is set to Emerald in the configuration file, it is AIR in the code. As a result, withdraw/deposit may be made in AIR. |
@DrJekyllH Thanks for your post, it gave me the idea to print to stdout, since the logger can't be used everywhere ... My search also led me to the method getDenominationOf(ItemStack stack) in GringottsCurrency.java. I added the line Somehow I figured out that "denoms" - an instance of "Map<Denominationkey, Denomination>" is using the method equals(Object o) in Denominationkey.java when checking if sand is a valid currency, so I added the line What I eventually noticed was the "ItemStack{AIR x 0}". At the beginning of this issue, it was first determined by @beepee123 that With those changes made, /balance resp. /money are now coming up with the correct amounts. However, /deposit and /withdraw still don't work ... Maybe the change in the ItemStack constructor is breaking things in more places, or maybe it's a different issue, I don't know. Just wanted to post what I've found so far, hoping this can get someone who's more proficient with Java and Minecraft plugins on the (hopefully) right track! |
Found a better solution, one that's less invasive AND seems to fix /deposit and /withdraw, please see pull request #178. In a nutshell: Leave the Map instance "denoms" alone, instead add denominations with amount 1 in the DenominationKey constructor. |
I tested #178 by @DocSplinters under the Paper 1.21 |
I am not familiar with the etiquette of Github and the open source community, and I am concerned that introducing an alternative plugin here violates that etiquette. Since it was discovered that gringotts is not compatible with 1.21, I was looking for an alternative plugin in parallel with fixing the source. Until an official 1.21-compatible version of gringotts is released, using this alternative plugin is an option. banco |
N00b question: What's the next step, just waiting for the maintainers of this repo to decide whether they want to incorporate #178? Or is there anything I can or have to do to move forward? |
@DocSplinters that's correct :) I'm currently running tests to ensure that is compatible with older versions of Gringotts and is not gonna cause any issues updating to the new version as they are a lot of changes. :) |
Spoiler: there are breaking changes, so you will need to update your database, I'm currently writing instructions on how to do that. The good news is that you will likely never have to do it again for future versions as it will be automatic from now on. |
Where can we find the instructions for updating the database? |
Here 8b51eee |
I've tried running the plugin with Minecraft 1.21 which gives the error Encountered an error parsing currency. Please check your Gringotts configuration. Error was: amount must be greater than 0, followed by these messages:
[15:16:38 INFO]: [Gringotts] Disabling Gringotts v2.12.5
[15:16:38 INFO]: [Gringotts] Disabling dependency Towny
[15:16:38 INFO]: [Gringotts] Disabling dependency Vault
[15:16:38 INFO]: [Gringotts] disabled
[15:16:38 WARN]: [Gringotts] Gringotts disabled due to startup errors.
There is also another error which seems to be related to this and which is triggered earlier than the ones mentioned above:
[15:25:38 ERROR]: [com.avaje.ebean.config.PropertyMapLoader] ebean.properties not found
I'd love to see a new version of it being compatible!
The text was updated successfully, but these errors were encountered: