Skip to content

configurable commands#135

Closed
casperwtf wants to merge 1 commit intoJikoo:masterfrom
casperwtf:master
Closed

configurable commands#135
casperwtf wants to merge 1 commit intoJikoo:masterfrom
casperwtf:master

Conversation

@casperwtf
Copy link

The point of this is to allow users to change the command that is registered for openinv. This is useful for cases where staff chat plugins are overridden (/sc) by openinv. This allows individual users to define their own commands.

@Jikoo
Copy link
Owner

Jikoo commented Apr 3, 2023

I appreciate the work you put into this, but it has little to no appeal to me.

  • While I do think the reflective approach for command registration is pretty safe, OI requires the use of NMS. CraftServer#getCommandMap exists.
  • You expanded the command handlers into a bunch of duplicate code; this approach can continue using shared executors.
  • I'm very opposed to most of those values being exposed to users. Yes, they can edit the plugin.yml if they really want to, but enabling people doing stupid things and breaking plugin functionality by sticking it in their faces is not something I'm on board for.
  • Commands.yml exists.

Example commands.yml content:

aliases:
  sc:
  - "myotherplugin:sc $1-"

While this does have the downside of causing the /sc alias to be visible to all users, you can mitigate that with PermissionsSetup, which has the ability to edit permissions for Bukkit-created aliases built in.

@Jikoo Jikoo closed this Apr 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants