i failed again on java string comparison
This commit is contained in:
parent
483d894c20
commit
bd22b29b21
1 changed files with 5 additions and 6 deletions
|
@ -81,12 +81,11 @@ public class CListener implements Listener {
|
||||||
public void onPlayerComamnd(PlayerCommandPreprocessEvent event) {
|
public void onPlayerComamnd(PlayerCommandPreprocessEvent event) {
|
||||||
String[] cmd = event.getMessage().split(" ");
|
String[] cmd = event.getMessage().split(" ");
|
||||||
if (cmd.length >= 2) {
|
if (cmd.length >= 2) {
|
||||||
if (cmd[0].replaceAll("/", "").toLowerCase() == "region") {
|
if (cmd[0].replaceAll("/", "").equalsIgnoreCase("region")) {
|
||||||
String opt = cmd[1].toLowerCase();
|
if (cmd[1].equalsIgnoreCase("addowner") || cmd[1].equalsIgnoreCase("addmember") ||
|
||||||
if (opt == "addowner" || opt == "addmember" ||
|
cmd[1].equalsIgnoreCase("removeowner") || cmd[1].equalsIgnoreCase("remowner") ||
|
||||||
opt == "removeowner" || opt == "remowner" ||
|
cmd[1].equalsIgnoreCase("removemember") || cmd[1].equalsIgnoreCase("remmember") ||
|
||||||
opt == "removemember" || opt == "remmember" ||
|
cmd[1].equalsIgnoreCase("removemem") || cmd[1].equalsIgnoreCase("remmem")) {
|
||||||
opt == "removemem" || opt == "remmem") {
|
|
||||||
CPlayer.clear();
|
CPlayer.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue