About a plugin

Discussion in 'General Discussion / Real life stuff' started by TheBlackHamood, Nov 24, 2014.

  1. TheBlackHamood

    TheBlackHamood Feel Pain, Accept Pain, Know Pain

    Messages:
    3,709
    Likes Received:
    2,032
    Minecraft:
    twista_17 & _Hamood
    hai der,


    So when you mute someone or everyone what's the code, I the chatevent with the onCommand method and doesnt work
     
  2. _MadisonBarks

    _MadisonBarks THAT furry Donator

    Messages:
    1,966
    Likes Received:
    2,746
    1) This doesn't belong in Help, as Help is for server help. This belongs in Off-Topic.
    2) Try listening to AsyncPlayerChatEvent and handle mute cases in there - but remember: This may not be on the main thread, and you need to check if it is before you do any access to the Bukkit API.
     
  3. TheBlackHamood

    TheBlackHamood Feel Pain, Accept Pain, Know Pain

    Messages:
    3,709
    Likes Received:
    2,032
    Minecraft:
    twista_17 & _Hamood
    i do know how to handle the mute, but my problem is when the command got logged by an op all the players except for ops and unmute in the same command
     
  4. ItsLucas

    ItsLucas Agent V | Veigar Donator

    Messages:
    489
    Likes Received:
    261
    Minecraft:
    ItsLucas
    Well I'm not writing plugins for a long time, but I do have an idea. (Maybe not so efficient)

    1: Create a List<String> when the plugin starts. And each time a player joins/leaves, use PlayerJoin/LeaveEvent to add/remove.

    2: When a command is issued, you can use the player name in the list to mute them one by one (not efficient enough I think) and unmute means unmute them 1 by 1.

    If OPs can talk, you can add an 'if' to bypass operators.

    That's pretty much what I can do so far.
     
  5. TheBlackHamood

    TheBlackHamood Feel Pain, Accept Pain, Know Pain

    Messages:
    3,709
    Likes Received:
    2,032
    Minecraft:
    twista_17 & _Hamood
    lol thats wat i tried at first
     
    ItsLucas likes this.
  6. ItsLucas

    ItsLucas Agent V | Veigar Donator

    Messages:
    489
    Likes Received:
    261
    Minecraft:
    ItsLucas
    Then what happened?
     
  7. TheBlackHamood

    TheBlackHamood Feel Pain, Accept Pain, Know Pain

    Messages:
    3,709
    Likes Received:
    2,032
    Minecraft:
    twista_17 & _Hamood
    didnt happen
     
    ItsLucas likes this.
  8. Gibpil

    Gibpil I know you love meh

    Messages:
    156
    Likes Received:
    20
    Minecraft:
    Blastertron221
    The plugin is MaxBans
     
  9. TheBlackHamood

    TheBlackHamood Feel Pain, Accept Pain, Know Pain

    Messages:
    3,709
    Likes Received:
    2,032
    Minecraft:
    twista_17 & _Hamood
    i dont steal plugins
    i make them
     
  10. TheHolyRobber

    TheHolyRobber Donator

    Messages:
    1,115
    Likes Received:
    739
    Jerry and Harry don't use MaxBans.
    I can make a plugin, @TheBlackHamood , and send it to you.
     
  11. TheBlackHamood

    TheBlackHamood Feel Pain, Accept Pain, Know Pain

    Messages:
    3,709
    Likes Received:
    2,032
    Minecraft:
    twista_17 & _Hamood
    i can actually make the plugin myself, i only needed help
    but any help would be cool