Inactive [ADMN] MessageChanger v1.01 - Change the server's default messages [953]

Discussion in 'Inactive/Unsupported Plugins' started by FrozenBrain, Apr 17, 2011.

  1. Offline

    FrozenBrain

    MessageChanger - Change the server's default messages
    Version: v1.01
    CraftBukkit Build: 953


    [​IMG]

    This simple plugin allows you to change the server's default messages to whatever you want.

    Features:
    • Change the server's default messages
    • Use different messages for different worlds, groups and users
    Download MessageChanger v1.01
    Source Code
    [​IMG]

    Configuration:
    Show Spoiler

    MessageChanger 1.00+ works side-by-side with Permissions 3. That means, that you'll have to add some keys to your permissions files.

    Example (groups.yml):
    Code:
        Default:
            default: true
            info:
                prefix: ''
                suffix: ''
                build: false
                messageChanger:
                    KICK_KICK_REASON: '&4Pwned by admin'
                    KICK_FULL: '&eThe server is full, sorry.'
            inheritance:
    Easy as that. Just add a new node called "messageChanger" as a child of the "info" node of either a group or a player. Then add the following keys as childs of the new node:
    Code:
    Key			+ You get the message if ...
    ------------------------+-----------------------------------------------------------
    KICK_FULL		+ The server is full.
    KICK_WHITELIST		+ you're not white-listed.
    KICK_KICK_LEAVEMSG	+ you get kicked (everybody can see this in the chat).
    KICK_KICK_REASON	+ you get kicked.
    PLAYER_JOIN		+ you join the server (everybody can see this in the chat).
    PLAYER_QUIT		+ you leave the server (everybody can see this in the chat).
    KICK_BANNED		+ you're banned from the server.
    SERVER_STOP		+ the server is shutting down (use '' or '%msg' for the usual error message).
    If you need help, feel free to ask :)

    Wildcards:
    %pName - the player's name
    %msg - the original message

    If you want to use colors, use the color codes &0 - &f (click me).


    Todo:
    • Add support for multiple colors - Done!
    • Different messages per group - Done!
    • Stop sending an error to the clients when stopping the server (send a custom message instead) - Done and fixed!
    • Add more wildcards (request some :) )
    Changelog:
    Version 1.01
    • Fixed an NPE
    Version 1.00
    • MessageChanger is now working side-by-side with Permissions 3
      • You have to reconfigure the plugin, read the "Configuration" part above!
    Show Spoiler

    Version 0.24
    • Updated for Minecraft 1.6.6 (CraftBukkit b818)
    • SERVER_STOP is now working correctly, yey!
    Version 0.23
    • Added support for other chat related plugins (needs testing)
    • Updated for CB 803
    Version 0.22
    • Fixed PLAYER_QUIT
    • Updated for CB 733
    Version 0.21
    • Added SERVER_STOP
    Version 0.20
    • Multiworld support
    • Permissions support
    • Added the '%msg' wildcard (see above)
    Version 0.12
    • Added support for colored messages
    Version 0.11
    • Remove messages completely (simply by setting them to '')
    Version 0.1
    • First public release

    Have fun :)
     
  2. Offline

    DeaGato

    It still does not work.

    18:53:38 [GRAVE] Could not load 'plugins\MessageChanger.jar' in folder 'plugins':
    unacceptable character #FFFD special characters are not allowed in "<reader>", position 60
     
  3. Offline

    FrozenBrain

    Please make sure that the file is not an ANSI encoded file, but an UTF-8 encoded file. You can check that with Notepad++ for example.

    If I chose ANSI as the charset I get the same error.

    However the plugin should create a config.yml in the UTF-8 format.
     
  4. Offline

    DeaGato

    Ok, now it works perfectly.
     
  5. Offline

    spunkiie

    works with pt-br deadkeys also.
     
  6. Offline

    renxwar

    Can you add something like why the server is down or something like that? Like a configurable mask for Connection Lost: Disconnected?
     
  7. Offline

    Kahl

    I only want to change what it says when someone joins and when someone leaves. Is there a way to only make this work for them? (With this, it always says kicked by admin and the reasons for being kicked do not show, for example).

    Is there a way to only change what it says on the joining and leaving events?
     
  8. This is very very epic :D One feature request, that you have different messages per group. ;)
     
  9. Offline

    FrozenBrain

    If the server is down, the plugin isn't running so it can't send any messages.
    Maybe this can help you: http://forums.bukkit.org/threads/ad...server-can-say-gone-fishin-back-in-five.8814/

    If you want a message to be hidden, just set it to '' (an empty string).

    Good idea, added this one to my todo list.
     
  10. Offline

    xPaw

    Cool idea!

    Can't you just use event.setKickMessage instead of event.disallow?
     
  11. Offline

    FrozenBrain

    You're right. I'll change that in the next update.
     
  12. Offline

    DeaGato

    A good idea would be to add an option to "debug". If activated shows the code used in the message file. yml.

    For example:

    [KICK_FULL] The server is full.
     
  13. Offline

    FrozenBrain

    Why don't you just add the prefix to the actual message?
     
  14. Offline

    DeaGato

    Why is an idea, I don't need. xD
     
  15. Offline

    Sabinno

    I have recently discovered what MIGHT be an issue.
    When I attempt to configure colors not in chat, one of two things happen.
    For the kick reason and ban message, adding a color at the beginning sends a severe console error and does not load the plugin.
    For whitelist and full server message, the config.yml file deletes the first word of the message, e.g. "&cContact me!"
    The file would remove "&cContact".
    Catch my drift? Anyways, could you explain/fix this issue?
    Thanks in advance!
    -Sabinno-
     
  16. Offline

    Kahl

    I did this but it completely hides it. I do not want it hidden, I want the message to be its default. For example, when my server auto-restarts it sends a message "Server is restarting, connect back in a minute", yet when I kick people I can send a different message.

    With setting this to '' it doesnt send a message for either of these two cases that I normally have no problem with.

    Could you make it so that it only affects the events that we leave in the config? Because I only want to alter the 2 lines of code, and get rid of the rest.
     
  17. Offline

    Johnnyszs

    I'm still confused on how to do colors. Does the &___ go before the quotation? I would think so because otherwise I get an error message. But It still doesn't work. The text works fine. The colors don't... Here is my config.yml:

    Code:
    KICK_FULL: Ouch! The parties full. Too bad! &4
    PLAYER_QUIT: Goodbye &e%pName! Hope you enjoyed your stay!&3
    KICK_WHITELIST: Apparently I have a whitelist, and you are not on it!&c
    KICK_KICK_LEAVEMSG: Wow &e%pName. You were kicked!&0Pwnt by op.&4
    KICK_KICK_REASON: You were kicked.&0 Pwnt by op.&4
    PLAYER_JOIN: Hello &e%pName! Do not do anything stupid.&1
    KICK_BANNED: 'You are banned from this server! Pwnt by op.&0 '
    
    Like I said, the text works fine, even without the quotations... No color.

    EDIT: I realized that the &e%pName was causing the yellow, so I changed that to &1%pName and it was blue! Thanks, good plugin.
     
  18. Offline

    qrux

    Could you add a message that displays instead of "Server Outdated"? Now that 1.5 is released, i get a lot of people asking me why they can't log into the server.
    Thanks!
     
    emoknight likes this.
  19. Offline

    FrozenBrain

    Ok, this will be fixed in the next version.

    That's not possible, sorry.
     
  20. Offline

    FrozenBrain

    Here we go: Multiworld and Permissions support. You can find an example config.yml in the first post.

    Added a new wildcard ('%msg'). This should help you :)
     
  21. Offline

    DeaGato

    It also works with #689 (1.5_02). Good Work.
     
  22. Offline

    FrozenBrain

    Thanks :)

    Update:
    Added SERVER_STOP message. If you set this to anything but '' or '%msg' the plugin kicks players with the specified message before the server stops. This does not work if the server crashes.

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

    grandwazir

    I've noticed that when using this plugin it will overwrite any given kick message with the one in the file. For example if I kick everyone from the server before I shut down, even though I give a reason the plugin will replace it with the one in the file.

    Is there anyway to avoid this?
     
  24. Offline

    FrozenBrain

    You can use %msg as a wildcard for the reason you give.

    Example:
    If you kick someone with the reason "haha" and define KICK_KICK_REASON as '%msg - cya' then he'll be kicked with the reason 'haha - cya'.
     
  25. Offline

    grandwazir

    Ah I see. I'll do that. Thank you.

    This isn't working on my server. What actually appears is '%msg - cya' when I kick myself.


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

    DeaGato

    I'm trying it on #693.
     
  27. Offline

    grandwazir

    My fault - forgot to actually update the plugin. Works fine.
     
  28. Offline

    DeaGato

    Ok, it works on #693.

    Testing #697...

    Compatible with #697


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

    ScottSpittle

    on CB 707 it kicks people when i use /reload to reeload server.. and the quit messages dont work.. it uses default
     
  30. Offline

    Graindcafe

    That's great !

    Does your mod handles accented characters ? Like é,è,à,...
     
  31. Offline

    Soxra

    I think it does :) For me its working.
     

Share This Page