Git Product home page Git Product logo

economyplus's People

Contributors

devwhitefox avatar gabrielecabrini avatar jakepronger avatar oddstr13 avatar rumsfield avatar sandro642 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

economyplus's Issues

EconomyPlus 4.5 newest update

[14:34:39 ERROR]: Error occurred while enabling EconomyPlus v4.5 (Is it up to date?)
java.lang.NumberFormatException: multiple points
at jdk.internal.math.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1914) ~[?:?]
at jdk.internal.math.FloatingDecimal.parseDouble(FloatingDecimal.java:110) ~[?:?]
at java.lang.Double.parseDouble(Double.java:651) ~[?:?]
at me.itswagpvp.economyplus.EconomyPlus.onEnable(EconomyPlus.java:119) ~[EconomyPlus.jar:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[paper-api-1.19.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:370) ~[paper-api-1.19.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:542) ~[paper-api-1.19.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_19_R1.CraftServer.enablePlugin(CraftServer.java:565) ~[paper-1.19.2.jar:git-Paper-232]
at org.bukkit.craftbukkit.v1_19_R1.CraftServer.enablePlugins(CraftServer.java:479) ~[paper-1.19.2.jar:git-Paper-232]
at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:636) ~[paper-1.19.2.jar:git-Paper-232]
at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:422) ~[paper-1.19.2.jar:git-Paper-232]
at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:306) ~[paper-1.19.2.jar:git-Paper-232]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1100) ~[paper-1.19.2.jar:git-Paper-232]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:305) ~[paper-1.19.2.jar:git-Paper-232]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
[14:34:39 INFO]: [EconomyPlus] Disabling EconomyPlus v4.5
[14:34:39 INFO]: +------------------------------------+
[14:34:39 INFO]: EconomyPlus
[14:34:39 INFO]: Disabling
[14:34:39 INFO]:
[14:34:39 INFO]: -> Stopping threads...
[14:34:39 INFO]: -> Closing database connection
[14:34:39 INFO]: +------------------------------------+

[BUG]

Describe the bug
Block other Vault-compatible economy plugins, such as "The New Economy." (I don't know exactly what to say.)

To Reproduce
Steps to reproduce the behavior:

  1. Remove the 'EconomyPlus' plug-in from the plug-in file and insert another Vault-compatible economy plug-in.
  2. Check if it works well. (In my case, I checked with "player's balance", an expression that outputs 'Vault money' using skript.)
  3. Put the 'EconomyPlus' plugin into the plugin file and reload or restart the server.
  4. Check whether the two plug-ins work together or link to Vault.

Expected behavior
Only EconomyPlus is linked to Vault money and other economy plugins are not linked.

Screenshots
20211016_133127
20211016_133545

[BUG] EconomyResponse.ResponseType.SUCCESS is returned regardless of actual result.

Describe the bug
When a plugin tries to deposit to a player's account in quick succession some of the transactions fail but EconomyPlus still returns an EconomyResponse.ResponseType.SUCCESS object.

To Reproduce
Steps to reproduce the behavior:

  1. Install SignShop and create an [iSell] shop for one item for $1
  2. Give yourself 100 of those items
  3. Reset your balance to 0
  4. Hold RMB on sign to sell those items quickly
  5. After all of those items are gone check your balance you should see $100 but it will likely be around $60

Expected behavior
When an economy method is called that the economy provider would make sure the transaction is successful before returning that it was.

Screenshots
none

Additional context
The method call in question:
response = Vault.getEconomy().depositPlayer(getOfflinePlayer(), amount);

Other economy plugins that I have tested do not have this problem. The problem exists with all of the EconomyPlus storage types but with different degrees of failure.

[BUG] SQL error on bootup

Describe the bug
When I bootup the server it shows the following SQL error message

[21:17:00] [Server thread/INFO]: [EconomyPlus] Enabling EconomyPlus v2.3
[21:17:00] [Server thread/INFO]: +------------------------------------+
[21:17:00] [Server thread/INFO]:              EconomyPlus
[21:17:00] [Server thread/INFO]:               Enabling
[21:17:00] [Server thread/INFO]: 
[21:17:00] [Server thread/INFO]: -> Loading core!
[21:17:00] [Server thread/WARN]: org.sqlite.SQLiteException: [SQLITE_ERROR] SQL error or missing database (duplicate column name: bank)
[21:17:00] [Server thread/WARN]: 	at org.sqlite.core.DB.newSQLException(DB.java:1012)
[21:17:00] [Server thread/WARN]: 	at org.sqlite.core.DB.newSQLException(DB.java:1024)
[21:17:00] [Server thread/WARN]: 	at org.sqlite.core.DB.throwex(DB.java:989)
[21:17:00] [Server thread/WARN]: 	at org.sqlite.core.NativeDB.prepare_utf8(Native Method)
[21:17:00] [Server thread/WARN]: 	at org.sqlite.core.NativeDB.prepare(NativeDB.java:134)
[21:17:00] [Server thread/WARN]: 	at org.sqlite.core.DB.prepare(DB.java:257)
[21:17:00] [Server thread/WARN]: 	at org.sqlite.core.CorePreparedStatement.<init>(CorePreparedStatement.java:45)
[21:17:00] [Server thread/WARN]: 	at org.sqlite.jdbc3.JDBC3PreparedStatement.<init>(JDBC3PreparedStatement.java:30)
[21:17:00] [Server thread/WARN]: 	at org.sqlite.jdbc4.JDBC4PreparedStatement.<init>(JDBC4PreparedStatement.java:25)
[21:17:00] [Server thread/WARN]: 	at org.sqlite.jdbc4.JDBC4Connection.prepareStatement(JDBC4Connection.java:35)
[21:17:00] [Server thread/WARN]: 	at org.sqlite.jdbc3.JDBC3Connection.prepareStatement(JDBC3Connection.java:241)
[21:17:00] [Server thread/WARN]: 	at org.sqlite.jdbc3.JDBC3Connection.prepareStatement(JDBC3Connection.java:205)
[21:17:00] [Server thread/WARN]: 	at me.itswagpvp.economyplus.storage.sqlite.Database.updateTable(Database.java:51)
[21:17:00] [Server thread/WARN]: 	at me.itswagpvp.economyplus.storage.sqlite.Database.initialize(Database.java:37)
[21:17:00] [Server thread/WARN]: 	at me.itswagpvp.economyplus.storage.sqlite.SQLite.load(SQLite.java:64)
[21:17:00] [Server thread/WARN]: 	at me.itswagpvp.economyplus.EconomyPlus.loadDatabase(EconomyPlus.java:185)
[21:17:00] [Server thread/WARN]: 	at me.itswagpvp.economyplus.EconomyPlus.onEnable(EconomyPlus.java:91)
[21:17:00] [Server thread/WARN]: 	at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263)
[21:17:00] [Server thread/WARN]: 	at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:342)
[21:17:00] [Server thread/WARN]: 	at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:480)
[21:17:00] [Server thread/WARN]: 	at org.bukkit.craftbukkit.v1_17_R1.CraftServer.enablePlugin(CraftServer.java:505)
[21:17:00] [Server thread/WARN]: 	at org.bukkit.craftbukkit.v1_17_R1.CraftServer.enablePlugins(CraftServer.java:419)
[21:17:00] [Server thread/WARN]: 	at net.minecraft.server.MinecraftServer.loadWorld(MinecraftServer.java:604)
[21:17:00] [Server thread/WARN]: 	at net.minecraft.server.dedicated.DedicatedServer.init(DedicatedServer.java:266)
[21:17:00] [Server thread/WARN]: 	at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:995)
[21:17:00] [Server thread/WARN]: 	at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:303)
[21:17:00] [Server thread/WARN]: 	at java.base/java.lang.Thread.run(Thread.java:831)
[21:17:00] [Server thread/INFO]:    - Database: Loaded (SQLite)
[21:17:00] [Server thread/INFO]:    - Vault: Hooked
[21:17:00] [Server thread/INFO]:    - Events: Loaded
[21:17:00] [Server thread/INFO]:    - Commands: Loaded
[21:17:00] [Server thread/INFO]: 
[21:17:00] [Server thread/INFO]: -> Loading hooks!
[21:17:00] [Server thread/INFO]:    - bStats: Loaded
[21:17:00] [Server thread/INFO]:    - HolographicDisplays: Found
[21:17:00] [Server thread/INFO]: 
[21:17:00] [Server thread/INFO]: -> Loading placeholders:
[21:17:00] [Server thread/INFO]:    - MVdWPlaceholderAPI: Not found!
[21:17:00] [Server thread/INFO]: [PlaceholderAPI] Successfully registered expansion: economyplus
[21:17:00] [Server thread/INFO]:    - PlaceholderAPI: Done!
[21:17:00] [Server thread/INFO]: 
[21:17:00] [Server thread/INFO]: +---------------[ 20ms ]-------------+

To Reproduce
Steps to reproduce the behavior:

  1. Install the plugin
  2. Leave config like it is (H2 as database)
  3. Start Server
  4. Stop Server
  5. Start Server again

[BUG] Vault API method getBalance(player) always returns 0

Describe the bug
When another plugin calls Vault API method getBalance, the return value is always 0.

To Reproduce
Steps to reproduce the behavior:

  1. Install EconomyPlus v2.8, Vault, and a plugin that calls Economy#getBalance
  2. Give yourself money with "/eco (name) give 100"
  3. Check your balance with "/bal" to see the money in the player account
  4. Use another plugin to call Economy#getBalance and observe a return value of 0

Expected behavior
The Economy#getBalance should return the player account balance as returned by the "/bal" command.

[BUG]

Describe the bug
The money disappears when you make a deposit to the bank for the first time.

To Reproduce
Steps to reproduce the behavior:

  1. Reinitialize the plug-in.
  2. Deposit the money.

Expected behavior
Money disappears.
After '/bank admin set [player] [count]', it works normally.

Screenshots
20211016_130426

java.lang.IllegalArgumentException: Invalid UUID string: cond_b

java.lang.IllegalArgumentException: Invalid UUID string: cond_b
at java.util.UUID.fromString1(UUID.java:280) ~[?:?]
at java.util.UUID.fromString(UUID.java:258) ~[?:?]
at me.itswagpvp.economyplus.misc.BalTopManager.loadFromDatabase(BalTopManager.java:27) ~[EconomyPlus.jar:?]
at me.itswagpvp.economyplus.misc.BalTopManager.(BalTopManager.java:18) ~[EconomyPlus.jar:?]
at me.itswagpvp.economyplus.hooks.holograms.HolographicDisplays.refreshHologram(HolographicDisplays.java:82) ~[EconomyPlus.jar:?]
at me.itswagpvp.economyplus.EconomyPlus.lambda$loadHolograms$1(EconomyPlus.java:310) ~[EconomyPlus.jar:?]
at org.bukkit.craftbukkit.v1_18_R1.scheduler.CraftTask.run(CraftTask.java:101) ~[purpur-1.18.1.jar:git-Purpur-1560]
at org.bukkit.craftbukkit.v1_18_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:483) ~[purpur-1.18.1.jar:git-Purpur-1560]
at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1578) ~[purpur-1.18.1.jar:git-Purpur-1560]
at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:519) ~[purpur-1.18.1.jar:git-Purpur-1560]
at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1501) ~[purpur-1.18.1.jar:git-Purpur-1560]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1285) ~[purpur-1.18.1.jar:git-Purpur-1560]
at net.minecraft.server.MinecraftServer.lambda$spin$1(MinecraftServer.java:322) ~[purpur-1.18.1.jar:git-Purpur-1560]
at java.lang.Thread.run(Thread.java:833) ~[?:?]

cond_b is my nickname.... can i fix it?

[BUG]

Describe the bug
The plugin is still displaying decimals "0.00" even after disabling decimals.
When pattern is enabled it causes error.

Just install the latest plugin with only vault and you'll see it's decimals. Any fix?

[BUG] Hooking into Vault too late

Disclaimer: This concerns a bug with a combination of two plugins and I'm not sure which can solve the problem.

Describe the bug
Other plugins may check for a Vault economy plugin before EconomyPlus is enabled.

Seen behavior

  1. Vault is enabled.
  2. EconomyShopGUI is enabled, finds no economy plugin and is disabled.
  3. EconomyPlus is enabled and works fine, but too late to be used by EconomyShopGUI.

To Reproduce
Steps to reproduce the behavior:

  1. Install EconomyPlus and EconomyShopGUI.
  2. Run the server.

Expected behavior
EconomyPlus should load before EconomyShopGUI.

Logs
[01:58:50 INFO]: Starting minecraft server version 1.19.2
[01:58:50 INFO]: Loading properties
[01:58:50 INFO]: This server is running Paper version git-Paper-237 (MC: 1.19.2) (Implementing API version 1.19.2-R0.1-SNAPSHOT) (Git: 25cd3ee)
[01:58:50 INFO]: Using 4 threads for Netty based IO
[01:58:50 INFO]: Server Ping Player Sample Count: 12
[01:58:50 INFO]: [ChunkTaskScheduler] Chunk system is using 1 I/O threads, 4 worker threads, and gen parallelism of 4 threads
[01:58:50 INFO]: Default game type: SURVIVAL
[01:58:50 INFO]: Generating keypair
[01:58:50 INFO]: Starting Minecraft server on *:25565
[01:58:50 INFO]: Using default channel type
[01:58:50 INFO]: Paper: Using Java compression from Velocity.
[01:58:50 INFO]: Paper: Using Java cipher from Velocity.
[01:58:51 INFO]: [LuckPerms] Loading LuckPerms v5.4.52
[01:58:51 INFO]: [DefaultGameRules] Loading DefaultGameRules v1.0
[01:58:51 INFO]: [Vault] Loading Vault v1.7.3-b131
[01:58:51 INFO]: [PlaceholderAPI] Loading PlaceholderAPI v2.11.2
[01:58:51 INFO]: [EconomyShopGUI] Loading EconomyShopGUI v5.0.0-b.3
[01:58:51 INFO]: [EconomyPlus] Loading EconomyPlus v4.5
[01:58:51 INFO]: [TreeFeller] Loading TreeFeller v1.20.1
[01:58:51 INFO]: Server permissions file permissions.yml is empty, ignoring it
[01:58:51 INFO]: [LuckPerms] Enabling LuckPerms v5.4.52
[01:58:52 INFO]: __
[01:58:52 INFO]: | |) LuckPerms v5.4.52
[01:58:52 INFO]: |
_ | Running on Bukkit - Paper
[01:58:52 INFO]:
[01:58:52 INFO]: [LuckPerms] Loading configuration...
[01:58:52 INFO]: [LuckPerms] Loading storage provider... [H2]
[01:58:52 INFO]: [LuckPerms] Loading internal permission managers...
[01:58:52 INFO]: [LuckPerms] Performing initial data load...
[01:58:53 INFO]: [LuckPerms] Successfully enabled. (took 1344ms)
[01:58:53 INFO]: [Vault] Enabling Vault v1.7.3-b131
[01:58:53 INFO]: [Vault] [Permission] SuperPermissions loaded as backup permission system.
[01:58:53 INFO]: [Vault] Enabled Version 1.7.3-b131
[01:58:53 INFO]: [LuckPerms] Registered Vault permission & chat hook.
[01:58:53 INFO]: Preparing level "world"
[01:58:54 INFO]: Preparing start region for dimension minecraft:overworld
[01:58:54 INFO]: Time elapsed: 121 ms
[01:58:54 INFO]: Preparing start region for dimension minecraft:the_nether
[01:58:54 INFO]: Time elapsed: 23 ms
[01:58:54 INFO]: Preparing start region for dimension minecraft:the_end
[01:58:54 INFO]: Time elapsed: 16 ms
[01:58:54 INFO]: [DefaultGameRules] Enabling DefaultGameRules v1.0
[01:58:54 INFO]: [PlaceholderAPI] Enabling PlaceholderAPI v2.11.2
[01:58:54 INFO]: [PlaceholderAPI] Fetching available expansion information...
[01:58:54 INFO]: [EconomyShopGUI] Enabling EconomyShopGUI v5.0.0-b.3
[01:58:54 INFO]: [EconomyShopGUI] Using lang-en.yml as language file.
[01:58:54 INFO]: [EconomyShopGUI] Shops.yml has been found!
[01:58:54 INFO]: [EconomyShopGUI] Sections.yml has been found!
[01:58:54 WARN]: [EconomyShopGUI] Disabled due to no economy plugin was found, please install a plugin such as EssentialsX.
[01:58:54 INFO]: [EconomyShopGUI] Disabling EconomyShopGUI v5.0.0-b.3
[01:58:54 INFO]: [EconomyPlus] Enabling EconomyPlus v4.5
[01:58:54 INFO]: +------------------------------------+
[01:58:54 INFO]: EconomyPlus
[01:58:54 INFO]: Enabling
[01:58:54 INFO]:
[01:58:54 INFO]: -> Loading core:
[01:58:54 INFO]: - Storage-Mode: UUID
[01:58:54 INFO]: - Database: Loaded (YAML)
[01:58:54 INFO]: - Caching accounts...
[01:58:54 INFO]: - Vault: Hooked
[01:58:54 INFO]: - Commands: Loaded
[01:58:54 INFO]: - Messages: Loaded EN.yml file!
[01:58:54 INFO]:
[01:58:54 INFO]: -> Loading hooks:
[01:58:54 INFO]: [PlaceholderAPI] Successfully registered expansion: economyplus [4.5]
[01:58:54 INFO]: - PlaceholderAPI: Done!
[01:58:54 INFO]:
[01:58:55 INFO]: +---------------[ 571ms ]-------------+
[01:58:55 INFO]: [EconomyPlus] You are up to date! (v4.5)

[BUG] me.itswagpvp.economyplus.misc.Logger.plugin is reported as null

Describe the bug
me.itswagpvp.economyplus.misc.Logger.plugin is reported as null, causing a cascade of "too many open files" errors

Expected behavior
I expected the plugin to correctly log to the terminal

Screenshots
java.lang.NullPointerException: Cannot invoke "me.itswagpvp.economyplus.EconomyPlus.getLogger()" because "me.itswagpvp.economyplus.misc.Logger.plugin" is null
at me.itswagpvp.economyplus.misc.Logger.getLogger(Logger.java:13) ~[EconomyPlus.jar:?]
at me.itswagpvp.economyplus.dbStorage.sqlite.Database.lambda$setTokens$1(Database.java:108) ~[EconomyPlus.jar:?]
at org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftTask.run(CraftTask.java:101) ~[patched_1.17.1.jar:git-Paper-388]
at org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[patched_1.17.1.jar:git-Paper-388]
at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[patched_1.17.1.jar:git-Paper-388]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) ~[?:?]
at java.lang.Thread.run(Thread.java:831) ~[?:?]
2021-12-03-1.log
.

[FEATURE]

Is your feature request related to a problem? Please describe.
When depositing or withdrawing money from a bank, it recognizes up to three decimal places and differs from the number of times it is output as "/bank" or "% economyplus_bank%".

Describe the solution you'd like
Please allow only two decimal places to be recognized when depositing or withdrawing money.
(It may be difficult, but if possible, I hope you round up to two decimal places to be recognized.)

Additional context
EX) 500 -> 500
EX) 500.423 -> 500.42
EX) 500.425 -> 500.43

Extra permissions

Describe the solution you'd like
Permissions for all commands

Describe alternatives you've considered
Permissions for /bank withdraw/deposit

Additional context
Our server is set up like an mmo where players need to go to certain locations to access banks, shops, etc.
We've been looking for a replacement eco plugin and this has been the closest fit, if not for the one command missing perms

[BUG] NumberFormatException: For input string: "0,00"

Describe the bug
When creating a hologram to create a top list to show players' money top list with the command /economyplus hologram, an exception happens and the feature does not work.

Exception description:

[20:17:17] [Server thread/ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing command 'economyplus' in plugin EconomyPlus v4.1
	at org.bukkit.command.PluginCommand.execute(PluginCommand.java:47) ~[purpur-api-1.18.2-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:172) ~[purpur-api-1.18.2-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.craftbukkit.v1_18_R2.CraftServer.dispatchCommand(CraftServer.java:906) ~[purpur-1.18.2.jar:git-Purpur-1612]
	at net.minecraft.server.network.ServerGamePacketListenerImpl.handleCommand(ServerGamePacketListenerImpl.java:2389) ~[?:?]
	at net.minecraft.server.network.ServerGamePacketListenerImpl.handleChat(ServerGamePacketListenerImpl.java:2200) ~[?:?]
	at net.minecraft.server.network.ServerGamePacketListenerImpl.handleChat(ServerGamePacketListenerImpl.java:2181) ~[?:?]
	at net.minecraft.network.protocol.game.ServerboundChatPacket.handle(ServerboundChatPacket.java:46) ~[?:?]
	at net.minecraft.network.protocol.game.ServerboundChatPacket.a(ServerboundChatPacket.java:6) ~[?:?]
	at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$1(PacketUtils.java:51) ~[?:?]
	at net.minecraft.server.TickTask.run(TickTask.java:18) ~[purpur-1.18.2.jar:git-Purpur-1612]
	at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153) ~[?:?]
	at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:23) ~[?:?]
	at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1426) ~[purpur-1.18.2.jar:git-Purpur-1612]
	at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:188) ~[purpur-1.18.2.jar:git-Purpur-1612]
	at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?]
	at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1403) ~[purpur-1.18.2.jar:git-Purpur-1612]
	at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1396) ~[purpur-1.18.2.jar:git-Purpur-1612]
	at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?]
	at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1374) ~[purpur-1.18.2.jar:git-Purpur-1612]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1256) ~[purpur-1.18.2.jar:git-Purpur-1612]
	at net.minecraft.server.MinecraftServer.lambda$spin$1(MinecraftServer.java:320) ~[purpur-1.18.2.jar:git-Purpur-1612]
	at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.lang.NumberFormatException: For input string: "0,00"
	at jdk.internal.math.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2054) ~[?:?]
	at jdk.internal.math.FloatingDecimal.parseDouble(FloatingDecimal.java:110) ~[?:?]
	at java.lang.Double.parseDouble(Double.java:651) ~[?:?]
	at me.itswagpvp.economyplus.misc.Utils.format(Utils.java:109) ~[EconomyPlus.jar:?]
	at me.itswagpvp.economyplus.hooks.holograms.HolographicDisplays.createHologram(HolographicDisplays.java:59) ~[EconomyPlus.jar:?]
	at me.itswagpvp.economyplus.commands.Main.onCommand(Main.java:120) ~[EconomyPlus.jar:?]
	at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[purpur-api-1.18.2-R0.1-SNAPSHOT.jar:?]
	... 21 more

4.6 Placeholder api hook broken

Describe the bug
EP 4.6 no longer finds the placeholderapi.jar

To Reproduce
Steps to reproduce the behavior:

  1. add EP 4.6
  2. add PAPI
  3. start server
  4. See error

Expected behavior
papi expansion loads correctly

Screenshots
[16:00:27 INFO]: [EconomyPlus] Enabling EconomyPlus v4.6
[16:00:27 INFO]: +------------------------------------+
[16:00:27 INFO]: EconomyPlus
[16:00:27 INFO]: Enabled v4.6
[16:00:27 INFO]:
[16:00:27 INFO]: -> Loading core:
[16:00:27 INFO]: - Storage-Mode: UUID
[16:00:28 INFO]: - Database: Loaded (MySQL)
[16:00:28 INFO]: - Caching accounts...
[16:00:28 INFO]: - Vault: Hooked
[16:00:28 INFO]: - Commands: Loaded
[16:00:28 INFO]:
[16:00:28 INFO]: -> Loading hooks:
[16:00:28 INFO]: - HolographicDisplays: Can't find the jar!
[16:00:28 INFO]: - PlaceholderAPI: Not found!
[16:00:28 INFO]:
[16:00:28 INFO]: +---------------[ 996ms ]-------------+
[16:00:28 INFO]: [EconomyPlus] You are up to date! (v4.6)
[16:00:28 INFO]: Preparing level "world"
[16:00:29 INFO]: Preparing start region for dimension minecraft:overworld
[16:00:29 INFO]: Time elapsed: 82 ms
[16:00:29 INFO]: Preparing start region for dimension minecraft:the_nether
[16:00:29 INFO]: Time elapsed: 22 ms
[16:00:29 INFO]: Preparing start region for dimension minecraft:the_end
[16:00:29 INFO]: Time elapsed: 15 ms
[16:00:29 INFO]: [PlaceholderAPI] Enabling PlaceholderAPI v2.11.2
[16:00:29 INFO]: [PlaceholderAPI] Fetching available expansion information...

Able to send NaN money

Describe the bug
No check to see if value is NaN in Pay.java (this works for Infinity or NegativeInfinity too)
Could be an issue in the future

To Reproduce
Steps to reproduce the behavior:

  1. Do /pay NaN
  2. Doesn't detect that the input is invalid, and says that you don't have enough money

Expected behavior
It should detect that it detects that NaN and Infinity aren't valid inputs, but it doesn't

Screenshots
Not applicable

Additional context

        if(Double.isNaN(money) || Double.isInfinite(money)) {
            p.sendMessage(plugin.getMessage("InvalidArgs.Pay"));
            Utils.playErrorSound(p);
            return true;
        }

can be fixed with the above code

Use-Permissions option does not work.

Describe the bug
Use-Permissions option in config does not do anything.

To Reproduce
Steps to reproduce the behavior:
Set Use-Permissions to false.
Can't use default commands.

Expected behavior
No need to use permissions on default commands if Use-Permissions is set to false.

[BUG] Internal error at placeholder messages

Describe the bug
Every command that sends a message with a placeholder (like %money%) it produces an internal error. The messages without those work just fine (for example the interest receiving message or the message at /economyplus reload)

I tried it with and without PlaceholderAPI installed on the server.

[BUG] Datra inconsistency Using /bank

Describe the bug
A clear and concise description of what the bug is.

Allowing players to use /bank causes money to be duplicated.

To Reproduce
Steps to reproduce the behavior:

  1. Deposit any non 10 multiple number into the bank
  2. Check player Balance, money did not quet retrieved from his balance but money was added intro bank
  3. Withdraw money from player, player has know 2x his original amount of moneys.

Expected behavior
Money deposited into the bank should decrease accordingly player's balance.

[BUG] Spigot Download Not Working

Describe the bug
The download link for the plugin on spigot is broken.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the Spigot Page and attempt to download the latest version.

Expected behavior
A download should occur, but doesn't.

Screenshots
None needed.

Additional context
None needed.

[FEATURE] UUID support

Currently, EconomyPlus stores data by player name, instead of player UUID. This is a problem, because if players change their name (as happens quite frequently) they lose their balance.

So, feature request: UUID support in the database.

[BUG]

Issue with older plugins saying config is out of date when its comparing the config version with the latest version on github rather than the current version the plugin is on. I can fix this later I need a break.

[BUG] Economy provider returning incorrect balance if the player name is provided.

Using the following code to check a player's balance while also having Vault in the server:

Player p;

RegisteredServiceProvider<Economy> rsp = Bukkit.getServer().getServicesManager().getRegistration(Economy.class);
if (rsp == null) {
	return false;
}
econ = rsp.getProvider();


double currentMoney = econ.getBalance(p.getName());

It seems to be returning incorrect values even if the player has money in his wallet.

[BUG]

Describe the bug
WARN spam in console

Expected behavior
[12:48:45] [Craft Scheduler Thread - 6 - PlaceholderAPI/WARN]: [PlaceholderAPI] Plugin PlaceholderAPI v2.11.1 generated an exception while executing task 709
java.lang.NullPointerException: Cannot invoke "java.lang.Double.doubleValue()" because the return value of "java.util.concurrent.ConcurrentHashMap.get(Object)" is null
at me.itswagpvp.economyplus.vault.VEconomy.getBalance(VEconomy.java:82) ~[EconomyPlus.jar:?]
at me.itswagpvp.economyplus.vault.VEconomy.getBalance(VEconomy.java:88) ~[EconomyPlus.jar:?]
at com.extendedclip.papi.expansion.vault.VaultEcoHook.getBalance(VaultEcoHook.java:223) ~[?:?]
at com.extendedclip.papi.expansion.vault.BalTopTask.run(BalTopTask.java:52) ~[?:?]
at org.bukkit.craftbukkit.v1_18_R1.scheduler.CraftTask.run(CraftTask.java:101) ~[paper-1.18.1.jar:git-Paper-176]
at org.bukkit.craftbukkit.v1_18_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[paper-1.18.1.jar:git-Paper-176]
at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[paper-1.18.1.jar:git-Paper-176]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
at java.lang.Thread.run(Thread.java:833) ~[?:?]

[BUG] baltop

[22:52:41] [Server thread/INFO]: rkfsociety issued server command: /baltop
[22:52:41] [Craft Scheduler Thread - 58 - EconomyPlus/WARN]: [EconomyPlus] Plugin EconomyPlus v4.9 generated an exception while executing task 78878
java.lang.IllegalArgumentException: Invalid UUID string: rkfsociety
at java.util.UUID.fromString1(UUID.java:280) ~[?:?]
at java.util.UUID.fromString(UUID.java:258) ~[?:?]
at me.itswagpvp.economyplus.misc.BalTopManager.loadFromDatabase(BalTopManager.java:29) ~[EconomyPlus.jar:?]
at me.itswagpvp.economyplus.misc.BalTopManager.(BalTopManager.java:20) ~[EconomyPlus.jar:?]
at me.itswagpvp.economyplus.commands.BalTop.lambda$onCommand$0(BalTop.java:30) ~[EconomyPlus.jar:?]
at org.bukkit.craftbukkit.v1_19_R2.scheduler.CraftTask.run(CraftTask.java:101) ~[paper-1.19.3.jar:git-Paper-379]
at org.bukkit.craftbukkit.v1_19_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[paper-1.19.3.jar:git-Paper-379]
at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[paper-1.19.3.jar:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
at java.lang.Thread.run(Thread.java:1589) ~[?:?]

[Bug] Vault API EconomyResponse returns old balance for withdraws and deposits

Other plugins which use EconomyPlus as an economy provider can register it as an economy provider and use Vault API methods. Calling withdrawPlayer(org.bukkit.OfflinePlayer player, double amount) returns an EconomyResponse object, which includes a balance field that's described as "New balance of account"

The current implementation of withdrawPlayer() in EconomyPlus returns the old balance of the player, before the account balance was modified. To match Vault API expected behavior, balance modifier methods should return the new amount.

4.6 Interest can not be disabled

Describe the bug
Config option for interest has no effect

To Reproduce
Steps to reproduce the behavior:

  1. set interest to false
  2. start server
  3. See error

Expected behavior
NO interest occurs

[BUG] baltop very slow

Describe the bug
Running baltop is very server-intensive. Several players running it at once tanks the server for quite a while CPU-usage wise.

To Reproduce
Run baltop (edit: with a large database, large being 8k+). Better get, get like 8 people to run it at once.

Expected behavior
Instant response.

I don't understand why baltop takes so long. An SQL query like "select * from table order by balance desc limit 10" should be literally milliseconds. :/

[BUG] EssentialsX Support?!

Describe the bug
I have EssentialsX installed, then I installed EconomyPlus. For some reason EssentialsX zeroed the money from everybody, and everytime that a player got some money it got zeroed after a while.

To Reproduce
Steps to reproduce the behavior:

  1. Install EssentialsX
  2. Set money to some players other than 0
  3. Install EconomyPlus with initial balance
  4. Give money to a player using /eco command

Expected behavior
The money will return to 0 after the player gets the money

[BUG] Huge lag & error on player join

Describe the bug
Using MySQL on 1.18.2, when a player joins, the server TPS goes down to 5 for a couple of seconds and this gets thrown in the console

[09:52:34 INFO]: UUID of player Slenk is 
[09:52:44 ERROR]: --- DO NOT REPORT THIS TO PURPUR - THIS IS NOT A BUG OR A CRASH  - git-Purpur-1632 (MC: 1.18.2) ---
[09:52:44 ERROR]: The server has not responded for 10 seconds! Creating thread dump
[09:52:44 ERROR]: ------------------------------
[09:52:44 ERROR]: Server thread dump (Look for plugins here before reporting to Purpur!):
[09:52:44 ERROR]: Ticking entity: minecraft:player, entity class: net.minecraft.server.level.EntityPlayer
[09:52:44 ERROR]: Entity status: removed: false, valid: true, alive: true, is passenger: false
[09:52:44 ERROR]: Entity UUID: 3141c9a9-cf47-3924-a61e-75acdbc83e8e
[09:52:44 ERROR]: Position: world: 'spawn' at location (0.5, 79.0, 0.5)
[09:52:44 ERROR]: Velocity: (0.0, 0.0, 0.0) (in blocks per tick)
[09:52:44 ERROR]: Entity AABB: AABB[0.19999998807907104, 79.0, 0.19999998807907104] -> [0.800000011920929, 80.79999995231628, 0.800000011920929]
[09:52:44 ERROR]: Total packets processed on the main thread for all players: 81317
[09:52:44 ERROR]: ------------------------------
[09:52:44 ERROR]: Current Thread: Server thread
[09:52:44 ERROR]:       PID: 26 | Suspended: false | Native: false | State: WAITING
[09:52:44 ERROR]:       Stack:
[09:52:44 ERROR]:               [email protected]/jdk.internal.misc.Unsafe.park(Native Method)
[09:52:44 ERROR]:               [email protected]/java.util.concurrent.locks.LockSupport.park(LockSupport.java:211)
[09:52:44 ERROR]:               [email protected]/java.util.concurrent.CompletableFuture$Signaller.block(CompletableFuture.java:1864)
[09:52:44 ERROR]:               [email protected]/java.util.concurrent.ForkJoinPool.unmanagedBlock(ForkJoinPool.java:3463)
[09:52:44 ERROR]:               [email protected]/java.util.concurrent.ForkJoinPool.managedBlock(ForkJoinPool.java:3434)
[09:52:44 ERROR]:               [email protected]/java.util.concurrent.CompletableFuture.waitingGet(CompletableFuture.java:1898)
[09:52:44 ERROR]:               [email protected]/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2072)
[09:52:44 ERROR]:               EconomyPlus.jar//me.itswagpvp.economyplus.database.mysql.MySQL.getList(MySQL.java:214)
[09:52:44 ERROR]:               EconomyPlus.jar//me.itswagpvp.economyplus.database.misc.DatabaseType$2.getList(DatabaseType.java:86)
[09:52:44 ERROR]:               EconomyPlus.jar//me.itswagpvp.economyplus.events.Join.onPlayerJoin(Join.java:21)
[09:52:44 ERROR]:               com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor176.execute(Unknown Source)
[09:52:44 ERROR]:               org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:75)
[09:52:44 ERROR]:               org.bukkit.plugin.EventExecutor$$Lambda$5794/0x0000000801cae1d0.execute(Unknown Source)
[09:52:44 ERROR]:               co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:76)
[09:52:44 ERROR]:               org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70)
[09:52:44 ERROR]:               org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:671)
[09:52:44 ERROR]:               net.minecraft.server.players.PlayerList.postChunkLoadJoin(PlayerList.java:363)
[09:52:44 ERROR]:               net.minecraft.server.players.PlayerList.lambda$placeNewPlayer$1(PlayerList.java:305)
[09:52:44 ERROR]:               net.minecraft.server.players.PlayerList$$Lambda$9396/0x0000000802dee368.run(Unknown Source)
[09:52:44 ERROR]:               net.minecraft.server.network.ServerGamePacketListenerImpl.tick(ServerGamePacketListenerImpl.java:320)
[09:52:44 ERROR]:               net.minecraft.network.Connection.tick(Connection.java:576)
[09:52:44 ERROR]:               net.minecraft.server.network.ServerConnectionListener.tick(ServerConnectionListener.java:231)
[09:52:44 ERROR]:               net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1651)
[09:52:44 ERROR]:               net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:522)
[09:52:44 ERROR]:               net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1483)
[09:52:44 ERROR]:               net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1247)
[09:52:44 ERROR]:               net.minecraft.server.MinecraftServer.lambda$spin$1(MinecraftServer.java:321)
[09:52:44 ERROR]:               net.minecraft.server.MinecraftServer$$Lambda$4140/0x00000008014b86a8.run(Unknown Source)
[09:52:44 ERROR]:               [email protected]/java.lang.Thread.run(Thread.java:833)
[09:52:44 ERROR]: ------------------------------
[09:52:44 ERROR]: --- DO NOT REPORT THIS TO PURPUR - THIS IS NOT A BUG OR A CRASH ---
[09:52:44 ERROR]: ------------------------------
[09:52:47 INFO]: Slenk[<ip address withheld>] logged in with entity id 2903 at ([spawn]0.5, 79.0, 0.5)

To Reproduce
Steps to reproduce the behavior:

  1. Use MySQL
  2. Join the server
  3. Enjoy the lag and error in console

[BUG]

Describe the bug
Withdraw bug after deposit.

To Reproduce
Steps to reproduce the behavior:

  1. Deposit the all money.
  2. Within 1 second (I'm not sure) will withdraw all balance.

Expected behavior
It appears that 0.00 has been withdrawn from the withdraw message, and even if use '/bank admin get', it appears as 0.
In some cases, money is withdrawn more than twice.

Screenshots
20211015_163059

Other economy plugins: Vault, TNE

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.