MinecraftWars / Gringotts

Item based economy plugin for Bukkit
BSD 2-Clause "Simplified" License
37 stars 76 forks source link

Problem with access of my own Vault-Balance #148

Open Joerg69 opened 8 years ago

Joerg69 commented 8 years ago

Hallo, i have one private Spigot-Server with Version 1.9.2, Gringotts V2.8 and Vault V1.5.6. I have three Users of my Server. Two Users are ok, but my own User (i am Server-Operator) have a Problem with the Vault-Balance. When i give the Command /money, i become:

Your current balance: 0,00 Emeralds Vault balance: 0,00 Emeralds Inventory balance:0,00 Emeralds

When i give the Command /moneyadm b Floris_Papa i become:

Balance of account Floris_Papa: 690,00 Emeralds.

My other Users can pay to my Vault. I can with the Command /money pay xx Floris_Papa pay to my own Vault. The Command /money deposit 9 bring "Deposited 9.00 Emeralds to your storage.", but the Emeralds are not transfered to my Vault. The Emeralds are still in my Inventory.

Can you help me?

Thank's

jastice commented 8 years ago

You could try the curent development version, I may have fixed a bug with how balance is calculated: http://repo.zno.de/artifactory/libs-snapshot-local/minecraftwars/Gringotts/2.9-SNAPSHOT/Gringotts-2.9-20160501.165234-9.jar

I'll have to check about depositing, it might help if you paste as code your Gringotts config.

Joerg69 commented 8 years ago

Thank's for your answer! I have try your Snapshot. Unfortunately can't one of my functional User now not more withdraw money from the vault. I become a acception. Here the log:

[16:57:44] [Server thread/INFO]: Floris_Bruder issued server command: /money
[16:58:05] [Server thread/INFO]: Floris_Bruder issued server command: /money withdraw 9
[16:58:05] [Server thread/ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing command 'money' in plugin Gringotts v2.9-SNAPSHOT
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[spigot-1.9.2.jar:git-Spigot-e000104-4cb3258]
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) ~[spigot-1.9.2.jar:git-Spigot-e000104-4cb3258]
    at org.bukkit.craftbukkit.v1_9_R1.CraftServer.dispatchCommand(CraftServer.java:645) ~[spigot-1.9.2.jar:git-Spigot-e000104-4cb3258]
    at net.minecraft.server.v1_9_R1.PlayerConnection.handleCommand(PlayerConnection.java:1350) [spigot-1.9.2.jar:git-Spigot-e000104-4cb3258]
    at net.minecraft.server.v1_9_R1.PlayerConnection.a(PlayerConnection.java:1185) [spigot-1.9.2.jar:git-Spigot-e000104-4cb3258]
    at net.minecraft.server.v1_9_R1.PacketPlayInChat.a(PacketPlayInChat.java:45) [spigot-1.9.2.jar:git-Spigot-e000104-4cb3258]
    at net.minecraft.server.v1_9_R1.PacketPlayInChat.a(PacketPlayInChat.java:1) [spigot-1.9.2.jar:git-Spigot-e000104-4cb3258]
    at net.minecraft.server.v1_9_R1.PlayerConnectionUtils$1.run(SourceFile:13) [spigot-1.9.2.jar:git-Spigot-e000104-4cb3258]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_91]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_91]
    at net.minecraft.server.v1_9_R1.SystemUtils.a(SourceFile:45) [spigot-1.9.2.jar:git-Spigot-e000104-4cb3258]
    at net.minecraft.server.v1_9_R1.MinecraftServer.D(MinecraftServer.java:721) [spigot-1.9.2.jar:git-Spigot-e000104-4cb3258]
    at net.minecraft.server.v1_9_R1.DedicatedServer.D(DedicatedServer.java:400) [spigot-1.9.2.jar:git-Spigot-e000104-4cb3258]
    at net.minecraft.server.v1_9_R1.MinecraftServer.C(MinecraftServer.java:660) [spigot-1.9.2.jar:git-Spigot-e000104-4cb3258]
    at net.minecraft.server.v1_9_R1.MinecraftServer.run(MinecraftServer.java:559) [spigot-1.9.2.jar:git-Spigot-e000104-4cb3258]
    at java.lang.Thread.run(Thread.java:745) [?:1.8.0_91]
Caused by: org.gestern.gringotts.GringottsException: java.util.concurrent.ExecutionException: java.lang.UnsupportedOperationException
    at org.gestern.gringotts.GringottsAccount.getTimeout(GringottsAccount.java:277) ~[?:?]
    at org.gestern.gringotts.GringottsAccount.remove(GringottsAccount.java:188) ~[?:?]
    at org.gestern.gringotts.api.impl.GringottsEco$ValidPlayerAccount.withdraw(GringottsEco.java:319) ~[?:?]
    at org.gestern.gringotts.Commands.withdraw(Commands.java:150) ~[?:?]
    at org.gestern.gringotts.Commands.access$200(Commands.java:22) ~[?:?]
    at org.gestern.gringotts.Commands$Money.onCommand(Commands.java:65) ~[?:?]
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[spigot-1.9.2.jar:git-Spigot-e000104-4cb3258]
    ... 15 more
Caused by: java.util.concurrent.ExecutionException: java.lang.UnsupportedOperationException
    at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357) ~[?:1.8.0_91]
    at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1915) ~[?:1.8.0_91]
    at org.gestern.gringotts.GringottsAccount.getTimeout(GringottsAccount.java:275) ~[?:?]
    at org.gestern.gringotts.GringottsAccount.remove(GringottsAccount.java:188) ~[?:?]
    at org.gestern.gringotts.api.impl.GringottsEco$ValidPlayerAccount.withdraw(GringottsEco.java:319) ~[?:?]
    at org.gestern.gringotts.Commands.withdraw(Commands.java:150) ~[?:?]
    at org.gestern.gringotts.Commands.access$200(Commands.java:22) ~[?:?]
    at org.gestern.gringotts.Commands$Money.onCommand(Commands.java:65) ~[?:?]
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[spigot-1.9.2.jar:git-Spigot-e000104-4cb3258]
    ... 15 more
Caused by: java.lang.UnsupportedOperationException
    at java.util.Collections$UnmodifiableList.set(Collections.java:1311) ~[?:1.8.0_91]
    at java.util.Collections.swap(Collections.java:497) ~[?:1.8.0_91]
    at java.util.Collections.reverse(Collections.java:378) ~[?:1.8.0_91]
    at org.gestern.gringotts.AccountInventory.remove(AccountInventory.java:95) ~[?:?]
    at org.gestern.gringotts.AccountChest.remove(AccountChest.java:146) ~[?:?]
    at org.gestern.gringotts.GringottsAccount.lambda$remove$4(GringottsAccount.java:163) ~[?:?]
    at org.gestern.gringotts.GringottsAccount.lambda$callSync$5(GringottsAccount.java:220) ~[?:?]
    at org.gestern.gringotts.GringottsAccount.callSync(GringottsAccount.java:226) ~[?:?]
    at org.gestern.gringotts.GringottsAccount.remove(GringottsAccount.java:188) ~[?:?]
    at org.gestern.gringotts.api.impl.GringottsEco$ValidPlayerAccount.withdraw(GringottsEco.java:319) ~[?:?]
    at org.gestern.gringotts.Commands.withdraw(Commands.java:150) ~[?:?]
    at org.gestern.gringotts.Commands.access$200(Commands.java:22) ~[?:?]
    at org.gestern.gringotts.Commands$Money.onCommand(Commands.java:65) ~[?:?]
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[spigot-1.9.2.jar:git-Spigot-e000104-4cb3258]
    ... 15 more
[16:59:14] [Server thread/INFO]: Stopping the server

The problem from my admin-user is not fixed. When my functional Users become Emeralds, in the Chart come a message. When my admin-user become Emeralds, no message come. With /moneyadm b the new Balance displayed.

Sorry for my bad english!

Joerg69 commented 8 years ago

Sorry, i forgot my config.yml! Here is it:

# 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: Emerald
    plural: Emeralds

  # number of decimal digits supported by currency value (0 for whole numbers only)
  digits: 2

  # Display account balances with individual denomination names
  named-denominations: false

  # value of individual denominations. default: emerald: 1, emerald block: 9
  denominations:
    - material: emerald
      value: 1
    - material: emerald_block
      value: 9

# tax on /money pay transactions
transactiontax:
  flat: 0.0
  rate: 0.0

# balance to start an account with (purely virtual)
startingbalance:
  player: 0
  faction: 0
  town: 0
  nation: 0

# globally (dis)allow use of vault types
usevault:
  container: true
  enderchest: true

# whether money/balance commands show vault and inventory balance separately
balance:
  show-vault: true
  show-inventory: true
jastice commented 8 years ago

Please post configs and logs as code block (I edited yours).

Thanks for trying it out, I will try to reproduce your problems.

Ich spreche uebrigens auch deutsch ;)

Joerg69 commented 8 years ago

Sorry, i am new here! Code block is a text in ... ? What is your favorite Language?

jastice commented 8 years ago

you can make a codeblock with ``` before and after the text block. Also check the link "Styling with Markdown is supported"

Either language is fine, but for the benefit of others reading this English is better.

Joerg69 commented 8 years ago

Thank's for your info! The next post i style correctly!

jastice commented 8 years ago

Okay, I can't reproduce this error. What other plugins do you use, and does this problem appear when you have only Gringotts running?

Joerg69 commented 8 years ago

I have on my Server the following Plugins installed:

I try on the Weekend disable the most of Plugins.

Joerg69 commented 8 years ago

I have over the Weekend my plugins disabled. The last plugin was MultiWorld. The World with my vaults was a second world. I have move my second world to "world" and remove the gringotts.db in the Gringotts-Folder. After the Serverstart i have the Vault-Chests new defined. Now gringotts displays the right balance with both commands (money and moneyadm b ) for all three users. I can also withdraw from the Vaults and deposit to the Vaults. All functions are ok. When i reactivate MultiWorld the Problem is back.

Joerg69 commented 8 years ago

Now i have tested to change Multiworld with Multiverse. The effect is the same. I have also remove my Vaults in the second World and recreate in the First World. I can no deposit in the Vault and i can't display the Vault with the Command "money". With "moneyadm b ..." it works correctly. money pay 1 works also correct, but not money deposit.

jastice commented 8 years ago

Thanks. Please post your multiworld/vers config, and I can try to reproduce it

Joerg69 commented 8 years ago

Here my Multiverse-Core config.yml

multiverse-configuration:
  ==: com.onarandombox.MultiverseCore.MultiverseCoreConfiguration
  enforceaccess: 'false'
  prefixchat: 'true'
  prefixchatformat: '[%world%]%chat%'
  useasyncchat: 'true'
  teleportintercept: 'true'
  firstspawnoverride: 'true'
  displaypermerrors: 'true'
  globaldebug: '0'
  silentstart: 'false'
  messagecooldown: '5000'
  version: '2.9'
  firstspawnworld: world
  teleportcooldown: '1000'
  defaultportalsearch: 'false'
  portalsearchradius: '128'

and here the worlds.yml from Multiverse-Core:

worlds:
  world_the_end:
    ==: MVWorld
    hidden: 'false'
    alias: ''
    color: WHITE
    style: NORMAL
    pvp: 'true'
    scale: '16.0'
    respawnWorld: ''
    allowWeather: 'true'
    difficulty: EASY
    spawning:
      ==: MVSpawnSettings
      animals:
        ==: MVSpawnSubSettings
        spawn: 'true'
        spawnrate: '-1'
        exceptions: []
      monsters:
        ==: MVSpawnSubSettings
        spawn: 'true'
        spawnrate: '-1'
        exceptions: []
    entryfee:
      ==: MVEntryFee
      amount: '0.0'
      currency: '-1'
    hunger: 'true'
    autoHeal: 'true'
    adjustSpawn: 'true'
    portalForm: ALL
    gameMode: SURVIVAL
    keepSpawnInMemory: 'true'
    spawnLocation:
      ==: MVSpawnLocation
      x: 0.0
      y: 68.0
      z: 0.0
      pitch: 0.0
      yaw: 0.0
    autoLoad: 'true'
    bedRespawn: 'true'
    worldBlacklist: []
    environment: THE_END
    seed: '5242114371368074903'
    generator: 'null'
    playerLimit: '-1'
    allowFlight: 'true'
  world:
    ==: MVWorld
    hidden: 'false'
    alias: ''
    color: WHITE
    style: NORMAL
    pvp: 'true'
    scale: '1.0'
    respawnWorld: ''
    allowWeather: 'true'
    difficulty: EASY
    spawning:
      ==: MVSpawnSettings
      animals:
        ==: MVSpawnSubSettings
        spawn: 'true'
        spawnrate: '-1'
        exceptions: []
      monsters:
        ==: MVSpawnSubSettings
        spawn: 'true'
        spawnrate: '-1'
        exceptions: []
    entryfee:
      ==: MVEntryFee
      amount: '0.0'
      currency: '-1'
    hunger: 'true'
    autoHeal: 'true'
    adjustSpawn: 'true'
    portalForm: ALL
    gameMode: SURVIVAL
    keepSpawnInMemory: 'true'
    spawnLocation:
      ==: MVSpawnLocation
      x: 631.0
      y: 63.0
      z: 252.0
      pitch: 0.0
      yaw: 0.0
    autoLoad: 'true'
    bedRespawn: 'true'
    worldBlacklist: []
    environment: NORMAL
    seed: '5242114371368074903'
    generator: 'null'
    playerLimit: '-1'
    allowFlight: 'true'
  world_nether:
    ==: MVWorld
    hidden: 'false'
    alias: ''
    color: WHITE
    style: NORMAL
    pvp: 'true'
    scale: '8.0'
    respawnWorld: ''
    allowWeather: 'true'
    difficulty: EASY
    spawning:
      ==: MVSpawnSettings
      animals:
        ==: MVSpawnSubSettings
        spawn: 'true'
        spawnrate: '-1'
        exceptions: []
      monsters:
        ==: MVSpawnSubSettings
        spawn: 'true'
        spawnrate: '-1'
        exceptions: []
    entryfee:
      ==: MVEntryFee
      amount: '0.0'
      currency: '-1'
    hunger: 'true'
    autoHeal: 'true'
    adjustSpawn: 'true'
    portalForm: ALL
    gameMode: SURVIVAL
    keepSpawnInMemory: 'true'
    spawnLocation:
      ==: MVSpawnLocation
      x: 0.0
      y: 93.0
      z: 0.0
      pitch: 0.0
      yaw: 0.0
    autoLoad: 'true'
    bedRespawn: 'true'
    worldBlacklist: []
    environment: NETHER
    seed: '5242114371368074903'
    generator: 'null'
    playerLimit: '-1'
    allowFlight: 'true'
  mittelalter:
    ==: MVWorld
    hidden: 'false'
    alias: ''
    color: WHITE
    style: NORMAL
    pvp: 'true'
    scale: '1.0'
    respawnWorld: ''
    allowWeather: 'true'
    difficulty: EASY
    spawning:
      ==: MVSpawnSettings
      animals:
        ==: MVSpawnSubSettings
        spawn: 'true'
        spawnrate: '-1'
        exceptions: []
      monsters:
        ==: MVSpawnSubSettings
        spawn: 'true'
        spawnrate: '-1'
        exceptions: []
    entryfee:
      ==: MVEntryFee
      amount: '0.0'
      currency: '-1'
    hunger: 'true'
    autoHeal: 'true'
    adjustSpawn: 'true'
    portalForm: ALL
    gameMode: SURVIVAL
    keepSpawnInMemory: 'true'
    spawnLocation:
      ==: MVSpawnLocation
      x: 663.0
      y: 120.0
      z: 129.0
      pitch: 0.0
      yaw: 0.0
    autoLoad: 'true'
    bedRespawn: 'true'
    worldBlacklist: []
    environment: NORMAL
    seed: '-712714449760912068'
    generator: 'null'
    playerLimit: '-1'
    allowFlight: 'true'

The effect only by the first user after delete Gringotts.db and recreate the Vaults. Both tested Users have op-permissions.

Joerg69 commented 8 years ago

... and here is my Multworld config.yml:

# # options.debug: must the debug output be printed?
# # options.difficulty: what is the server diffeculty?
# # options.locale: what set of lang files must be used, supported: en_US, nl_NL, de_DE, it_IT
# # spawnGroup: used to set withs worlds have what spawn, difficult to use. see official site for details
options:
  debug: false
  difficulty: NORMAL
  usecreativemode: false
  usecreativemodeinv: true
  blockEnderChestInCrea: false
  useEndPortalHandler: false
  useportalhandler: false
  useWorldSpawnHandler: false
  useWorldChatSeperator: false
  craftbukkitHooks: true
worlds:
  world:
    seed: -6035045699349346032
    worldgen: Normal
    options: ''
    difficulty: NORMAL
    autoload: true
  world_nether:
    seed: 5242114371368074903
    worldgen: Nether
    options: ''
    difficulty: EASY
    autoload: true
  world_the_end:
    seed: 5242114371368074903
    worldgen: The_End
    options: ''
    difficulty: EASY
    autoload: true
  world_two:
    seed: 5242114371368074903
    worldgen: Normal
    options: ''
    difficulty: EASY
    autoload: true
jastice commented 8 years ago

Using Multiverse and your config, I still can't reproduce this issue. I could come to see myself on your server. Feel free to drop by on Gitter to coordinate.

Meanwhile, you could try the new Gringotts snapshot, that should fix the error you had before

Joerg69 commented 8 years ago

I have try your new Snapshot. This runs now, but the problem with the money-Command i have still. When you will come of my server, i have a problem. My server stay not by a provider. This is my family-server in my LAN-Network. My DSL has only 384/96 kbps. Is this a problem? My provider switch me on the next Thursday a better connection.

jastice commented 8 years ago

Sorry, I've been away for a while. Either way, the connection is not a problem for a simple visit. Alternatively, it's maybe easier if you zip up the whole server directory with the minimum plugins required for reproducing the bug, upload it somewhere and send me the link.

Joerg69 commented 8 years ago

That's not a problem. I am at the moment very busy. When i have time, i zip my world for you. Is it ok?

jastice commented 8 years ago

Sure, no problem.