From d17de80a6a693649eb22cd2e64d2e7e4b8a4e0e1 Mon Sep 17 00:00:00 2001 From: Pepich Date: Tue, 7 Feb 2017 01:15:32 +0100 Subject: [PATCH] Made mentio case insensitive --- src/com/redstoner/modules/mentio/Mentio.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/com/redstoner/modules/mentio/Mentio.java b/src/com/redstoner/modules/mentio/Mentio.java index cef877e..8efcec1 100644 --- a/src/com/redstoner/modules/mentio/Mentio.java +++ b/src/com/redstoner/modules/mentio/Mentio.java @@ -22,7 +22,7 @@ import com.redstoner.misc.Utils; import com.redstoner.modules.Module; @AutoRegisterListener -@Version(major = 1, minor = 0, revision = 0, compatible = 1) +@Version(major = 1, minor = 0, revision = 1, compatible = 1) public class Mentio implements Module, Listener { private boolean enabled = false; @@ -137,7 +137,7 @@ public class Mentio implements Module, Listener for (Object raw : playerMentios) { String mentio = (String) raw; - if (event.getMessage().contains(mentio)) + if (event.getMessage().toLowerCase().contains(mentio.toLowerCase())) { event.getRecipients().remove(player); String temp = event.getMessage().replace(mentio, "ยงยง"); @@ -158,6 +158,7 @@ public class Mentio implements Module, Listener Utils.log(event.getMessage()); Utils.log(event.getFormat()); player.playSound(player.getLocation(), Sound.ENTITY_CHICKEN_EGG, 1, 1); + return; } } }