[CHAT] PlayerStatus v2.6 - /afk /dnd /nomsg /nochat /ignore /mute [1337]

Discussion in 'Inactive/Unsupported Plugins' started by ZachBora, Sep 25, 2011.

  1. Offline

    ZachBora

    PlayerStatus - /afk /dnd /nomsg /nochat functionalities

    Get the new version 2.4+ from BukkitDev here : http://dev.bukkit.org/server-mods/playerstatus/




    Version: v2.3

    This plugin allows players to set their status to AFK and/or DND. They can also disable chat messages received along with /me or disable private messages received.

    New in version 2! Fully configurable plugin Captions : Every messages can be configured in the config.yml file to your own language. Added /mute and /ignore.


    Usage:
    • /playerstatus : Displays the list of commands and your currently enabled statuses.
    • /playerstatus <name> : Displays the currently toggled functions of another player.
    • /afk : Sets your status as AwayFromKeyboard. This will add [AFK] in front of your name in chat and notify people sending you private messages.
    • /dnd : Sets your status as DoNotDisturb. This will add [DND] in front of your name in chat and notify people sending you private messages. You will still receive them.
    • /nochat : This removes for you every message people type in chat including /me. Messages from other plugins and server will still go through.
    • /nomsg : This will block private messages from the commands /msg and /tell.
    • /ignore <name> : Allows a player to ignore another one. Removes the ignored player from regular chat, from /me and from private messages. Only the player using /ignore stops seeing that player's messages. Ignored players aren't persistent.
    • /ignorelist : Displays the list of currently ignored players. Ignored players aren't persistent.
    • /mute <name> : Makes that person unable to speak in chat and to use /me. Muted players aren't persistent.
    • /playerstatuslang <language> : Allows to change the language file used. If language file is name "caption-french.yml" do /playerstatuslang french
    • /moderate : Mutes everyone except people with moderate permission. Useful when server gets out of control or to make big announcements. Players can still /msg and /tell.
    Permission Plugin :

    Tested with Permissions 2, should work on Permissions 3 and SuperPerms.

    Permission nodes :
    Show Spoiler
    /afk - PlayerStatus.afk
    /dnd - PlayerStatus.dnd
    /nochat - PlayerStatus.nochat
    /nomsg - PlayerStatus.nomsg
    /ignore - PlayerStatus.ignore
    /ignorelist - PlayerStatus.ignore
    /mute - PlayerStatus.mute
    /playerstatuslang - PlayerStatus.config
    /moderate - PlayerStatus.moderate


    Default Main Configuration :
    Show Spoiler

    # PlayerStatus configuration
    Language: english
    TimeBetweenAFKDND: '30000'
    TimeDisableDND: '5000'


    Default Caption Configuration :
    Show Spoiler

    # PlayerStatus Caption configuration
    AFKPrefix: '[AFK]'
    DNDPrefix: '[DND]'
    ErrDisableDND: 'You cannot disable DND this soon. Please wait %t% seconds.'
    ErrEnableAFK: 'You cannot go AFK this soon. Please wait %t% seconds.'
    ErrEnableDND: 'You cannot go DND this soon. Please wait %t% seconds.'
    ErrMsgFormat: 'Too few arguments. /msg <target> <message...>'
    ErrNoReply: 'Noone to reply to!'
    ErrSpecifyLanguage: 'Too few arguments. /playerstatuslang <language>'
    MsgAfk: '%player% is now AFK.'
    MsgCantMsgSelf: 'Can''t message yourself.'
    MsgCurrentlyIgnored: 'Currently ignored players :'
    MsgDisabled: 'Disabled'
    MsgDnd: '%player% is now DND.'
    MsgEnabled: 'Enabled'
    MsgHelpAfk: 'To toggle Away From Keyboard.'
    MsgHelpDnd: 'To toggle Do Not Disturb.'
    MsgHelpIgnore: 'To ignore someone.'
    MsgHelpIgnorelist: 'To list ignored people. The lists reset upon server restart.'
    MsgHelpNochat: 'To disable chat.'
    MsgHelpNomsg: 'To disable Private Messages.'
    MsgHelpPlayerStatus: 'To display status of that player.'
    MsgIgnoreSyntax: 'Syntax : /ignore <playername>'
    MsgModerationOff: 'The Chat is no longer moderated !'
    MsgModerationOn1: '!!ATTENTION The Chat is now moderated!!'
    MsgModerationOn2: 'Only allowed people can speak'
    MsgNoChatFalse: 'You are now seeing chat.'
    MsgNoChatTrue: 'You are no longer seeing chat.'
    MsgNoMsgFalse: 'You are now receiving messages.'
    MsgNoMsgTrue: 'You are no longer receiving messages.'
    MsgNotAfk: '%player% is no longer AFK.'
    MsgNotDnd: '%player% is no longer DND.'
    MsgNotPlayerIsIgnored: '%player% is no longer being ignored.'
    MsgPermissionDenied: 'Permissions Denied'
    MsgPlayerAlreadyMuted: '%player% is already muted. Use /unmute to unmute.'
    MsgPlayerIsAFK: 'Player %player% is AFK and might not receive your message!'
    MsgPlayerIsDND: 'Player %player% is DND and might not receive your message!'
    MsgPlayerIsIgnored: '%player% is being ignored.'
    MsgPlayerIsNoMsg: 'Player %player% is blocking all incoming messages!'
    MsgPlayerIsNotMuted: '%player% is not muted.'
    MsgPlayerMuted: 'You cannot talk you are muted.'
    MsgPlayerNotFound: 'Player %player% not found!'
    MsgPrivateFrom: '(From %player%):'
    MsgPrivateTo: '(To %player%):'
    MsgSetPlayerMuted: '%player1% was muted by %player2%.'
    MsgSetPlayerUnmuted: '%player1% was unmuted by %player2%.'
    MsgStatusOf: 'Status of'
    MsgTooManyPlayerFound: 'More than one player found! Use @<name> for exact matching.'
    PlayerJoin: '%player% joined the server.'
    PlayerQuit: '%player% left the server.'


    French Caption configuration : (French/Français)
    Show Spoiler
    # PlayerStatus configuration
    AFKPrefix: '[AFK]'
    DNDPrefix: '[DND]'
    PlayerJoin: '%player% s''est joint au serveur.'
    PlayerQuit: '%player% a quitté le serveur.'
    MsgPermissionDenied: Permissions refusées
    MsgHelpPlayerStatus: Pour afficher le statut de ce joueur.
    MsgHelpAfk: Activer Loin du clavier (AFK).
    MsgHelpDnd: Activer Ne pas déranger (DND).
    MsgHelpNomsg: Désactiver les messages privés.
    MsgHelpNochat: Désactiver le chat.
    MsgHelpIgnore: Ignorer quelqu'un.
    MsgHelpIgnorelist: Lister les personnes ignorées. La liste se réinitialise au redémarrage.
    MsgStatusOf: Statut de
    MsgTooManyPlayerFound: Plus d'un joueur trouvé! Utilisez @<nom> pour le nom exacte.
    MsgPlayerNotFound: Le joueur %player% n'a pas été trouvé!
    MsgCurrentlyIgnored: 'Liste des joueurs ignorés :'
    MsgEnabled: Activé
    MsgDisabled: Désactivé
    MsgNoMsgFalse: Vous recevez les messages.
    MsgNoMsgTrue: Vous ne recevez plus les messages.
    MsgNoChatTrue: Vous ne voyez plus le chat.
    MsgNoChatFalse: Vous voyez le chat.
    MsgNotDnd: '%player% n''est plus DND.'
    MsgDnd: '%player% est DND.'
    MsgNotAfk: '%player% n''est plus AFK.'
    MsgAfk: '%player% est AFK.'
    MsgNotPlayerIsIgnored: '%player% n''est plus ignoré.'
    MsgPlayerIsIgnored: '%player% est ignoré.'
    MsgSetPlayerMuted: '%player1% est devenu muet grace à %player2%.'
    MsgSetPlayerUnmuted: '%player1% n''est plus muet grace à %player2%.'
    MsgPlayerAlreadyMuted: '%player% est déjà muet. Utilisez /unmute pour qu''il ne le soit plus.'
    MsgPlayerIsNotMuted: '%player% n''est pas muet.'
    MsgPlayerMuted: Vous ne pouvez pas parler car vous êtes muet.
    MsgCantMsgSelf: Vous ne pouvez pas écrire à vous-même.
    MsgPrivateTo: '(à %player%):'
    MsgPlayerIsDND: '%player% est DND et ne recevra peut-être pas votre message!'
    MsgPlayerIsAFK: '%player% est AFK et ne recevra peut-être pas votre message!'
    MsgPlayerIsNoMsg: '%player% bloque tout les messages privés!'
    MsgPrivateFrom: '(De %player%):'
    ErrMsgFormat: Trop peu d'argument. /msg <joueur> <message...>
    ErrDisableDND: 'Vous ne pouvez pas désactivé DND sitôt. Attendez %t% secondes.'
    ErrEnableAFK: 'Vous ne pouvez pas activé AFK sitôt. Attendez %t% secondes.'
    ErrEnableDND: 'Vous ne pouvez pas activé DND sitôt. Attendez %t% secondes.'
    ErrNoReply: 'Personne à qui répondre!'
    ErrSpecifyLanguage: 'Trop peu d''argument. /playerstatuslang <langue>'
    MsgIgnoreSyntax: 'Syntaxe : /ignore <joueur>'
    MsgModerationOff: 'Le chat n''est plus modéré !'
    MsgModerationOn1: '!!ATTENTION Le chat est maintenant modéré!!'
    MsgModerationOn2: 'Seule les personnes autorisées peuvent parler'


    To-do list :
    • Remove "X was slain by Y" when /nochat is on Still need to set a config for this.
    • Make the main config file just the language and create config files for each language. Main config file will just contain the language filename. This people can switch language easily.
    • Add a cooldown on /afk and /dnd. I'm thinking 20sec to disable it and 10min to reenable. Will try to put that in a config.yml
    • Add /ignore command and /ignorelist. Will make it so OPs messages still work if someone ignores them.
    • Make /msg and /tell go through when sender is OP even if recipient has /nomsg.
    • Add command to remove login/logout messages or integrate it with /nochat.
    • Put a command to mute everyone except Admins. At the same time, add command to allow some people to speak. This will be used for intense discussion when server has too many people on. Mute people will received error message telling them to use /msg instead.
    • Allow channels and such. Channel creator will be allowed to /kick /ban /mute people from the channel. Might make this into a seperator plugin that will use some features of this one to work.
    • Add a config for events that disable /AFK : PlayerMove, Chat/Command. Also make other player unable to move you if possible.
    • Disable /AFK on PlayerMove. Also make other player unable to move you if possible.
    • Add a config to make AFKed player invincible (Will add this once I managed to prevent people from pushing players)
    • Add a config for timer on AFK. This to prevent people running in PVP from going AFK and being immortal instantly.
    • Make /reply or /r work once you've received a /tell or /msg
    • Add persistence to /ignore and /mute. For the other commands I'll have to think about it.
    • Put the colors inside the config file
    Changelog :
    Version 2.3
    • Reworked the way configuration files work. There is now a main configuration file (config.yml) to store the language and cooldown settings and other configuration file for captions based on the language.
    • Added /playerstatuslang to change the language used in-game.
    • Added /moderate command to mute everyone except people with the PlayerStatus.moderate permission
    • Fixed /r to allow to reply to whispers
    • Display a message when someone muted tried to use /me
    • Added a cooldown to disable /DND and another cooldown to enable /AFK and /DND.
    • Remove /AFK if the player speaks (doesn't remove if player whispers).
    Version 2.2
    • Replaced names displayed for the Name instead of the Displayname. (getDisplayName() -> getName()).
    • Removed Played slain messages. Need to set a config for this.
    Version 2.1

    • Fixed /nochat and /ignore.
    Version 2.0

    • Major code rewritten, thus version change. About 95% of the code was altered.
    • Added /ignore and /ignorelist
    • Added /mute
    • /nochat now hides login, logout and messages from players going Afk or Dnd
    • If a player with /op whispers a player with /nomsg, the whisper will still go through.
    • Made every messages configurable! Every text is now in the config.yml and can be edited to your own server language.
    • Added configuration for the caption of AFK and DND.
    • Added configuration for the displayed text when a player joins and leaves the game.
    Version 1.0

    • Initial release.
     
    rileyrazor1, Orcem12 and Butkicker12 like this.
  2. Offline

    BioRage

    Simple.
    Useful.
    /endthread
     
  3. Offline

    ZachBora

    I'm considering making the displayed "Player is now AFK" optional as people spam it...
    This being a new plugin I guess they'll get over it with time.
     
  4. Offline

    Butkicker12

    Cooldown? For the /afk
     
  5. Offline

    emericask8ur

    Good job! Add me on skype : emericask8ur I can help you with anything. just ask Butkicker xD
     
  6. Offline

    ZachBora

    Hmm, yes that could be a viable solution. I'll see how it goes.
     
    emericask8ur and Butkicker12 like this.
  7. Offline

    ZachBora

    The spam has relaxed and it's ok now. One thing I noticed now is the tons of login logoff. I'll disable that when I have time.

    I should have an update tonight or tomorrow that will include the /ignore and /ignorelist. I also added in there a /mute.

    Since I redid over 90% of the code I will make this version 2.0

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 20, 2016
  8. good plugin i need it if i am searching for new plugins for my server and evrybody is sending me messages;)
     
  9. Offline

    ZachBora

    Updated to version 2.0
    Changelog :
    Version 2.0

    • Major code rewritten, thus version change. About 95% of the code was altered.
    • Added /ignore and /ignorelist
    • Added /mute
    • /nochat now hides login, logout and messages from players going Afk or Dnd
    • If a player with /op whispers a player with /nomsg, the whisper will still go through.
    • Made every messages configurable! Every text is now in the config.yml and can be edited to your own server language.
    • Added configuration for the caption of AFK and DND.
    • Added configuration for the displayed text when a player joins and leaves the game.
     
  10. Offline

    Synful0ne

    Not sure if this was how it was meant to work but, Ignore/Nochat Does not work as it advertises as it only works with tell's and no errors appear to make me believe something is conflicting (Using MChat ) I was really hoping it would work for messages in general public and private but it seems it does not.
     
  11. Offline

    ZachBora

    I just tried it and it worked fine for me, can you tell me what version of MChat you're using?
    The one I tried is http://dev.bukkit.org/server-mods/mchat/files/7-mchat-b28/

    I found the bug, there was a wrong variable in the code. Updated to 2.1

    Changelog :
    Version 2.1

    • Fixed /nochat and /ignore.

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

    jenks1999

    just wondering if the /mute and /ignore commands are global or personnal? would be nice for players to have a personnal /mute or /ignore system for their own benifit but not effect everyone globally.
     
  13. Offline

    ZachBora

    That's why there's 2 commands. Mute is to be given to admins and affects everyone, /ignore is personal but they both reset at server /reload or restart.
     
  14. Offline

    hanky2007

    Um for some reason every time someone joins or leaves the server it says there full name with prefix/suffix/colour is there anyway to change it so its just there name no prefix/suffix with default join and leave colouring?
     
  15. Offline

    ZachBora

    What chat plugin are you using? I haven't tested with many of them, but I think I know what is causing this problem and how to fix it.

    A player has 2 properties to get their name : getDisplayName and getName. I put getDisplayName instead of getName. I will fix it in a moment.
     
  16. Offline

    hanky2007

    Um I'm using simpleprefix... but its not vary good... what would u recommend as a better one? and cool thanks for the reply that would be cool if u were to fix that, I really like your plugin and would love to keep using it :)
     
  17. Offline

    ZachBora

    Fixed it. I personally use iChat.

    Changelog :
    Version 2.2

    • Replaced names displayed for the Name instead of the Displayname. (getDisplayName() -> getName()).
    • Removed Played slain messages. Need to set a config for this.
     
  18. Offline

    hanky2007

    Ok thanks a lot ill try out 2.2 right now :) and thanks for the advice about ichat ill try that out
     
  19. Offline

    ZachBora

    I added the plugin source.
     
  20. Offline

    ZachBora

    Tested against Bukkit #1240
     
  21. Offline

    Kiim

    Useful, simpel and good plugin ;D

    But maybe made it able to get unlimeded heath then you are afk, so nobody can kill you :) And get AFK mode to unactivate when u move ?
     
  22. Offline

    ZachBora

    I hadn't thought of PVP servers. I'll put in the TTD to add a config for events that disable AFK on move, talk/execute command. I might also be able to make other people unable to push you.

    If someone has the configuration in another language I'll add it to first post.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 20, 2016
    Kiim likes this.
  23. Offline

    Hydrosis

    [SEVERE] Could not pass event PLAYER_COMMAND_PREPROCESS to PlayerStatus
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    at java.lang.String.substring(Unknown Source)
    at com.worldcretornica.playerstatus.ChatListener.onPlayerCommandPreprocess(ChatListener.java:132)
    at org.bukkit.plugin.java.JavaPluginLoader$5.execute(JavaPluginLoader.java:272)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:339)
    at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:750)
    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:722)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:715)
    at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:33)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:92)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:471)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
     
  24. Offline

    ZachBora

    Yeah I've noticed that on my server too... any idea what command was input? I'll be comparing my command log and server log tomorrow to see what happened.
     
  25. Offline

    Hydrosis

    The only command I let my players use is /ignore. I think that might be the part of the cause or something. It doesn't crash as soon as someone does it, but idk when, lol.
     
  26. Offline

    ZachBora

    Ok thanks, I'll investigate ignore.

    I managed to reproduce the error.
    If I only do /msg name
    without a message it produces it. There might be other occurrences but just with this I should be able to pin-point it.

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

    Hydrosis

    Ohhhh, that makes sense. I also forgot to mention the /r command doesn't work. Everytime I do it, it's as if no one messaged me.

    Also, do you think it would be possible to make the commands persistent in the future? I didn't see it in your To Do list, so I thought I'd bring it up :)

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

    ZachBora

    I tried to rework my configuration before going to bed but Bukkit won. I'm pretty sure the bug is fixed but I want to rework some of this before I release it and hopfully add more from the todo list.

    Yes I'll add /r to the list along with persistence. What you're interested in is persistence for /ignore and /mute or every command?
     
  29. Offline

    Hydrosis

    Mainly just ignore. I use commandbook for /mute (no offence lol).
     
  30. Offline

    ZachBora

    Yes I understand. I also use commandbook.

    This plugin overrides the /msg and /tell of commandbook, that's why it broke /r
    This is done to allow me to block the recipient from receiving a message if he has /nomsg and to send back a message to the sender when the recipient is afk or dnd.

    Now this reminds me think that I did not put permission nodes for /me, /msg and /tell...
    Initially those weren't supposed to be in the command list of my plugin but I had to override them to block their effect. I'll have to think about it and run some tests.
     

Share This Page