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) {
|
||||
String[] cmd = event.getMessage().split(" ");
|
||||
if (cmd.length >= 2) {
|
||||
if (cmd[0].replaceAll("/", "").toLowerCase() == "region") {
|
||||
String opt = cmd[1].toLowerCase();
|
||||
if (opt == "addowner" || opt == "addmember" ||
|
||||
opt == "removeowner" || opt == "remowner" ||
|
||||
opt == "removemember" || opt == "remmember" ||
|
||||
opt == "removemem" || opt == "remmem") {
|
||||
if (cmd[0].replaceAll("/", "").equalsIgnoreCase("region")) {
|
||||
if (cmd[1].equalsIgnoreCase("addowner") || cmd[1].equalsIgnoreCase("addmember") ||
|
||||
cmd[1].equalsIgnoreCase("removeowner") || cmd[1].equalsIgnoreCase("remowner") ||
|
||||
cmd[1].equalsIgnoreCase("removemember") || cmd[1].equalsIgnoreCase("remmember") ||
|
||||
cmd[1].equalsIgnoreCase("removemem") || cmd[1].equalsIgnoreCase("remmem")) {
|
||||
CPlayer.clear();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue