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.
@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).
For future reference, here's the rule algorithm from the source of Grammar.jar: Code: @EventHandler 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) { return; } if (fromConfig.size() == 0) { return; } 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 + "."; } event.setMessage(msg); } config.yml Code: replacements: - cant/can't