-
Notifications
You must be signed in to change notification settings - Fork 40
Message System
With SimpleServer 8.3 a new great feature comes to all users. The improved message system.
The new message system directly controls every sent chat message inside SimpleServer and is no longer depending on the chat system of vanilla. (or whatever server you use in the backend) This allows SimpleServer to bring some neat features to you and can slightly increase the performance since no chat packets have to take the turn through another server in the background.
Basically you can use the chat as before. Just write and get messages as you always did. Some of you may have used special chat features like the localChat or privateChat before. But now the whole message system is based on different chat forms and you can switch between them.
The list below contains all current chat rooms, their according command (and standard alias with omitted arguments) and a short description.
-
GlobalChat,
/global MESSAGE, chat with all online players -
PrivateChat,
/tell PLAYER MESSAGEor/t, chat with only one player -
LocalChat,
/local MESSAGEor/l, chat with all players in a certain range around you (default is 30 blocks) -
GroupChat,
/group [GROUP_ID] MESSAGEor/g, chat with all members of a group, e.g. all admins (your own if not specified) -
AreaChat,
/area MESSAGEor/a, chat with all players in the same area -
DimensionChat,
/dimension [DIMENSION] MESSAGEor/d, chat with all players in a certain dimension (your current if not specified)
Of course the sender itself can see each sent message regardless of whether he or she would match the filter condition. (so if you're on Earth and use /d Nether How's it going down there? you youself of course can see the message as well as everybody in the Nether)
Sometimes you want to use a special chat room over longer time for multiple consecutive (or nearly consecutive) messages. Therefor we added the possibility to change the standard chat room (we also say chatMode). By default every player starts in the GlobalChat room when he joins the server. That means that every message he normally sends in the chat is sent as if he would have written /global MESSAGE.
With the new /chat CHATMODE command you can change that behaviour to every existing chat room. The /chat command can be used in the following ways:
/chat global/chat private PLAYER/chat local/chat group [GROUP_ID]/chat area/chat dimension [DIMENSION]
As intuitively clear it changes the chatMode to the according chat room explained above. After changing the chatMode every message is only sent to the players that matches the filter the selected chat room applies. (so after a /chat private sadimusi only sadimusi will get your further chat messages)
Of course you still can (and should) use the direct chat room commands to sometimes send messages to other groups of players or even all players (that's why there is the /global command, that might appears a bit stranely at first view)
This new command is kind of a improved /localtoggle which we removed with 8.3 since it's no longer needed.
Don't forget that there still are the time saving /reply and the nice /me commands:
-
/reply MESSAGEor/r MESSAGE, reply to the last private message you recieved -
/me MESSAGE, send a message to your current chatRoom that gets prepended by ' * YOURNAME '
Note that if the message for the /me command starts with a ' like in 's going to bed now the first space after your name is automatically omitted. You can even change the output format of the me command by changing the meCommandFormat property in config.xml. More about that below.
SimpleServer now by default logs chat messages into a logfile in the logs-Folder. You can disable this feature with the logMessages property in config.xml. Get more information about further configuration below.
Since chat messages are no longer sent to the vanilla server they won't be visible in the server console or the server log. Additionally you don't have access to chat messages over plugins you may have installed on your backend server.
If you only want to see chat messages in the server console, you can set the chatToConsole to true. However it might be possible, that you need the chat to go through the backend server.
For that reason we implemented a neat method that lets chat messages circulate through the backend server and recognizes them again if they come back to suppress their broadcast to all players (since they were already sent through SimpleServer itself). You can enable this feature with the forwardChat property in config.xml. Get more information about further configuration below.
- A whole new mail system (kind of chat with players that don't have to be online when the message is sent) with multiple mailtypes, each with different behaviour regarding notification method, storage time, display method and others
There are also some properties in the config.xml that let you configure the whole messageSystem.
-
logMessages, enable or disable message logging -
logMessageFormat, the format of the logged messages -
chatToConsole, display chat messages in the server console -
forwardChat, enable or disable chat forwarding to the backend server -
msgForwardFormat, format of the forwarded messages -
localChatRadius, radius in blocks in which local messages can be heard -
msgWrap, warp chat messages to nicely fit in the chat window -
useMsgFormats, format global chat messages specially -
msgFormat, format for normal global messages -
msgTitleFormat, format for global messages with displayed group name -
meCommandFormat, format of messages sent by the /me command
The message formats are normal java format strings that are directly used by SimpleServer. Due to the storing format (xml), special characters have to be escaped (e.g. < goes < , > goes > and § goes \u00a7).
Those formats make use of placeholders like %1$s, %2$s_ and so on. The integer is the identifier to which we refer in the following section listing the different parameters that belong to each placeholder of a special property:
-
logMessageFormatis by default%1$s->%2$s: %3$swhere the parameters are sender name, detailed chat room (e.g. a playername, a groupId or a dimension name like 'Nether'), message -
msgForwardFormatis by default%2$s, where the parameters are detailed chat room, message -
msgFormatis by default§%3$s<%1$s>§f, where the parameters are sender name, group name, group color (the message is appended afterwards) -
msgTitleFormatis by default§%3$s<[%2$s]%1$s>§f, where the parameters are the same as inmsgFormat -
meCommandFormatis by default* %1$s%3$s%2$s, where the parameters are sender name, message, a whitespace (or nothing if the message start with an apostrophe)