mirror of
https://github.com/kaboomserver/extras.git
synced 2024-10-31 16:59:24 +00:00
Use String#equals() instead of String == String in ServerCommand.java
This commit is contained in:
parent
55a34972cb
commit
a91c25f8c2
|
@ -1,11 +1,5 @@
|
|||
package pw.kaboom.extras.modules.server;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.bukkit.block.CommandBlock;
|
||||
import org.bukkit.command.BlockCommandSender;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
@ -14,9 +8,14 @@ import org.bukkit.event.EventHandler;
|
|||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.server.ServerCommandEvent;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import pw.kaboom.extras.Main;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public final class ServerCommand implements Listener {
|
||||
private static final Pattern AS_AT_PATTERN = Pattern.compile(
|
||||
"\\b(as|at|facing entity) @[ae]\\b");
|
||||
|
@ -117,7 +116,7 @@ public final class ServerCommand implements Listener {
|
|||
String.join(" ", executeCommand), true, depth + 1);
|
||||
if (result == null) {
|
||||
continue;
|
||||
} else if (result == "cancel") {
|
||||
} else if (result.equals("cancel")) {
|
||||
return "cancel";
|
||||
}
|
||||
final String pureExecute = String.join(
|
||||
|
|
Loading…
Reference in a new issue