Discussion in 'Plugin Requests' started by PieCreeper12, Mar 24, 2019.

Thread Status:
Not open for further replies.
  1. Offline


    I would like a plugin that automatically makes chat messages from players grammatically correct. For example, the first letter of a chat message is always capitalized and the sentence always ends with a period. Also, words that should have apostrophes will be given apostrophes such as the word "cant" turning into "can't". Sentences with little to no grammar bug me for some reason.
    insanj likes this.
  2. Offline


    What version of MC?
  3. @PieCreeper12
    Hi, I made the plugin for you.
    It has a config so you can choose what and how to fix.
    Supports Minecraft Version 1.13.2.
    If you would like to have it for a different version please let me know.
    You can download the plugin from here (updated).
    Last edited: Apr 3, 2019
  4. Offline


    For future reference, here's the rule algorithm from the source of Grammar.jar:

      public void onAsyncPlayerChatEvent(AsyncPlayerChatEvent event)
        String msg = event.getMessage();
        msg = msg.substring(0, 1).toUpperCase() + msg.substring(1);
        List<String> fromConfig = this.plugin.getConfig().getStringList("replacements");
        if (fromConfig == null) {
        if (fromConfig.size() == 0) {
        for (String s : fromConfig) {
          if (s.contains("/"))
            String[] split = s.split("/");
            if (msg.contains(split[0])) {
              msg = msg.replaceAll(split[0], split[1]);
        if (msg.lastIndexOf(".") != msg.length() - 1) {
          msg = msg + ".";
     - cant/can't
    tkuiyeager1 likes this.
  5. Offline

    timtower Ninja on the waves Moderator

    @insanj And why was it posted?
  6. @PieCreeper12 I fixed a bug where if the first word should be replaced it wouldn't replace her.
Thread Status:
Not open for further replies.

Share This Page