Help with muting players for x amount of time

Discussion in 'Plugin Development' started by ThatGuyWhoDied13, Dec 8, 2013.

Thread Status:
Not open for further replies.
  1. Hey guys, I currently have a way of muting/unmuting players with a '/mute <playername>' commands and a '/unmute <playername>' but I want it so I can customize how long the mute is for e.g. '/mute <playername> <time in seconds>' but I can't work out how to do this. any help?

    Also with banning a player how would I go about banning them for x amount of days e.g. '/banpl <playername> <amount of days> <message of ban>

  2. Offline


    Put the names in a list and remove them with the "scheduleSyncDelayedTask" after a certain amount of seconds. If everything else is working, as you stated, this would be the only thing you'd have to add.
  3. felixfritz and set the delay as args[1] * 20L
    jthort likes this.
  4. Offline


  5. Does anyone know how to ban people for x amount of days
  6. Offline


    • Get the Servertime of the time you ban him
    • Save that time and add the time you want to ban him for
    • Kick him off the server if hes online
    • on playerloginevent check if player is banned
    • If he is banned get the server time and the time until he is banned
    • Check for that and then kick him again/cancel the event or unban him if time served
Thread Status:
Not open for further replies.

Share This Page