Make server seem like vanilla?

Discussion in 'Bukkit Discussion' started by gomeow, Nov 8, 2012.

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

    gomeow

    Is there any plugin or anything that makes it as if it was vanilla?

    I don't want the messages or commands like /version to be available

    I am ok with modifying the jar if need be.

    I would also be making my own plugins for this server
     
  2. Offline

    afistofirony

    You could try something like this:

    Code:
    public boolean onCommand(Command cmd, CommandSender sdr, String str, String[] args){
      if(cmd.getName().equalsIgnoreCase("HiddenCommand"){
        sdr.sendMessage(ChatColor.RED + "Unknown command. Try /help for a list of commands.");
      }
    
     
  3. Offline

    gomeow

    So you think I should do that for every command?
    Will it override things like bukkit's /version?
     
  4. Offline

    afistofirony

    I'm not sure if that would work. You'd probably need an @Override flag on it, but I don't know if that would override the command.

    Did I really just tag myself...? .-.
     
  5. Offline

    gomeow

    I'll try it out
     
  6. Offline

    Armadillo

    Good Idea.
     
  7. Offline

    ThatBox

    You would need to cancel the event.
     
  8. Offline

    Gravity

    use CommandPreprocessEvent. @Override is internal Java reflection, it doesn't have to do with the actual command at all. Basically, listen to that event and cancel anything you don't like.
     
  9. Offline

    gomeow

    What would I check?

    Code:java
    1. @EventHandler
    2. public void cmdPreprocess(PlayerCommandPreprocessEvent event) {
    3. String message = event.getMessage();
    4. if(message.startsWith("version") {
    5. event.setCancelled(true);
    6. }
    7. }

    would that work?
     
  10. Offline

    Gravity

    Yep.
     
  11. Offline

    untergrundbiber

  12. Offline

    gomeow

    That was nothing to do with the question

    Thanks

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 29, 2016
  13. Offline

    untergrundbiber

    You didn't read it...
     
  14. Offline

    gomeow

    What is that link for?
     
  15. Offline

    untergrundbiber

    There you find the permission-nodes for the bukkit- and vanilla-commands.
    Like "bukkit.command.version" for /version

    Negate the permission and voilĂ , nobody can use the command.
     
  16. Offline

    gomeow

    Obviously you didn't read the post. I want it to say Unknown Command. Etc... Not just a no permission message
     
Thread Status:
Not open for further replies.

Share This Page