Giter Site home page Giter Site logo

iconomy's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

iconomy's Issues

Asynchronous Towny Tax collection only counts the last modification to town balance

The problem is that the add or subtract method of the Holder class could are run asynchronously in the same tick, resulting in the following:

balance = 100

add(10); => balance is 100, adding 10, new balance is 110, schedule BalanceUpdateEvent for next tick;
add(20); => balance is still 100 since its still the same tick, adding 20, new balance is 120, schedule BalanceUpdateEvent for next tick;

-- next tick --

setting balance to 110
setting balance to 120 => first add is ignored"

related pull request: #16
If there is a better solution to this, please do implement that, this was the fastest and easiest way I could think of how to fix it.

[Suggestion]: Add placeholders

I'd like to see balance, balance formatted and balance raw placeholders added so we don't have to use Vault and it's extremely badly optimised ones.

[Suggestion] Make interactions with accounts not case-sensitive.

I am using Iconomy 5.1.

When I do /money grant [player] [amount]
or /pay [player] [amount]

It says the player does not exist if I do not put their name correctly Case-Sensitive.
Is there a reason behind this, or could you make the plugin not Case-Sensitive please?

iConomy H2 Exception

Hello,
I can not use the iConomy plugin on my server, this error is displayed when starting the server. I use PaperSpigot 1.12.2. What can I do ? Thank you !
iConomy Exception

[Question] Is there a way to convert from h2 to mysql?

Is there a way to convert from h2 to mysql? I am opening another server, and would like to link the economies. I cannot do this with h2, and can't figure out a way to convert to mysql to allow for a connected economy.

Also, I saw that it says Towny is required to use this plugin. Is it really required, or will I be fine without it? Right now it's running on a Towny server, but I am opening a second server that is Factions. Would I be fine installing iConomy on the Factions server and linking it via mysql?

EDIT:
I just looked into this a bit more. Theoretically, could I do the following:

  1. Use /baltop to sync iConomy to essentials eco.
  2. Stop the server and convert iConomy to mysql
  3. Start the server and import the economy from essentials back to iConomy

Would there be any risk here to my existing data?

[Suggestion] Silent money grant

I'm going to basically cross-post from this issue I had created on ElgarL's iConomy version that seems to no longer be maintained: ElgarL#11

Here's the original content:

It would be quite helpful to have an optional parameter for "/money grant" so it can be executed without the player getting a message.

Sometimes you want to grant money through a command from another plugin but have your own message show instead of the one that iConomy does by default.

Something like "/money grant <user> <amount> [silent]" would be great so you can use "/money grant Folas1337 10 silent" to not show a message.

I'd be very grateful for this little addition :)

JDK 9+: ClassCastException when loading H2 Driver

iConomy5 is unusable on anything over JDK1.8. Most Linux distributions use JDK 11 as their default java implementation, unless the end user explicitly overrides that or the hosting provider does. Example: default-jre defaults to OpenJDK 11 on Debian Stable and Ubuntu LTS.

 [iConomy] Enabling iConomy v5.08
[22:26:30 INFO]: [iConomy] Default setup file written: Config.yml
[22:26:30 INFO]: [iConomy] Default setup file written: Template.yml
[22:26:30 INFO]: [iConomy] Downloading Dependencies
[22:26:30 INFO]:    + h2.jar downloading...
[22:26:35 INFO]:    - h2.jar finished.
[22:26:35 ERROR]: Error occurred while enabling iConomy v5.08 (Is it up to date?)

java.lang.ClassCastException: class jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to class java.net.URLClassLoader (jdk.internal.loader.ClassLoaders$AppClassLoader and java.net.URLClassLoader are in module java.base of loader 'bootstrap')
        at com.iConomy.util.Downloader.addURLToClassLoader(Downloader.java:77) ~[?:?]
        at com.iConomy.util.Downloader.install(Downloader.java:35) ~[?:?]
        at com.iConomy.iConomy.onEnable(iConomy.java:95) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[patched_1.14.2.jar:git-Paper-65]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:338) ~[patched_1.14.2.jar:git-Paper-65]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:419) ~[patched_1.14.2.jar:git-Paper-65]
        at org.bukkit.craftbukkit.v1_14_R1.CraftServer.enablePlugin(CraftServer.java:464) ~[patched_1.14.2.jar:git-Paper-65]
        at org.bukkit.craftbukkit.v1_14_R1.CraftServer.enablePlugins(CraftServer.java:378) ~[patched_1.14.2.jar:git-Paper-65]
        at net.minecraft.server.v1_14_R1.DedicatedServer.init(DedicatedServer.java:217) ~[patched_1.14.2.jar:git-Paper-65]
        at net.minecraft.server.v1_14_R1.MinecraftServer.run(MinecraftServer.java:855) ~[patched_1.14.2.jar:git-Paper-65]
        at java.lang.Thread.run(Thread.java:835) [?:?]

[22:26:35 INFO]: [iConomy] Disabling iConomy v5.08

[Suggestion] Remove decimal place.

Our server uses raw_gold as our standard for currency. (1 raw gold = $1)
There will never be anything less than 1, so decimals get in the way of the shop plugins, and might give the wrong impression that there is a smaller denomination. I would like to be able to completely remove minor denominations.
If this could be added, it would be helpful for our server. Thank you!

[Bug]: Public Key Retrieval is not allowed

The following error occurs on a new install of MySQL. There is no configuration option that sets SSL to true, as the useSSL is set to false in the code. I've tried the alternative fix we found a few months back but it does not work for some reason anymore and this should probably get fixed.

[01:43:10 INFO]: [iConomy] [iConomy] Could not create connection: java.sql.SQLNonTransientConnectionException: Public Key Retrieval is not allowed
[01:43:10 ERROR]: [iConomy] Database initialization failed: java.lang.NullPointerException: Cannot invoke "java.sql.Connection.getMetaData()" because "conn" is null

As a request, could we potentially get editable flags instead of a useSSL option?

Potential memory leak

As described here and here, saving players may lead to memory leaks and probably needs to be replaced with uuid instead of player object.

The reason why i started investigating and opened this issue afterwards is because i took heapdump of my server and analyzed it, here's the results i've got:

image
image

Messaging.save(sender);

public static void save(CommandSender sender) {

'/bank remove [bank]' doesn't seem to work

Accidentally created 2 banks with the names "Mine" and "mine" but when I try to type /bank remove Mine or /bank remove mine they nothing appears and neither bank is deleted, nor does any message pop up.

[Suggestion] Customize $ sign position and K, M, B, T, Q characters and position

It would be nice if in the config we could chose between 'before' and 'after' for the position of the $.

Additionally, it would be a little extra thing to be able to pick the character for each K, M, B, T, Q, and their position/spacing as well if that's not too much to ask

for the position, for example:

display_value: '%dollar_sign_or_currency_name% %value% %character_indicator% ' # $ '50 M'
display_value: '%dollar_sign_or_currency_name%: %value%%character_indicator% ' # '$: 50M'
display_value: '%value% %character_indicator% %dollar_sign_or_currency_name% ' #  '50 Mil Coins'

and so on. Something like that?

for the character, for example:

K: 'k'
M: 'Mil'
B: 'Bil'
T: 'T'
Q: 'Q'

Thanks!

iConomy doesn't work in 1.14 because of async event change.

This ticket template is for bug/error reports. If you are suggesting a feature and not reporting a bug please delete all the text here and begin your ticket Title with Suggestion:

What steps will reproduce the problem?
Unable to /plot claim in order to claim a plot.
What is the expected output?
Error
What is your Towny version?
Do not say "latest".
https://gyazo.com/b123562f033d1afa0bf4be4281df8820

What is your spigot/craftbukkit version?
Do not say "latest".
https://gyazo.com/d1df565f86d8998c0d8832d8bc5e23c5

Please use Pastebin.com to link the following files:
Skipping these files is not an option. It is the easiest way to diagnose an issue ticket properly. If you do skip this step then your ticket will most likely be deleted and you will be asked to resubmit.

Your full server startup from the logs\latest.log : https://pastebin.com/PpK4SkAQ
Your Towny config.yml (if using MySQL please remove password,) : https://pastebin.com/YgZNd5j5
Your townyperms.yml : https://pastebin.com/canLU4dJ
Your log's error : https://pastebin.com/YgZNd5j5
(optional) If this is to do with permissions,
5. Your permissions file :

(optional) If this is to do with chat,
6. Your chatconfig.yml :
7. Your channels.yml :

Error shown when interest is paid out.

[16:59:19] [Timer-0/WARN]: Exception in thread "Timer-0"
[16:59:19] [Timer-0/WARN]: java.lang.NullPointerException
[16:59:19] [Timer-0/WARN]:  at com.iConomy.util.Messaging.argument(Messaging.java:17)
[16:59:19] [Timer-0/WARN]:  at com.iConomy.util.Template.parse(Template.java:121)
[16:59:19] [Timer-0/WARN]:  at com.iConomy.system.Interest.run(Interest.java:148)
[16:59:19] [Timer-0/WARN]:  at java.util.TimerThread.mainLoop(Timer.java:555)
[16:59:19] [Timer-0/WARN]:  at java.util.TimerThread.run(Timer.java:505)

Apparently it only showed up after the server was switched from java 7 to 8.

Config:

# iConomy 5.01 Forked 0.02
# %author     Nijikokun <[email protected]>
# %license    GPLv2
# %copyright  Copyright AniGaiku LLC (C) 2010-2011
##
# Setup Notes
#   - Default
#     This node consists of all the 'default' data.
#   - Formatting
#     Allows you to control the output of how you will
#     see the currency in-game with the major/minor features.
#   - Banking
#     Allows users to store money in a seperate location as
#     well as transfer from bank to bank between users
#     - Multiple
#       Allows users to create multiple accounts with banks
#     - Q & A
#       Q: Why?
#       A: Money on hand can be lost, money in banks should not
#           be altered upon plugin specifictions in iConomy 5.0
#   - Interest amount is done in seconds.
#     - Online
#       If only true, only one bank / account will recieve money for that player.
#       If only false, it will go through each bank / account and deposit money.
#     - Announce
#       Sends message each time a player recieves money.
#     - Amount
#       - On
#         Each time interest runs you can either deposit the money into a bank (Interest)
#         or directly into a players holdings (Wage).
#     - Interval
#       - Seconds
#         Basic Table:
#           1 minute = 60 seconds
#           1 hour = 1 minute * 60 = 3600 seconds
#           1 day = 1 hour * 24 = 86400 seconds
#           1 week = 1 day * 7 = 604800 seconds
#   - Database
#     - Type
#       Can only be h2 or MySQL, no longer supports SQLite.
#     - Settings
#       If you choose h2, only the first two are needed, do not alter MySQL.
#       - MySQL
#         Do not use remote databases from free sites, please use either a
#          remote database from a personal hosted VPS or DEDI or a local
#          database. This will prevent any 'timeout' or 'invalid settings'
#          or 'cannot connect to database' issues. Thank you :)!
##

System:
    Default:
        Currency:
            Major: [ 'Dram', 'Drams' ]                # Major ([Major].Minor) 1.00 Dollar (With Seperate 1 Dollar)
            Minor: [ 'Khansa', 'Khansa' ]                    # Minor (Major.[Minor]) 0.23 Coins  (With Seperate 0 Dollars, 23 Coins)
        Account:
            Holdings: 5.0                             # Default holdings on hand upon join / creation.
        Bank:
            Name: National Bank of Visuban            # Default Bank Name
            Currency:
                Major: [ 'Dram', 'Drams' ]
                Minor: [ 'Khansa', 'Khansa' ]
            Account:
                Fee: 1.0                             # Default cost to register an account
                Holdings: 1.0                        # Default initial account holdings
    Formatting:
        Minor: true                                  # Example (true) 0.23 Coins and 1.23 Dollars (false) 0.23 Dollars and 1.23 Dollars
        Seperate: true                               # Example (true) 1 Dollar, 23 Coins (false) 1.23 Dollars (Only if Minor is true)
    Logging:
        Enabled: true                                # Logs transactions done inside iConomy only, other plugins must utilize the api. (Logs to SQL)
    Banking:
        Enabled: false
        Accounts:
            Multiple: false
    Interest:
        Enabled: true
        Online: true                                  # Only give to players who are online?
        Announce:
            Enabled: true
        Interval:
            Seconds: 3600
        Amount:
            Cutoff: 0.0                               # Amount limit to be met until we stop giving interest. (0.0 for no limit)
            On: 'Players'                             # Banks or Players
            Percent: 0.5                              # Percent of holdings to give / take (Negative to take) (Overrides Min/Max)
            Maximum: 1                                # (Range) Maximum amount for random in between. (Make Max/Min equal for a flat-rate amount ie: 5/5)
            Minimum: 2                                # (Range) Minimum amount for random in between.
    Database:
        Type: 'H2SQL'                                 # H2 or MySQL
        Settings:
          Name: 'minecraft'
          Table: 'iConomy'
          MySQL:
              Username: 'root'
              Password: 'pass'
              Hostname: 'localhost'
              Port: 3306

THIS NOT A QUICKSHOP FAULT

Paper-354 (MC: 1.17.1)
QuickShop v5.0.0.17-SNAPSHOT
Vault v1.7.3-b131
iConomy v5.13

[18:45:17] [Server thread/WARN]: [QuickShop] QuickShop received an error when processing Economy response, THIS NOT A QUICKSHOP FAULT, you might need ask help with your Economy Provider plugin (iConomy 5.13) author.
java.lang.NullPointerException: Cannot invoke "com.iConomy.system.Account.getHoldings()" because the return value of "com.iConomy.iConomy.getAccount(String)" is null
	at com.iConomy.util.VaultConnector.depositPlayer(VaultConnector.java:119) ~[iConomy-5.13.jar:?]
	at org.maxgamer.quickshop.economy.Economy_Vault.deposit(Economy_Vault.java:142) ~[QuickShop-5.0.0.17-SNAPSHOT_2011.jar:?]
	at org.maxgamer.quickshop.api.economy.EconomyTransaction.commit(EconomyTransaction.java:190) ~[QuickShop-5.0.0.17-SNAPSHOT_2011.jar:?]
	at org.maxgamer.quickshop.api.economy.EconomyTransaction.commit(EconomyTransaction.java:142) ~[QuickShop-5.0.0.17-SNAPSHOT_2011.jar:?]
	at org.maxgamer.quickshop.api.economy.EconomyTransaction.failSafeCommit(EconomyTransaction.java:129) ~[QuickShop-5.0.0.17-SNAPSHOT_2011.jar:?]
	at org.maxgamer.quickshop.shop.SimpleShopManager.actionSell(SimpleShopManager.java:1077) ~[QuickShop-5.0.0.17-SNAPSHOT_2011.jar:?]
	at org.maxgamer.quickshop.shop.SimpleShopManager.actionTrade(SimpleShopManager.java:1440) ~[QuickShop-5.0.0.17-SNAPSHOT_2011.jar:?]
	at org.maxgamer.quickshop.shop.SimpleShopManager.lambda$handleChat$4(SimpleShopManager.java:490) ~[QuickShop-5.0.0.17-SNAPSHOT_2011.jar:?]
	at org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftTask.run(CraftTask.java:101) ~[patched_1.17.1.jar:git-Paper-354]
	at org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:483) ~[patched_1.17.1.jar:git-Paper-354]
	at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1564) ~[patched_1.17.1.jar:git-Paper-354]
	at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:490) ~[patched_1.17.1.jar:git-Paper-354]
	at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1480) ~[patched_1.17.1.jar:git-Paper-354]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1279) ~[patched_1.17.1.jar:git-Paper-354]
	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319) ~[patched_1.17.1.jar:git-Paper-354]
	at java.lang.Thread.run(Thread.java:831) ~[?:?]

Could not pass event InventoryCloseEvent to ChestShop



[21:53:24 ERROR]: Could not pass event InventoryCloseEvent to ChestShop v3.12.3-SNAPSHOT (build 388)
java.lang.NullPointerException: Cannot read field "captureTreeGeneration" because the return value of "net.minecraft.world.level.World.getCurrentWorldData()" is
null
        at net.minecraft.world.level.Level.getBlockState(Level.java:811) ~[?:?]
        at org.bukkit.craftbukkit.v1_20_R1.block.CraftBlock.getType(CraftBlock.java:242) ~[folia-1.20.1.jar:git-Folia-"6b978f2"]
        at com.Acrobot.ChestShop.Utils.uBlock.couldBeShopContainer(uBlock.java:316) ~[ChestShop.jar:?]
        at com.Acrobot.ChestShop.Listeners.Modules.StockCounterModule.onInventoryClose(StockCounterModule.java:69) ~[ChestShop.jar:?]
        at com.destroystokyo.paper.event.executor.StaticMethodHandleEventExecutor.execute(StaticMethodHandleEventExecutor.java:40) ~[folia-api-1.20.1-R0.1-SNAPSH
OT.jar:?]
        at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:77) ~[folia-api-1.20.1-R0.1-SNAPSHOT.jar:git-Folia-"6b978f2"]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[folia-api-1.20.1-R0.1-SNAPSHOT.jar:?]
        at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[folia-1.20.1.jar:git-Folia-"6b978f2"]
        at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:126) ~[folia-1.20.1.jar:git-Folia-"6b978f2"]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:615) ~[folia-api-1.20.1-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.v1_20_R1.event.CraftEventFactory.handleInventoryCloseEvent(CraftEventFactory.java:1584) ~[folia-1.20.1.jar:git-Folia-"6b978f2"]
        at net.minecraft.server.level.ServerPlayer.closeContainer(ServerPlayer.java:2031) ~[?:?]
        at org.bukkit.craftbukkit.v1_20_R1.entity.CraftHumanEntity.closeInventory(CraftHumanEntity.java:573) ~[folia-1.20.1.jar:git-Folia-"6b978f2"]
        at nl.pim16aap2.bigDoors.GUI.GUI.close(GUI.java:591) ~[BigDoors.jar:?]
        at nl.pim16aap2.bigDoors.handlers.GUIHandler$1.run(GUIHandler.java:52) ~[BigDoors.jar:?]
        at >nl.pim16aap2.bigDoors.lib.universalScheduler.foliaScheduler.FoliaScheduler.lambda$runTaskLater$1(FoliaScheduler.java:58) ~[BigDoors.jar:?]
        at io.papermc.paper.threadedregions.scheduler.FoliaGlobalRegionScheduler$GlobalScheduledTask.run(FoliaGlobalRegionScheduler.java:178) ~[folia-1.20.1.jar:
?]
        at io.papermc.paper.threadedregions.scheduler.FoliaGlobalRegionScheduler.tick(FoliaGlobalRegionScheduler.java:36) ~[folia-1.20.1.jar:?]
        at io.papermc.paper.threadedregions.RegionizedServer.globalTick(RegionizedServer.java:294) ~[folia-1.20.1.jar:git-Folia-"6b978f2"]
        at io.papermc.paper.threadedregions.RegionizedServer$GlobalTickTickHandle.tickRegion(RegionizedServer.java:149) ~[folia-1.20.1.jar:git-Folia-"6b978f2"]
        at io.papermc.paper.threadedregions.TickRegionScheduler$RegionScheduleHandle.runTick(TickRegionScheduler.java:385) ~[folia-1.20.1.jar:git-Folia-"6b978f2"
]
        at ca.spottedleaf.concurrentutil.scheduler.SchedulerThreadPool$TickThreadRunner.run(SchedulerThreadPool.java:525) ~[folia-1.20.1.jar:git-Folia-"6b978f2"]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]
[21:53:25 ERROR]: Could not pass event InventoryCloseEvent to ChestShop v3.12.3-SNAPSHOT (build 388)
java.lang.NullPointerException: null


i used with bigdoors but i dont think it's related to bigdoors because it just fires the event
i'm on folia 1.20.1

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.