Question Renaming the minecraft: class

Discussion in 'Bukkit Help' started by mashers, Jun 4, 2017.

Thread Status:
Not open for further replies.
  1. Offline

    mashers

    Hi everyone

    Is there any way to rename the minecraft: class? I.e. what you type to override commands and force it to use the minecraft version, like this:

    > minecraft:stop

    which would use the built-in minecraft command rather than an aliased or Bukkit one. I would prefer to change the keyword so it's something like this:

    > secret:stop

    Thanks in advance.
     
  2. Online

    timtower Administrator Administrator Moderator

    @mashers Interesting question.
    I will look into this for you.
     
  3. Offline

    mashers

    Thanks @timtower! I did try adding an override to 'minecraft' to see if I could prevent access to it (and then, if that worked, create an alias to it), but it didn't work - I could still use 'minecraft:somecommand'.
     
  4. Online

    timtower Administrator Administrator Moderator

    @mashers I probably need to use some dirty hacks (Reflection) but that is why I like this stuff :p
     
  5. Offline

    mashers

    Ahh, so would that allow you to change the name of the object at runtime? We do similar stuff in Objective C, such as with method swizzling. I don't know Java though.
     
  6. Online

    timtower Administrator Administrator Moderator

    Something like that yes.
     
  7. Offline

    Zombie_Striker

    @mashers @timtower
    Well, you can unregister the base-minecraft commands and re-register the command for the other "secret" plugin.
     
  8. Online

    timtower Administrator Administrator Moderator

    @Zombie_Striker Was more thinking about getting the original ones and only changing the label.
     
  9. Online

    timtower Administrator Administrator Moderator

    @mashers Besides the fact that I love to mess with thing: this is not something that I can complete.
     
  10. Offline

    mashers

    Thanks timtower, I appreciate you responding anyway :)
     
Thread Status:
Not open for further replies.

Share This Page