[Very Simple] Change command output for non ops.

Discussion in 'Archived: Plugin Requests' started by AndyMcB1, Aug 28, 2012.

  1. Offline

    AndyMcB1

    For example.

    Player1 does /lb (LogBlock0
    Instead of 'You do not have persmission to do this'
    I'd like it to return the 'Unknown command'
    It'd be great if I could select users this goes to and which commands this is affected by.

    A simple config file would be all thats needed for my use :p

    However I have PermissionBukkit which might conflict.

    Thanks in Advance

    Andy
     
  2. Offline

    AndyMcB1

    It mustnt be that hard. Or is there another plugin that will help me achieve this?
     
  3. Offline

    Doggyroc

    The user who makes the plugin must define this, otherwise it is hard...
    Also, i think i saw something like this on the permissionsbukkit page...
    EDIT: Yah theres like Message at the bootom of your permisisons.yml
     
  4. Offline

    AndyMcB1

    I've done a lot of searching for plugins however I can't seem to find anything quite right. Mind talking a look for me :p
     
  5. Offline

    Omnitv

     
    calebbfmv likes this.
  6. Offline

    calebbfmv

    Listen to the all wise master
     
  7. Offline

    AndyMcB1

    Isn't that for building?

    Or could i add like;

    command: 'Unknown Command'
     
  8. Offline

    Doggyroc

    Maybe, I'm not to familiar with PermissionsBukkit, I use PermissionsEx
     
    Omnitv likes this.
  9. Offline

    AndyMcB1

    Does PermissionsEx have something like i'm looking for?
     
  10. Offline

    Doggyroc

    Sadly, no :(.
     
  11. Offline

    AndyMcB1

    Anyone?
     
  12. Offline

    jacklin213

    what perm plugin are u using?
     
  13. Offline

    AndyMcB1

    PermissionsBukkit
     
  14. Offline

    Jake230599

    I don't know if this would work but using a listener couldn't you cancel out that message when it is sent then replace it with the "Unknown command..." which is what is requested?
     
  15. Offline

    PogoStick29

    Code:
    if (player.hasPermission("logblock.something") == false) {
        player.sendMessage(getConfig().getString("unknowncommandmsg");
    }
    If that makes sense, I could program this easily :)
     
  16. Offline

    Doggyroc

    Thats not correct, it would be if(!player.hasPermission("Logblock.something")){


    Also, the only time onCommand gets triggered is if the command is from the plugin itself if i am not mistaken... (Making this allot harder. or nearly impossible with the bukkit API only)
     
  17. Offline

    PogoStick29

    Oh, well that makes sense. What if you make an AsyncPlayerChatEvent that said that when a player says "/lb something" it cancels the event and says "Unknown command"?
     
  18. Offline

    Doggyroc

    if chat has a / in front of it, it goes straight to the onCommand method, meaning that the AsyncPlayerChatEvent won't trigger
     
  19. Offline

    JazzaG

    Why no love for PlayerCommandPreProcessEvent?
     
  20. Offline

    one4me

    Well, I wrote this which can accomplish what you want.
     
    AndyMcB1 likes this.
  21. Offline

    AndyMcB1

    With customnodes can I block every command except for (these)
    or return a custom message?\
    I had a look but it doesn't make much sense to me..
     
  22. Offline

    Kiakaha

    I really want something like this where you can just make a list of messages
    "You can't Build here" that i will BLOCK from sending to the player
    thus eliminating all the spam you list from every conceivable plugin ever ever
    I really dont want these sorts of messages to detract from my roleplays
     
  23. Offline

    one4me

    It blocks per command, but you could if you wanted block "/", and then allow certain commands with the "+" option. Sorry if that seems a bit complicated, you can send me a pm for more help.

    I'll go ahead and make that later, if no one else does.
     
    Kiakaha likes this.
  24. Offline

    Kiakaha

    Dude that would be killer! The amount of times i've dug around in a config or worse a plugin.yml in the jar to turn off a message....
    Only to find that it still prints a doublequote or something daft
    I don't want my adventurers to know that "WORLDGUARD NO LIKE YOU!" everytime they try enter the dark wizards evil force field :)
     
  25. Offline

    one4me

    Kiakaha
    Sorry this took so long, but I've been somewhat busy.
    SentMessageChanger.jar
    Make sure the message you want changed is matched exactly, including the correct color codes.
    Other than that, if you need any other help you can pm me.

    Edit - removed link, plugin caused random bugs (stuck players, random damage, etc.)
     
  26. Offline

    AndyMcB1

    So is my Req possible?
     
  27. Offline

    Kiakaha

  28. Offline

    AndyMcB1

    Bump? I'd still like this?
     
  29. Offline

    JazzaG

  30. Offline

    AndyMcB1

    Thanks heaps :) I'll let you know if I have any issues
     

Share This Page