Named Denominations dont work
Janvonfalken opened this issue ยท 4 comments
I want to use gold nuggets named "Taler" as my currency, They dont show up in my balance without adding a displayname tag. I added one, but they still dont show up?
# for details on configuration, see https://github.com/MinecraftWars/Gringotts/blob/master/doc/configuration.md
# supported languages: "custom" (default, english) and "de" (german)
language: custom
# currency name and value config
currency:
# currency name to use in messages
name:
singular: Taler
plural: Taler
# number of decimal digits supported by currency value (0 for whole numbers only)
digits: 2
# Display account balances with individual denomination names
named-denominations: true
# value of individual denominations. default: emerald: 1, emerald block: 9
denominations:
- material: gold_nugget
value: 1
unit-name: Taler
displayname: Taler
- material: iron_nugget
value: 0.1
unit-name: Kreuzer
displayname: Kreuzer
I have the same issue and money pay
and moneyadmin
are giving following error:
[16:10:40 ERROR]: null org.bukkit.command.CommandException: Unhandled exception executing command 'moneyadmin' in plugin Gringotts v2.10.1-SNAPSHOT at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[patched_1.13.2.jar:git-Paper-474] at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:149) ~[patched_1.13.2.jar:git-Paper-474] at org.bukkit.craftbukkit.v1_13_R2.CraftServer.dispatchCommand(CraftServer.java:732) ~[patched_1.13.2.jar:git-Paper-474] at net.minecraft.server.v1_13_R2.PlayerConnection.handleCommand(PlayerConnection.java:1799) ~[patched_1.13.2.jar:git-Paper-474] at net.minecraft.server.v1_13_R2.PlayerConnection.a(PlayerConnection.java:1602) ~[patched_1.13.2.jar:git-Paper-474] at net.minecraft.server.v1_13_R2.PacketPlayInChat.a(PacketPlayInChat.java:45) ~[patched_1.13.2.jar:git-Paper-474] at net.minecraft.server.v1_13_R2.PacketPlayInChat.a(PacketPlayInChat.java:5) ~[patched_1.13.2.jar:git-Paper-474] at net.minecraft.server.v1_13_R2.PlayerConnectionUtils.lambda$ensureMainThread$0(PlayerConnectionUtils.java:12) ~[patched_1.13.2.jar:git-Paper-474] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_181] at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_181] at net.minecraft.server.v1_13_R2.SystemUtils.a(SystemUtils.java:109) ~[patched_1.13.2.jar:git-Paper-474] at net.minecraft.server.v1_13_R2.MinecraftServer.b(MinecraftServer.java:1016) ~[patched_1.13.2.jar:git-Paper-474] at net.minecraft.server.v1_13_R2.DedicatedServer.b(DedicatedServer.java:439) ~[patched_1.13.2.jar:git-Paper-474] at net.minecraft.server.v1_13_R2.MinecraftServer.a(MinecraftServer.java:943) ~[patched_1.13.2.jar:git-Paper-474] at net.minecraft.server.v1_13_R2.MinecraftServer.run(MinecraftServer.java:841) ~[patched_1.13.2.jar:git-Paper-474] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181] Caused by: java.lang.NoSuchMethodError: com.sk89q.worldguard.bukkit.WorldGuardPlugin.getRegionManager(Lorg/bukkit/World;)Lcom/sk89q/worldguard/protection/managers/RegionManager; at org.gestern.gringotts.dependency.WorldGuardHandler.getAccountHolder(WorldGuardHandler.java:62) ~[?:?] at org.gestern.gringotts.dependency.WorldGuardHandler.getAccountHolder(WorldGuardHandler.java:23) ~[?:?] at org.gestern.gringotts.accountholder.AccountHolderFactory.get(AccountHolderFactory.java:35) ~[?:?] at org.gestern.gringotts.api.impl.GringottsEco.account(GringottsEco.java:31) ~[?:?] at org.gestern.gringotts.Commands$Moneyadmin.onCommand(Commands.java:246) ~[?:?] at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[patched_1.13.2.jar:git-Paper-474] ... 15 more
I had a quick look. If I have the following in my declaration:
currency:
denominations:
- material: iron_nugget
unit-name: special iron nugget
displayname: special nugget
value: 1
- material: iron_ingot
unit-name: special iron ingot
displayname: special ingot
value: 9
Then reload the config, all my existing iron nuggets and iron ingots no longer get counted (which is correct as they don't have the correct name).
If I use: /moneyadmin add Bundie 10
It adds '1 special iron ingot, 1 special iron nugget' to my inventory, which come up with the correct names and are treated differently to the existing ones. They are also counted as part of my balance. So it all seems to be ok so far.
The exception you are getting is because WorldGuard in their infinite wisdom broke the API again. I'll raise a separate issue for this and fix it. I'm running the latest build of WorldGuard which gives me the same error.
See: #186
@masagameplay I've compiled up a preview build with support for both WorldGuard 6.2 and 7.0.0. You can download it here:
https://github.com/bundabrg/Gringotts/releases/tag/v3.0.0-preview.1
Use at your own risk and make backups.