Advanced Messages Mode

Tutorial

Important: Please read the instructions extensively because this is not as simple as the normal mode

What is the Advanced Messages Mode?

You can define the text for special groups and players.

A short list:

  • Define more than one message. One of them is selected by chance
  • Show special messages for players who were offline for a particular period
  • You can replace the normal world names (like world12_nether) with any text you want
  • Random mode: Chooses one message from any possible message

How to activate

It's quite easy. You only have to change "enabled" under "advancedmessages" in the config.yml to true

advancedmessages:
  enabled: true

Note: messages.txt is not important anymore if Advanced Messages Mode is enabled!

Configuration

Recommended: Something like Notepad+ or WordPad

You need Vault to use this!

After you activated the Advanced Messages Mode and restarted the server, PLM will create two new files. PLM.yml saves some information but is not relevant for you. We should focus on AdvancedMessages.yml. (If you deleted the content and want to restore it, change "firstenabled" in PLM.yml to false and restart the server. Or just delete it and use /plm reload)

This may seem a little bit confusing at the first look. There are 4 "big" points: Groups, Default, players and World names. The last point is only additional and not important for the messages, only for %world.

PLM follows this order:

  1. Special section for a player Note: Only use small letters! E.g.: "TestPlayer" -> "testplayer"
  2. Group section
  3. Default section
  4. Standard message (the usual yellow message)

It skips a point if it cant find a convenient path or message.

Normal join and quit case

  • JM1: Your join message
  • JM2: Your second join message
  • JM3: ...
  • QM1: Your quit message
  • QM2: ...

In this case a random number will decide which message is shown. There is no limit for more messages. But: If one number is missing, the following numbers will be ignored

The same for QM(number): text...

Back Messages:

If you want a special message when a player returns after a certain period you can use BM(number): text...

The second part is BM(the same number here)T: The time in minutes Example:

  • BM1: Peter is back after more than one hour
  • BM1T: 60

A positive number means anything bigger than this number. A negative number the opposite case. The message "Peter is back after more than one hour" will appear when he joins again after more than 60 minutes.

  • BM2: Peter is back!
  • BM2T: -60

-> This message appears when he came back after less than one hour

First message:

If one of your standard join message contains %time you should have a look at FM. This means "first message" and is used if a player hasn't been registered yet. %time would be over 500 months which looks very strange

Note: The back message is always used when it's possible and then PLM will use the normal join message (JM1:...)

  • Short form: FM1: (text...)

This will be used if a player has never logged out before. This can be useful if your normal join message contains %time which needs the last logout. For example your normal message is: "%chatplayername &2joined the game after %time". In FM1 you could write the same without %time. You can use more than FM here as well with FM1: ..., FM2:...

Welcome message:

  • Short form: WM1: (text...)

This new option gives you the possibility to send a joining player an additional message. This is completely seperate and does not replace the normal join message. This is useful if you want to welcome a special player, players who are in a special group or anybody else. Just add it under Default, a group or a player. The numbers behind WM are now for using more than one line. Example with two welcome messages:

  • WM1: '&aWelcome back, %playername!'
  • WM2: '&aYour last visit is %time ago'

You can use all the placeholders here as you can do it with normal join and quit messages.

If you have too many messages for example created by Essentials and you want that these messages are always under them you can try to modify the delay. The normal delay is 200ms in the config.yml file. You can change it under "Welcome messages" and "delayms".

Public message:

  • Short form PM1:(text...)

This message/these messages are for the other players on the server. This can be very useful if you want to inform players that a special player joined. For example if you want that every player gets a message that a moderator joined who is able to help anybody:

  • PM1: '%chatplayername is now here to answer your questions'

You can use more than one message, too. Just add PM2, PM3, ...

Another thing: Define who will see this message! First of all you have to set "usepermissions" under "Public messages" in the config.yml to true. Now nobody will see this message and you can add a permission to the group/player who should see it. You can do this in different ways:

  • plm.pm makes him see every public message
  • plm.<groupname> makes him see the public messages which were triggered by a joining player who is in this group
  • plm.<playername> same like group but with a special player

Command:

  • /plm reload (permission: plm.admin)

Reloads the AdvancedMessages.yml file but NOT the config. To change the mode you must restart your server!

Very important! Please use ' to clasp your text. Example '&eplayername joined the game' &eplaye...

Don't forget to set two ' !

Examples

This example is in "AdvancedMessages.yml" after the first activation of Advanced Messages Mode, too.

Default:
  JM1: '%chatplayername &ejoined the game'
  QM1: '%chatplayername &eleft the game'
Groups:
  examplegroup:
    JM1: '&4Admin %playername joined the game'
    QM1: '&4Admin %playername left the game'
    BM1: '&4Admin &a%playername is back after more than one day!'
    BM1T: '1440'
    BM2: '&4Admin &a%playername is back after some hours'
    BM2T: '60'
    BM3: '&4Admin &a%playername is back after less than one hour!'
    BM3T: '-59'
    CH: Messages, Information
players:
  exampleplayer:
    JM1: '&6The king Peter &2joined the server!'
    QM1: '&6The king Peter &2left the server!'
    JM2: '&2Our premium player Peter logged in!'
    QM2: '&2Our premium player Peter is now offline!'
  exampleplayer2:
    JM1: '&aThis is the public join message'
    QM1: '&aThis is the public quit/leave message'
    WM1: '&eThis message is for the player who is joining'
    WM2: '&2This would be another line just under WM1'
    PM1: '&eThis is a message for the other players on the server.'
    PM2: '&aYou can create more than one here, too'
World names:
  exampleworld: main world

Any questions? Ask me here using the comment function! I'm happy about any feedback! There are some ideas left but I don't know what is needed. If you have something to add, contact me!

In case of any problems create a ticket.

Error Prevention

Plm uses Bukkit's YamlConfiguration (.yml) because it's easy to read and easy to use (as a developer). There are some errors which can be triggered by wrong usage. To prevent such cases, follow these rules:

  • Use a program like Notepad+'+ BUT:
    • Pay attention if you start a new paragraph! Never use TAB, only blanks!! Notepad+'+ does this automatically! Delete the TAB and use blanks. Otherwise you'll get an error
  • Use ' to surround your text. This makes the program ignore any special characters
  • If you copy files for example from mac to windows, pay attation that no file is 'read-only'

Comments

Posts Quoted:
Reply
Clear All Quotes