💸 [1.10.2&1.11.2] Fedora's Economy [v1.1.3][Custom Currencies!]

Fedora’s Economy

Built for Sponge 5.1.0-SNAPSHOT (1.10.2) and Sponge 6.1.0-SNAPSHOT (1.11.2), and off of JDK 1.8.0_144.

Just another (light-weight) Economy implementation ^_^ .


Features

  • H2 Database backend
  • Multi-currency support
  • Currency cataloging support (for developers, GameRegistry stuff)
  • Custom Currencies (with lots of formatting options!)
  • Permissions (WIP)

TODO

  • MySQL Support (low priority)
  • Business support (could be implemented by separate plugin, tbh, so low priority)

Most recent changelog(s)

v1.1.3 (Critical)

  • Updated Gradle to 4.2.1
  • Added /fe toss to test withdraws
  • Made it so you can’t pay someone a negative amount
  • Made it so you you shouldn’t be able to withdraw or deposit a negative amount
    • it’ll automatically redirect to the other function
  • Updated plugin id so it compiles again
  • Compile for 1.11.2 / SpongeAPI v5, on JDK 1.8.0_144
  • Dropped 1.8.9 support

v1.1.2

  • Added permission fedoraseconomy.global.balance.other (checking other’s balance)
  • Moved commands from Readme to Wiki

v1.1.1

  • Fixed help command highlight-clicking giving /fm instead of /fe.

v1.1.0

  • Added verboseLogging option to toggle whether or not it should display messages from all transactions vs internal commands only
  • Added fe [reset, zero] <account> and fe user [reset, zero] <user> to reset or “zero” an account’s balances
  • Added highlighting to fe config
  • Added fe getconfig to get config values
  • Updated to Sponge API v4.2.0 & started supporting v5.0.0
  • Fixed fe [user, u] requiring a user parameter to show subcommands (sigh)
  • Fixed formatting issues with negative amounts of currency

Links

Github Source

Downloads

  • Latest: Latest

Issues

Wiki


Big thanks to a couple of people

  • God, for creating this awesome place to live in, and for giving me the time and talents to create this. All glory to him.
  • The SpongePowered team for making their API (including all their contributors)
  • And the SpongeDocs team, for making it easy to learn!
  • Flibio for making EconomyLite, and licensing it under the MIT license. I learned the basics of filling out this API thanks to you.
  • hsyyid for having examples for the Configuration stuff in your also-MIT-licensed code, EssentialCmds

I couldn’t have made this without you. :heart:


Enjoy!

stats or something

Soli deo gloria

5 Likes

I really like this one, works perfectly out of the box.

Just one request: I’m writing a plugin that pays a wage every minute and the “deposited” messages get a bit spammy. Could you add an option to make transactions silent?

1 Like

Thank you! That means a lot haha.

I will see what I can do, and will update it for the latest version of sponge when I release v1.1 (unless you still need it for sponge v4?)

Currently it PM’s only the user when any transaction is done (I think I made an event out if it…), but perhaps it could have a timeout and simply say the sum of the transactions every n seconds, or be disabled completely?

1 Like

I want to stay up to date as well, so feel free to update :slight_smile:

Maybe add a view PM modes: Any transaction, Commands only (should be possible if transaction source is no player if I understand the API correctly), Scheduled and Not at all. (Tho I don’t see a point in having it displayed every X minutes, but who knows, maybe someone got a use for that)

Sounds pretty good!

feedbackType: <all, local, timeout, none>
and feedbackTimeout: <seconds>?

Timeout would “time out” the response time from one reply to the next, and then tell the user the difference I guess. I don’t know though, it sounds dirty, because I personally would want to know what’s going on with my account at any time!

Maybe I could have transaction spam detection then? Or have an interface for plugins to mute themselves?

Or have an option in the config file to mute plugins but say things about it’s own dealings?

(I’ve also been meaning to implement a transaction log, but I think I’ll save that for v1.2)

2 Likes

That’s why I mentioned the “commands only type”, that mutes transactions issued by plugins.

The thing is, I’ll later have banker and shop NPCs to interact with, and for those I’ll have to PM the player myself (Bought 10 items x for y f$). I’m totally ok with the messages triggered by everything else like /pay .
And (If I can get the Scoreboard to work) I’d like to display the balance there as well

Ok so… small problem.

I decided just to do the verboseLogging option, as it seemed quite logical and easy to implement.

Turns out it’s not so… the way I previously had implemented it was just to attached the message to any transaction event. These events are called by Sponge itself, and not my plugin. So I decided to just add a parameter internal into the transaction-object, but then the problem was that I now need to duplicate most of the signatures of the EconomyService itself to support my interall callings…

tl;d;r it’s going to take a little while :stuck_out_tongue: Anything else though you guys want me to implement for v1.1?

1 Like

Updated, yay! Thanks to @DosMike for getting me to update this! Otherwise it’d be stale® bread…

  • Added verboseLogging option to toggle whether or not it should display messages from all transactions vs internal commands only
  • Added fe [reset, zero] <account> and fe user [reset, zero] <user> to reset or “zero” an account’s balances
  • Added value-highlighting to fe config
  • Added fe getconfig to get config values
  • Updated to Sponge API v4.2.0 & started supporting v5.0.0
  • Fixed fe [user, u] requiring a user parameter to show subcommands (sigh)
  • Fixed formatting issues with negative amounts of currency

Also, it’s out for both 1.8.9 AND 1.10.2. Hoorah!

Enjoy!

1 Like

Firstly, let me say that I love the idea of your plugin, especially having multiple currencies. It’s so clever! Now, for the but. Firstly, I don’t see much documentation on how to create new currencies. Also, what about converting between these currencies and such? Then, there seems to be an issue with the file structure. When I go to /fe currency help and click on one of the links it pastes the command /fm instead of /fe. When I manually type /fe currency details, it says not enough arguments. It doesn’t recognize the default Fedorian currency. When I type /fe add Fedorian (or fedorians or currency:fedorians) it says no matching pattern.
I hate to bombard you with issues, as lots of these issues very well be the way I’m using the plugin. Thanks for the help, though!

Yeah, about that… :stuck_out_tongue: . Here’s a wiki I just made to help out.

Haven’t made that happen yet. Do you think I should? I was more along the lines of thinking people could implement that in shops and such.

And ouch, thanks for letting me know about the /fm thingy. I am (somewhat) developing another plugin that uses that prefix, so… yeah I messed up there lol. I will make a hotfix soon :wink:

1 Like

#Released v1.1.1 (Hotfix)
Not urgent, but fixed /fe help click-highlighted-command giving you the /fm prefix instead of the correct /fe.

Wiki is also up, check it out!

1 Like

Cool, having a wiki is very helpful, especially the currency page. Now I can start to create currencies. :slight_smile:

Personally, I think that you should include currency conversion so that players can set a currency’s value in relation to the default currency. Like Default (Fedorians) - > Rubles = 0.2, so 5 Rubles is equivalent to 1 Fedorian and 0.20 of a Fedorian is equal to 1 Ruble. A player could type a command /currency rates to see the currency’s values in proportion to the default rate set in the config and then decide to convert with /currency convert 100 Feds Rubles or they could click a sign that says:

[Convert] Fedorians to Rubles 0.2 (5 rubles for every fedorian, pulled from config info)
Then you could have a prompt that has the player type into chat how much money they’d like to convert?

I know it would be very important for my server as I plan on having different regions of the world using different currencies. I plan on creating currency conversion booths where players can convert their money by clicking on a sign or a trader or something. If you don’t plan on incorporating a feature like this, do you have any suggestions of how I could do so?

Can’t wait to see what’s in store
Thanks so much!!!

1 Like

Hmm. I like the idea… but I’d rather it be in a separate plugin. :wink:

I am somewhat making a Market plugin that does this whole complicated thing with “transactions” and trading and all that weird stuff, but perhaps I could make a small plugin that just implements this for you? (And, maybe, the virtual-accounts / business accounts too, eh?)

It’ll take a couple weeks since school starts up for me this coming monday though.

1 Like

That sounds great! Yeah, I’m back to school Monday too, so all this time this week I’ve spent playing with Sponge and trying to get a feel for developing–it all gets pushed aside :confused:

Here’s the repo if you want to watch development. I’ll make a post on the forums once it’s done :wink:

Best of luck in school!

1 Like

Release v1.1.2

  • Added permission fedoraseconomy.global.balance.other (checking other’s balance)
  • Moved commands from Readme to Wiki

Get it here!

great stuff, don’t like other similar plugins that support 5.x+ only because I’m running a 1.8.x server.:joy:

1 Like

Glad you enjoy it :smile: I haven’t touched it for quite a while, nor have I worked on mistakenCynic’s project because school’s been crazy and there hasn’t been much demand.

If you need anything fixed make sure to let me know!

when will you move on to 1.11?:slight_smile:

Released v1.1.3 (Critical)

Important fixes for exploits so this can actually be used properly… sigh… why didn’t I see this before!?

  • Updated Gradle to 4.2.1
  • Added /fe toss to test withdraws
  • Made it so you can’t pay someone a negative amount
  • Made it so you you shouldn’t be able to withdraw or deposit a negative amount
    • it’ll automatically redirect to the other function
  • Updated plugin id so it compiles again
  • Compile for 1.11.2 / SpongeAPI v5, on JDK 1.8.0_144
  • Dropped 1.8.9 support