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

    Juze

  3. Offline

    FrozenBrain

  4. Offline

    Juze

    Just one more request, add the plugin version number in download link and latest build in post. :p
     
  5. Offline

    FrozenBrain

    ... done ^^
     
  6. Offline

    DeaGato

    You can only change the notifications or even eliminate them?
     
  7. Offline

    FrozenBrain

    You can (almost) eliminate them by setting an empty string ( '' ) as the value of a node.
     
  8. Offline

    DeaGato

    Yes, I know. However remains an empty line.
     
  9. Offline

    FrozenBrain

    That should be easy to fix. Give me a few minutes.
    Done, see first post.
     
  10. Offline

    DeaGato

    Oh, lol, i love you. xD

    Thanks very much.
     
  11. Offline

    DannyLAGZLOL

    hey this is really neat, just tested and got it working, do you think you can add colours?
    id like to use some since its all white :(

    thanks

    EDIT: Awee :[ i see nevermind.. it in ur TODO: list
     
  12. Offline

    DeaGato

    See TODO... u.u
     
  13. Offline

    FrozenBrain

    Adding colors is already on top of my todo list.

    No problem.
     
  14. Offline

    DannyLAGZLOL

    Yes i see, i re-edit my post, sorries

    see EDIT: L_L

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

    Taemera

    Can you change the [Server] ('say' command in console) whenever the console "talks"?
     
  16. Offline

    FrozenBrain

    Never mind. Version 0.12 is up and supports colors.

    It should be possible, yes. Added this to the todo list.
     
  17. Offline

    PatrickFreed

    Hmmm
    Does the ban and kick things only apply to the basic /ban and /kick, or will it work with Commandbook bans?
     
  18. Offline

    spunkiie

    great stuff
     
  19. Offline

    DeaGato

    Awesome. Again... Thanks very much.
     
  20. Offline

    FrozenBrain

    They should work with commandbook, haven't tested that yet.


    Thanks!
     
  21. Offline

    PatrickFreed

    Then I will :)
    (I'll edit this post with results)
     
  22. Offline

    FrozenBrain

    Sorry, I can't find a way to do this :/ It seems that there's no event that is called when you type in the say command so I can't change the message without editing the source of craftbukkit.
     
  23. Offline

    DeaGato

    You can add support to the letters with the accent?

    I am Italian and a lot of messages containing the letter 'è'.
     
  24. Offline

    Taemera

    Thanks a lot! Too bad ;)

    Brilliant plug-in.
     
  25. Offline

    FrozenBrain

    Thanks.

    I can use special chars without any problems.
    Pwnèd by ädmin:
    [​IMG]

    What happens if you try using them?
     
  26. Offline

    DannyLAGZLOL

    Not a BIG idea, but maybe add to the todo list, Time/date support? So it can create a log of who & when joined & when someone got banned, just for griefer purposes and times members join my server?
     
  27. Offline

    FrozenBrain

    Your server should be logging this already.
    For example:
    Code:
    2011-04-17 12:35:36 [INFO] Banning FrozenBrain
    So I don't quite understand what you mean, sorry.
     
  28. Offline

    DeaGato

    My config.yml:
    Code:
    KICK_FULL: 'Il server e pieno!'
    PLAYER_QUIT: '&9%pName &fsi è disconnesso.'
    KICK_WHITELIST: 'You are not white-listed on this server!'
    KICK_KICK_LEAVEMSG: %pName e stato espulso dal gioco.
    KICK_KICK_REASON: Espulso dall'Admin
    PLAYER_JOIN: ''
    KICK_BANNED: 'Sei stato bannato da questo server!'
    And error:
    Code:
    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
            at org.yaml.snakeyaml.reader.StreamReader.checkPrintable(StreamReader.ja
    va:68)
            at org.yaml.snakeyaml.reader.StreamReader.update(StreamReader.java:159)
            at org.yaml.snakeyaml.reader.StreamReader.peek(StreamReader.java:117)
            at org.yaml.snakeyaml.reader.StreamReader.peek(StreamReader.java:106)
            at org.yaml.snakeyaml.scanner.ScannerImpl.scanToNextToken(ScannerImpl.ja
    va:964)
            at org.yaml.snakeyaml.scanner.ScannerImpl.fetchMoreTokens(ScannerImpl.ja
    va:237)
            at org.yaml.snakeyaml.scanner.ScannerImpl.checkToken(ScannerImpl.java:18
    3)
            at org.yaml.snakeyaml.parser.ParserImpl$ParseImplicitDocumentStart.produ
    ce(ParserImpl.java:200)
            at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:163)
            at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:148)
            at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:104)
    
            at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseCons
    tructor.java:124)
            at org.yaml.snakeyaml.Yaml.load(Yaml.java:264)
            at org.bukkit.util.config.Configuration.load(Configuration.java:73)
            at org.bukkit.plugin.java.JavaPlugin.initialize(JavaPlugin.java:158)
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j
    ava:138)
            at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.
    java:158)
            at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager
    .java:106)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:84)
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:215)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:202)
            at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:142)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:257)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
     
  29. Offline

    Spysical

    Multi message support?
    Like:
    <name> got kicked from the server
    or
    You've been kicked from the server <name>
    so it would display one of those messages.
     
  30. Offline

    FrozenBrain

    You've removed the quotation marks in KICK_KICK_LEAVEMSG.

    Try this:
    Code:
    KICK_FULL: 'Il server e pieno!'
    PLAYER_QUIT: '&9%pName &fsi è disconnesso.'
    KICK_WHITELIST: 'You are not white-listed on this server!'
    KICK_KICK_LEAVEMSG: '%pName e stato espulso dal gioco.'
    KICK_KICK_REASON: Espulso dall'Admin
    PLAYER_JOIN: ''
    KICK_BANNED: 'Sei stato bannato da questo server!'
     

Share This Page