Paroxity / ParoxityEcon

A completely async economy plugin for PocketMine-MP servers designed while keeping server networks in mind.
https://econ.paroxity.net
GNU General Public License v3.0
9 stars 0 forks source link

[Feature] Ability to configure commands #5

Open Thunder33345 opened 4 years ago

Thunder33345 commented 4 years ago

The plugin lacks the ability to configure command attributes

Like for example command's name, aliases etc

Or the ability to disable/not register the command listener at all via a config

Thunder33345 commented 4 years ago

or the ability to make certain commands aliases? like /pay alias of /eco pay so it's more fimilar to users? not sure..

SOF3 commented 4 years ago

See also pmmp/PocketMine-MP#3371

Ifera commented 3 years ago

like /pay alias of /eco pay so it's more fimilar to users?

in case of multi currency this would cause problems.. no?

SOF3 commented 3 years ago

like /pay alias of /eco pay so it's more fimilar to users?

in case of multi currency this would cause problems.. no?

I don't think a generic /pay command should exist. Instead, the plugin should allow individual commands to be created to perform a certain transaction.

For example,

$api->createCommand("pay", $api->getCurrency("coins"), $api->getCurrency("dollars"), "permission", "description");

And provide appropriate user interfaces to streamline this kind of API calls.

Of course, I would even recommend a more generic action model that abstracts commands, block clicks, inventory GUI, etc. together (like libkinetic), but that's probably too much for you.

Ifera commented 3 years ago

I don't think a generic /pay command should exist. Instead, the plugin should allow individual commands to be created to perform a certain transaction.

Agreed. And that example looks good. However I would make the second param accept an array of currencies.

Further I don't think it should fall on this plugin to provide support for inventory GUI transactions or likes. Another plugin could surely do this.

Thunder33345 commented 3 years ago

in case of multi currency this would cause problems.. no?

yes, where in this case each currency would need to have it's own cluster of commands /paygem /paycoin which would add a lot of commands into autofill list and quite clunky or the rest second level treatment like /eco

I don't think a generic /pay command should exist.

i think all of it is to bandaid old school days when there's only one currency in an ideal world /eco would be the best /pay isnt descriptive what are you using to pay?? you cant tell by a glance either which works back when there was only one currency so there will never be any doubt, but things has changed

SOF3 commented 3 years ago

In some cases, payment is not desirable at all. In some cases, payment requires a fee. In some cases, payment across multiple currencies is desirable, but with extra fee. In some cases, players can pay themselves over currencies, which is a form of currency exchange.