mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 09:47:38 +00:00
Removed string.isEmpty() method calls
This commit is contained in:
parent
370ca96a44
commit
70205bfd11
@ -60,7 +60,7 @@ public class CommandRegistration {
|
||||
if (fallbackCommands != null) {
|
||||
commandMap = fallbackCommands;
|
||||
} else {
|
||||
Bukkit.getServer().getLogger().warning(plugin.getDescription().getName() +
|
||||
Bukkit.getServer().getLogger().severe(plugin.getDescription().getName() +
|
||||
": Could not retrieve server CommandMap, using fallback instead! Please report to http://redmine.sk89q.com");
|
||||
fallbackCommands = commandMap = new SimpleCommandMap(Bukkit.getServer());
|
||||
Bukkit.getServer().getPluginManager().registerEvent(Event.Type.PLAYER_COMMAND_PREPROCESS,
|
||||
|
@ -298,7 +298,7 @@ public abstract class CommandsManager<T> {
|
||||
command.append(getArguments(cmd));
|
||||
|
||||
final String help = cmd.help();
|
||||
if (!help.isEmpty()) {
|
||||
if (help.length() > 0) {
|
||||
command.append("\n\n");
|
||||
command.append(help);
|
||||
}
|
||||
|
@ -139,7 +139,7 @@ public class Lexer {
|
||||
final Matcher numberMatcher = numberPattern.matcher(expression.substring(position));
|
||||
if (numberMatcher.lookingAt()) {
|
||||
String numberPart = numberMatcher.group(1);
|
||||
if (!numberPart.isEmpty()) {
|
||||
if (numberPart.length() > 0) {
|
||||
try {
|
||||
tokens.add(new NumberToken(position, Double.parseDouble(numberPart)));
|
||||
} catch (NumberFormatException e) {
|
||||
@ -154,7 +154,7 @@ public class Lexer {
|
||||
final Matcher identifierMatcher = identifierPattern.matcher(expression.substring(position));
|
||||
if (identifierMatcher.lookingAt()) {
|
||||
String identifierPart = identifierMatcher.group(1);
|
||||
if (!identifierPart.isEmpty()) {
|
||||
if (identifierPart.length() > 0) {
|
||||
if (keywords.contains(identifierPart)) {
|
||||
tokens.add(new KeywordToken(position, identifierPart));
|
||||
} else {
|
||||
|
@ -99,7 +99,7 @@ public class PropertiesConfiguration extends LocalConfiguration {
|
||||
LocalSession.MAX_HISTORY_SIZE = Math.max(15, getInt("history-size", 15));
|
||||
|
||||
String snapshotsDir = getString("snapshots-dir", "");
|
||||
if (!snapshotsDir.isEmpty()) {
|
||||
if (snapshotsDir.length() > 0) {
|
||||
snapshotRepo = new SnapshotRepository(snapshotsDir);
|
||||
}
|
||||
|
||||
|
@ -94,7 +94,7 @@ public class YAMLConfiguration extends LocalConfiguration {
|
||||
LocalSession.EXPIRATION_GRACE = config.getInt("history.expiration", 10) * 60 * 1000;
|
||||
|
||||
String snapshotsDir = config.getString("snapshots.directory", "");
|
||||
if (!snapshotsDir.isEmpty()) {
|
||||
if (snapshotsDir.length() > 0) {
|
||||
snapshotRepo = new SnapshotRepository(snapshotsDir);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user