Team-Inceptus/Novaconomy

Problems with default economy.

SimpleWayx opened this issue · 2 comments

Bug Type

Console Errors

Minecraft Version

1.19

Description

Noticed a problem in the console when doing /balance figured that it was the API then updated to the latest Nex 2.2.4 API. A problem continue to resurge.

It seems that it cannot recall the string /balanzce when nessesary.

[01:29:18] [Server thread/INFO]: Flamaraid issued server command: /novabal
[01:29:18] [Server thread/WARN]: java.lang.NullPointerException: Cannot invoke "org.bukkit.configuration.ConfigurationSection.getConfigurationSection(String)" because the return value of "org.bukkit.configuration.file.FileConfiguration.getConfigurationSection(String)" is null
[01:29:18] [Server thread/WARN]:        at us.teaminceptus.novaconomy.api.player.NovaPlayer.getBalance(NovaPlayer.java:128)
[01:29:18] [Server thread/WARN]:        at us.teaminceptus.novaconomy.abstraction.CommandWrapper.lambda$getBalancesGUI$15(CommandWrapper.java:2223)
[01:29:18] [Server thread/WARN]:        at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
[01:29:18] [Server thread/WARN]:        at us.teaminceptus.novaconomy.abstraction.CommandWrapper.getBalancesGUI(CommandWrapper.java:2219)
[01:29:18] [Server thread/WARN]:        at us.teaminceptus.novaconomy.abstraction.CommandWrapper.balance(CommandWrapper.java:170)
[01:29:18] [Server thread/WARN]:        at us.teaminceptus.novaconomy.CommandWrapperV2.balance(CommandWrapperV2.java:129)

Figured out to update EssentialsX, Done it.
Same problem occured.

[01:38:56] [Server thread/INFO]: Flamaraid issued server command: /balance
[01:38:56] [Server thread/WARN]: java.lang.NullPointerException: Cannot invoke "org.bukkit.configuration.ConfigurationSection.getConfigurationSection(String)" because the return value of "org.bukkit.configuration.file.FileConfiguration.getConfigurationSection(String)" is null
[01:38:56] [Server thread/WARN]:        at us.teaminceptus.novaconomy.api.player.NovaPlayer.getBalance(NovaPlayer.java:128)
[01:38:56] [Server thread/WARN]:        at us.teaminceptus.novaconomy.abstraction.CommandWrapper.lambda$getBalancesGUI$15(CommandWrapper.java:2223)
[01:38:56] [Server thread/WARN]:        at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
[01:38:56] [Server thread/WARN]:        at us.teaminceptus.novaconomy.abstraction.CommandWrapper.getBalancesGUI(CommandWrapper.java:2219)
[01:38:56] [Server thread/WARN]:        at us.teaminceptus.novaconomy.abstraction.CommandWrapper.balance(CommandWrapper.java:170)
[01:38:56] [Server thread/WARN]:        at us.teaminceptus.novaconomy.CommandWrapperV2.balance(CommandWrapperV2.java:129)

Thinking it was the problem of Paper server, Decided to run Spigot server.

Same problem. Then Decided to create currencies in order to find the problem and noticed a problem as well. When you create a currency it becomes default.

From the default "Money" and then moving to create a new one "Moons" the lastest becomes default.

Using the command /vault-info I was able to find this problem.

Steps to Reproduce

Update NexAPI -

  1. Create Economy
  2. Use ARGs (Not all args show up making it difficult for a user to create correctly an economy)
  3. Use the command /balance or /novbal
  4. In game shows an error has occured / Console shows the following log:
[01:49:38] [Server thread/WARN]:        at us.teaminceptus.novaconomy.api.player.NovaPlayer.getBalance(NovaPlayer.java:128)
[01:49:38] [Server thread/WARN]:        at us.teaminceptus.novaconomy.abstraction.CommandWrapper.lambda$getBalancesGUI$15(CommandWrapper.java:2223)
[01:49:38] [Server thread/WARN]:        at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
[01:49:38] [Server thread/WARN]:        at us.teaminceptus.novaconomy.abstraction.CommandWrapper.getBalancesGUI(CommandWrapper.java:2219)
[01:49:38] [Server thread/WARN]:        at us.teaminceptus.novaconomy.abstraction.CommandWrapper.balance(CommandWrapper.java:170)
[01:49:38] [Server thread/WARN]:        at us.teaminceptus.novaconomy.CommandWrapperV2.balance(CommandWrapperV2.java:129)
  1. Doing /vault-info shows latest economy as default
  2. Create new economy
  3. Doing /vault-info changes you final economy created as default.
`[01:52:11] [Server thread/INFO]: [Vault] Vault v1.7.3-b131 Information
[01:52:11] [Server thread/INFO]: [Vault] Economy: Full-Moons [Full-Moons, Half-Moons, Money, EssentialsX Economy, Essentials Economy]
[01:52:11] [Server thread/INFO]: [Vault] Permission: LuckPerms [LuckPerms, SuperPerms]
[01:52:11] [Server thread/INFO]: [Vault] Chat: LuckPerms [LuckPerms]`

Expected Behavior

Create economy and see it on the balance GUI.

Actual Behavior

It triggers an error in the server it self as latest created economy it shown as default, And not Balance GUI is working properly.

Additional Info

I am using an Paper / Spigot server bats.

Both have the same results. I tried everything to see if it wasnt the plugin it self but other economy plugins such as Gamepoints had some similar results (Nova and Gamepoints share NexEngine)

Thus making me believe that it was the NexEngine 2.2.4 problem as I was using a deprecated version. I had to update them. (Unfriendly for untrained server owners as you have to seek and then implement) finally.

The problem kept showing up.
Both in Paper and /Spigot. NexEngine show (can only be used by spigot.org) Then used the spigot server bat. Still with the same result.

Making me believe that is the NexEngine API that has the problem.

Please help users when they do /novaeconomy make /create and GUI as ARGs do not always show and one can not fully surely know how to handdle them.

I can confirm this happens, and will quickly work on a fix.

Fixed and tested, will release with other features this Friday.