You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Adding and removing fractional amounts of money via moneyadm produces exceptions:
[14:16:03 INFO]: silen72 issued server command: /moneyadm add silen72 0.5
[14:16:03 ERROR]: null
minecraftdev | org.bukkit.command.CommandException: Unhandled exception executing command 'moneyadm' in plugin Gringotts v2.12.5
minecraftdev | at org.bukkit.command.PluginCommand.execute(PluginCommand.java:47) ~[paper-api-1.19.4-R0.1-SNAPSHOT.jar:?]
minecraftdev | at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:155) ~[paper-api-1.19.4-R0.1-SNAPSHOT.jar:?]
minecraftdev | at org.bukkit.craftbukkit.v1_19_R3.CraftServer.dispatchCommand(CraftServer.java:929) ~[paper-1.19.4.jar:git-Paper-550]
minecraftdev | at org.bukkit.craftbukkit.v1_19_R3.command.BukkitCommandWrapper.run(BukkitCommandWrapper.java:64) ~[paper-1.19.4.jar:git-Paper-550]
minecraftdev | at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:264) ~[paper-1.19.4.jar:?]
minecraftdev | at net.minecraft.commands.Commands.performCommand(Commands.java:322) ~[?:?]
minecraftdev | at net.minecraft.commands.Commands.performCommand(Commands.java:306) ~[?:?]
minecraftdev | at net.minecraft.server.network.ServerGamePacketListenerImpl.performChatCommand(ServerGamePacketListenerImpl.java:2297) ~[?:?]
minecraftdev | at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleChatCommand$20(ServerGamePacketListenerImpl.java:2257) ~[?:?]
minecraftdev | at net.minecraft.util.thread.BlockableEventLoop.lambda$submitAsync$0(BlockableEventLoop.java:59) ~[?:?]
minecraftdev | at java.util.concurrent.CompletableFuture$AsyncSupply.run(Unknown Source) ~[?:?]
minecraftdev | at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.19.4.jar:git-Paper-550]
minecraftdev | at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153) ~[?:?]
minecraftdev | at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[?:?]
minecraftdev | at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1342) ~[paper-1.19.4.jar:git-Paper-550]
minecraftdev | at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:197) ~[paper-1.19.4.jar:git-Paper-550]
minecraftdev | at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?]
minecraftdev | at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1319) ~[paper-1.19.4.jar:git-Paper-550]
minecraftdev | at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1312) ~[paper-1.19.4.jar:git-Paper-550]
minecraftdev | at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?]
minecraftdev | at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1290) ~[paper-1.19.4.jar:git-Paper-550]
minecraftdev | at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1178) ~[paper-1.19.4.jar:git-Paper-550]
minecraftdev | at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:320) ~[paper-1.19.4.jar:git-Paper-550]
minecraftdev | at java.lang.Thread.run(Unknown Source) ~[?:?]
minecraftdev | Caused by: org.gestern.gringotts.GringottsException: java.util.concurrent.ExecutionException: java.lang.NullPointerException: Cannot invoke "org.bukkit.inventory.ItemStack.getType()" because "itemStack" is null
minecraftdev | at org.gestern.gringotts.GringottsAccount.getTimeout(GringottsAccount.java:470) ~[gringotts-2.12.5.jar:?]
minecraftdev | at org.gestern.gringotts.GringottsAccount.add(GringottsAccount.java:231) ~[gringotts-2.12.5.jar:?]
minecraftdev | at org.gestern.gringotts.api.impl.GringottsEco$ValidAccount.add(GringottsEco.java:644) ~[gringotts-2.12.5.jar:?]
minecraftdev | at org.gestern.gringotts.commands.MoneyAdminExecutor.onCommand(MoneyAdminExecutor.java:92) ~[gringotts-2.12.5.jar:?]
minecraftdev | at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[paper-api-1.19.4-R0.1-SNAPSHOT.jar:?]
minecraftdev | ... 23 more
minecraftdev | Caused by: java.util.concurrent.ExecutionException: java.lang.NullPointerException: Cannot invoke "org.bukkit.inventory.ItemStack.getType()" because "itemStack" is null
minecraftdev | at java.util.concurrent.CompletableFuture.reportGet(Unknown Source) ~[?:?]
minecraftdev | at java.util.concurrent.CompletableFuture.get(Unknown Source) ~[?:?]
minecraftdev | at org.gestern.gringotts.GringottsAccount.getTimeout(GringottsAccount.java:468) ~[gringotts-2.12.5.jar:?]
minecraftdev | at org.gestern.gringotts.GringottsAccount.add(GringottsAccount.java:231) ~[gringotts-2.12.5.jar:?]
minecraftdev | at org.gestern.gringotts.api.impl.GringottsEco$ValidAccount.add(GringottsEco.java:644) ~[gringotts-2.12.5.jar:?]
minecraftdev | at org.gestern.gringotts.commands.MoneyAdminExecutor.onCommand(MoneyAdminExecutor.java:92) ~[gringotts-2.12.5.jar:?]
minecraftdev | at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[paper-api-1.19.4-R0.1-SNAPSHOT.jar:?]
minecraftdev | ... 23 more
minecraftdev | Caused by: java.lang.NullPointerException: Cannot invoke "org.bukkit.inventory.ItemStack.getType()" because "itemStack" is null
minecraftdev | at org.gestern.gringotts.GringottsAccount.addToShulkerBox(GringottsAccount.java:309) ~[gringotts-2.12.5.jar:?]
minecraftdev | at org.gestern.gringotts.GringottsAccount.lambda$add$1(GringottsAccount.java:184) ~[gringotts-2.12.5.jar:?]
minecraftdev | at org.gestern.gringotts.GringottsAccount.lambda$callSync$0(GringottsAccount.java:54) ~[gringotts-2.12.5.jar:?]
minecraftdev | at org.gestern.gringotts.GringottsAccount.callSync(GringottsAccount.java:61) ~[gringotts-2.12.5.jar:?]
minecraftdev | at org.gestern.gringotts.GringottsAccount.add(GringottsAccount.java:231) ~[gringotts-2.12.5.jar:?]
minecraftdev | at org.gestern.gringotts.api.impl.GringottsEco$ValidAccount.add(GringottsEco.java:644) ~[gringotts-2.12.5.jar:?]
minecraftdev | at org.gestern.gringotts.commands.MoneyAdminExecutor.onCommand(MoneyAdminExecutor.java:92) ~[gringotts-2.12.5.jar:?]
minecraftdev | at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[paper-api-1.19.4-R0.1-SNAPSHOT.jar:?]
minecraftdev | ... 23 more
To Reproduce
Steps to reproduce the behavior:
Set up a new server with paper 1.19.4 (550)
Add Vault v1.7.3-b131 to plugin folder
Add Gringotts v2.12.5 to plugin folder
Start the server (without tinkering with the config.yml files)
Join the server as op
Issue "/moneyadm add 0.5"
See server log: Unhandled exception executing command 'moneyadm' in plugin Gringotts v2.12.5
Check your account ("/money"): nothing has been added to your account
Issue "/moneyadm add 5"
See server log: no exception
Issue "/moneyadm remove 0.5"
See server log: Unhandled exception executing command 'moneyadm' in plugin Gringotts v2.12.5
Check your account ("/money"): Although generating exceptions, one emerald has been deducted from your account
Expected behavior
It should be possible to add (and remove) fractional amounts of money via moneyadm.
Screenshots
not applicable
Desktop (please complete the following information):
Server Type: paper 1.19.4
Server Version: paper-1.19.4-550.jar
Gringotts Version: 2.12.5
Java 17 (OpenJDK 64-Bit Server VM 17.0.10+7)
Additional context
I have encountered this issue on my 1.20.4 server first. Because Gringotts states to support minecraft only up until 1.19 (https://www.spigotmc.org/resources/gringotts.42071/), I have set up a test server with 1.19.4 to verify the issue (see above).
Having no money, removing fractional amounts does nothing (no errors).
The text was updated successfully, but these errors were encountered:
I did some digging and found that Gringotts throws the same exception that you pasted above when Signshop tries to execute the transaction. The difference being that Signshop catches that exception and terminates the transaction and then gives the overstock message.
It looks like this pull request might fix the issue since the underlying error is a NPE on and item stack. The problem is the currently released version on SpigotMC does not contain this PR and the author has not been on SpigotMC for weeks.
@nikosgram: weaves7 has provided a plugin file that incorporates the above mentioned pull request and thereby fixes this issue. Would you please update Gringotts with that pull request as well?
Describe the bug
Adding and removing fractional amounts of money via moneyadm produces exceptions:
[14:16:03 INFO]: silen72 issued server command: /moneyadm add silen72 0.5
[14:16:03 ERROR]: null
minecraftdev | org.bukkit.command.CommandException: Unhandled exception executing command 'moneyadm' in plugin Gringotts v2.12.5
minecraftdev | at org.bukkit.command.PluginCommand.execute(PluginCommand.java:47) ~[paper-api-1.19.4-R0.1-SNAPSHOT.jar:?]
minecraftdev | at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:155) ~[paper-api-1.19.4-R0.1-SNAPSHOT.jar:?]
minecraftdev | at org.bukkit.craftbukkit.v1_19_R3.CraftServer.dispatchCommand(CraftServer.java:929) ~[paper-1.19.4.jar:git-Paper-550]
minecraftdev | at org.bukkit.craftbukkit.v1_19_R3.command.BukkitCommandWrapper.run(BukkitCommandWrapper.java:64) ~[paper-1.19.4.jar:git-Paper-550]
minecraftdev | at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:264) ~[paper-1.19.4.jar:?]
minecraftdev | at net.minecraft.commands.Commands.performCommand(Commands.java:322) ~[?:?]
minecraftdev | at net.minecraft.commands.Commands.performCommand(Commands.java:306) ~[?:?]
minecraftdev | at net.minecraft.server.network.ServerGamePacketListenerImpl.performChatCommand(ServerGamePacketListenerImpl.java:2297) ~[?:?]
minecraftdev | at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleChatCommand$20(ServerGamePacketListenerImpl.java:2257) ~[?:?]
minecraftdev | at net.minecraft.util.thread.BlockableEventLoop.lambda$submitAsync$0(BlockableEventLoop.java:59) ~[?:?]
minecraftdev | at java.util.concurrent.CompletableFuture$AsyncSupply.run(Unknown Source) ~[?:?]
minecraftdev | at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.19.4.jar:git-Paper-550]
minecraftdev | at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153) ~[?:?]
minecraftdev | at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[?:?]
minecraftdev | at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1342) ~[paper-1.19.4.jar:git-Paper-550]
minecraftdev | at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:197) ~[paper-1.19.4.jar:git-Paper-550]
minecraftdev | at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?]
minecraftdev | at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1319) ~[paper-1.19.4.jar:git-Paper-550]
minecraftdev | at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1312) ~[paper-1.19.4.jar:git-Paper-550]
minecraftdev | at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?]
minecraftdev | at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1290) ~[paper-1.19.4.jar:git-Paper-550]
minecraftdev | at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1178) ~[paper-1.19.4.jar:git-Paper-550]
minecraftdev | at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:320) ~[paper-1.19.4.jar:git-Paper-550]
minecraftdev | at java.lang.Thread.run(Unknown Source) ~[?:?]
minecraftdev | Caused by: org.gestern.gringotts.GringottsException: java.util.concurrent.ExecutionException: java.lang.NullPointerException: Cannot invoke "org.bukkit.inventory.ItemStack.getType()" because "itemStack" is null
minecraftdev | at org.gestern.gringotts.GringottsAccount.getTimeout(GringottsAccount.java:470) ~[gringotts-2.12.5.jar:?]
minecraftdev | at org.gestern.gringotts.GringottsAccount.add(GringottsAccount.java:231) ~[gringotts-2.12.5.jar:?]
minecraftdev | at org.gestern.gringotts.api.impl.GringottsEco$ValidAccount.add(GringottsEco.java:644) ~[gringotts-2.12.5.jar:?]
minecraftdev | at org.gestern.gringotts.commands.MoneyAdminExecutor.onCommand(MoneyAdminExecutor.java:92) ~[gringotts-2.12.5.jar:?]
minecraftdev | at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[paper-api-1.19.4-R0.1-SNAPSHOT.jar:?]
minecraftdev | ... 23 more
minecraftdev | Caused by: java.util.concurrent.ExecutionException: java.lang.NullPointerException: Cannot invoke "org.bukkit.inventory.ItemStack.getType()" because "itemStack" is null
minecraftdev | at java.util.concurrent.CompletableFuture.reportGet(Unknown Source) ~[?:?]
minecraftdev | at java.util.concurrent.CompletableFuture.get(Unknown Source) ~[?:?]
minecraftdev | at org.gestern.gringotts.GringottsAccount.getTimeout(GringottsAccount.java:468) ~[gringotts-2.12.5.jar:?]
minecraftdev | at org.gestern.gringotts.GringottsAccount.add(GringottsAccount.java:231) ~[gringotts-2.12.5.jar:?]
minecraftdev | at org.gestern.gringotts.api.impl.GringottsEco$ValidAccount.add(GringottsEco.java:644) ~[gringotts-2.12.5.jar:?]
minecraftdev | at org.gestern.gringotts.commands.MoneyAdminExecutor.onCommand(MoneyAdminExecutor.java:92) ~[gringotts-2.12.5.jar:?]
minecraftdev | at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[paper-api-1.19.4-R0.1-SNAPSHOT.jar:?]
minecraftdev | ... 23 more
minecraftdev | Caused by: java.lang.NullPointerException: Cannot invoke "org.bukkit.inventory.ItemStack.getType()" because "itemStack" is null
minecraftdev | at org.gestern.gringotts.GringottsAccount.addToShulkerBox(GringottsAccount.java:309) ~[gringotts-2.12.5.jar:?]
minecraftdev | at org.gestern.gringotts.GringottsAccount.lambda$add$1(GringottsAccount.java:184) ~[gringotts-2.12.5.jar:?]
minecraftdev | at org.gestern.gringotts.GringottsAccount.lambda$callSync$0(GringottsAccount.java:54) ~[gringotts-2.12.5.jar:?]
minecraftdev | at org.gestern.gringotts.GringottsAccount.callSync(GringottsAccount.java:61) ~[gringotts-2.12.5.jar:?]
minecraftdev | at org.gestern.gringotts.GringottsAccount.add(GringottsAccount.java:231) ~[gringotts-2.12.5.jar:?]
minecraftdev | at org.gestern.gringotts.api.impl.GringottsEco$ValidAccount.add(GringottsEco.java:644) ~[gringotts-2.12.5.jar:?]
minecraftdev | at org.gestern.gringotts.commands.MoneyAdminExecutor.onCommand(MoneyAdminExecutor.java:92) ~[gringotts-2.12.5.jar:?]
minecraftdev | at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[paper-api-1.19.4-R0.1-SNAPSHOT.jar:?]
minecraftdev | ... 23 more
To Reproduce
Steps to reproduce the behavior:
Expected behavior
It should be possible to add (and remove) fractional amounts of money via moneyadm.
Screenshots
not applicable
Desktop (please complete the following information):
Additional context
I have encountered this issue on my 1.20.4 server first. Because Gringotts states to support minecraft only up until 1.19 (https://www.spigotmc.org/resources/gringotts.42071/), I have set up a test server with 1.19.4 to verify the issue (see above).
Having no money, removing fractional amounts does nothing (no errors).
The text was updated successfully, but these errors were encountered: