0

Made mentio case insensitive

This commit is contained in:
Pepich 2017-02-07 01:15:32 +01:00
parent 2c26f06536
commit d17de80a6a

View File

@ -22,7 +22,7 @@ import com.redstoner.misc.Utils;
import com.redstoner.modules.Module; import com.redstoner.modules.Module;
@AutoRegisterListener @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 public class Mentio implements Module, Listener
{ {
private boolean enabled = false; private boolean enabled = false;
@ -137,7 +137,7 @@ public class Mentio implements Module, Listener
for (Object raw : playerMentios) for (Object raw : playerMentios)
{ {
String mentio = (String) raw; String mentio = (String) raw;
if (event.getMessage().contains(mentio)) if (event.getMessage().toLowerCase().contains(mentio.toLowerCase()))
{ {
event.getRecipients().remove(player); event.getRecipients().remove(player);
String temp = event.getMessage().replace(mentio, "§§"); String temp = event.getMessage().replace(mentio, "§§");
@ -158,6 +158,7 @@ public class Mentio implements Module, Listener
Utils.log(event.getMessage()); Utils.log(event.getMessage());
Utils.log(event.getFormat()); Utils.log(event.getFormat());
player.playSound(player.getLocation(), Sound.ENTITY_CHICKEN_EGG, 1, 1); player.playSound(player.getLocation(), Sound.ENTITY_CHICKEN_EGG, 1, 1);
return;
} }
} }
} }