Spigot ChatPhrases 1.1.0

A simple plugin that allows developers and server owners to standardise common phrases.

  1. ChatPhrases currently requires Bukkit/Spigot version 1.7.2 or later.

    ChatPhrases is a very simple plugin. Instead of developers having to make sure they use the correct formatting and wording every time they write something that is sent to chat, it gives them(the developers) the ability to define phrases to use throughout their plugins. This allows for easy reuse of commonly used phrases.

    But it also gives server owners the ability to specify their own phrases, which can be used by plugins. By simply specifying a phrase in the config.yml file, they can make some of the more commonly used phrases the same, no matter what plugin is being used at the time, as long as it has support for ChatPhrases.

    Support documentation(including installation instructions) can be found on the ChatPhrases Wiki.
    • Ability for developers to use this plugin to standardise common phrases.
    • Ability for server owners to specify global phrases that can be used by plugins.

    Development Documentation:
    Development documentation can be found on the ChatPhrases wiki on github.

    To request a feature, please post in the resource discussion. If you experience any issues, please check the wiki before requesting support in the resource discussion
    #1 TehGuy, Jan 16, 2014
    Last edited: Feb 23, 2014
  2. TehGuy updated ChatPhrases with a new update entry:

    Changed the way getPhrase() works

    Read the rest of this update entry...
  3. TehGuy updated ChatPhrases with a new update entry:

    ChatPhrases now stable

    Read the rest of this update entry...
  4. Thanks for this! This has finally made my programming easier and really helped dev's too! I could never make my mind up on how I wanted something to look, so they now just put in the ChatPhrase and I can change it how I want :)

    Thanks again :)
    • Like Like x 1
  5. I've been working on adding some new features recently and I think it's about time I began to show them off.

    Version 1.1 will be introducing variables into ChatPhrases.

    Variables can be defined by putting two % symbols into the phrase contents, and then writing the variable name between them. For example: "%this_is_a_variable%". When you call the phrase, you can then pass a Map structured in the following way:
    Code (Text):
    Map<String, String> variables = new HashMap<String, String>();
    variables.put("this_is_a_variable", "This is a variable!");
    "variable_name" is what you put between the % symbols when you created the phrase. "phrase_content" is what the %variable% will be replaced with. DO NOT use %b% as a variable name as it is used to separate the variable id and content in the config.yml file.

    You can use colour and formatting codes in variables as the formatting is parsed after the variables.

    Version 1.1 will deprecate the following methods:
    • getLocalPhrase(phrase_id) Please use getLocalPhrase(phrase_id, map_of_variables)
    • getPhrase(phrase_id, backup_phrase_id) Please use getPhrase(phrase_id, backup_phrase_id, map_of_variables)
    These methods will be removed in an update in the near future!

    Support for usage of %b to split phrase_id and phrase_content in the config.yml file will be dropped in 1.1! Anyone still using this syntax will experience errors when using version 1.1, please use %b% instead.

    I hope you guys like the sound of this. It is unlikely much else will be implemented into 1.1 as I would like to work on a major code clean up for version 1.2.
    #8 TehGuy, Feb 12, 2014
    Last edited: Feb 15, 2014
  6. Some more new features!

    Version 1.1 will be introducing phrase fallback

    When using getPhrase(), and the specified global phrase can't be found, the plugin a looks for the local phrase specified for backup. But what happens if that can't be found? Currently, an error message is returned. But this could be a bit messy and offer no consolidation.

    If no phrase and backup phrase can be found, the requested_phrase_id value is shown. If the phrase has been named adequately, it should display enough information for the person reading it to comprehend what was meant to be displayed.

    Version 1.1 will add the following options to the config.yml file:
    • phrase-fallback This will be a boolean(true/false) value. The default value is true.
    • error-message This will be a string. This is the error message that will be displayed to the user. The default value is "The requested phrase could not be found!"
    #9 TehGuy, Feb 15, 2014
    Last edited: Feb 22, 2014
  7. TehGuy updated ChatPhrases with a new update entry:

    ChatPhrases Version 1.1.0

    Read the rest of this update entry...
  8. I'm currently working on a much improved version 2.0 of this plugin, and I was wondering if anyone had any features they would like to request from this plugin.

    Thanks :)
    • Like Like x 1