Improve /op and /deop command matching

This commit is contained in:
Luck 2018-12-10 15:33:04 +00:00
parent 757e9d6be6
commit ef31db1431
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B
2 changed files with 4 additions and 4 deletions

View File

@ -75,8 +75,8 @@ public class BukkitPlatformListener implements Listener {
s = s.substring(1);
}
if (s.startsWith("minecraft:")) {
s = s.substring("minecraft:".length());
if (s.contains(":")) {
s = s.substring(s.indexOf(':') + 1);
}
if (s.equals("op") || s.startsWith("op ") || s.equals("deop") || s.startsWith("deop ")) {

View File

@ -75,8 +75,8 @@ public class NukkitPlatformListener implements Listener {
s = s.substring(1);
}
if (s.startsWith("minecraft:")) {
s = s.substring("minecraft:".length());
if (s.contains(":")) {
s = s.substring(s.indexOf(':') + 1);
}
if (s.equals("op") || s.startsWith("op ") || s.equals("deop") || s.startsWith("deop ")) {