Skip to content
This repository has been archived by the owner on Aug 16, 2021. It is now read-only.

[Feature] Ability to configure commands #5

Open
Thunder33345 opened this issue Jun 8, 2020 · 7 comments
Open

[Feature] Ability to configure commands #5

Thunder33345 opened this issue Jun 8, 2020 · 7 comments

Comments

@Thunder33345
Copy link

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
Copy link
Author

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

@SOF3
Copy link

SOF3 commented Jun 10, 2020

See also pmmp/PocketMine-MP#3371

@Aericio Aericio changed the title The ability to configure the commands [Feature] Ability to configure commands Jun 12, 2020
@Ifera
Copy link
Member

Ifera commented Mar 19, 2021

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

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

@SOF3
Copy link

SOF3 commented Mar 20, 2021

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
Copy link
Member

Ifera commented Mar 20, 2021

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
Copy link
Author

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
Copy link

SOF3 commented Mar 23, 2021

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants