Beta Changes

Commands:

All message commands are now toggleable and resettable via their respective setting command, ex:
/cm join disable (disables your join message)
/cm quit psycowithespn reset (resets psycowithespn's quit message)
The same also applies to group and global messages

Toggleable messages:

All of the current messages are now toggleable. The system searches recursively through player, group, then global to see if a message should be displayed or not. If your message is disabled, it will show what level is disabled when you view the message via command. It will appear on the right in red, such as (GROUP DISABLED), letting you know that this person's group message is disabled, so his is as well.

Group Messages:

Group message support has been added. It requires Vault in order to function properly. You use the group messages in the same way as setting another players, such as '/cm join admins &2/name joined as an admin.' The group messages are stored in the plugins config.yml.

Permissions:

CustomMessages.firstjoin - Allows setting of the global firstjoin message
CustomMessages.join.group - Allows setting of group join messages
CustomMessages.quit.group - Allows setting of group quit messages

Developer API:

In order to allow your plugin to register a variable with CustomMessages, you need to add CustomMessages to 'softdepend: []' in your plugin.yml and you need to create a class that extends MessageVariable. In this class, you need to implement the handleMessage(String, Player) method. String is the message that is being passed by CustomMessages to your plugin and Player is the player triggering the message. This method is what allows your plugin to modify the message. The returned String from this method should be the inputted string modified by your plugin. After you do all of this, you need to create an instance of said class and call messageVariable.register(String) where String is the variable name that you want to register, such as '/world' or '/money'. This is all you really need to do to get a working custom variable.


Comments

  • To post a comment, please or register a new account.
Posts Quoted:
Reply
Clear All Quotes