mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 05:06:44 +01:00
Minor performance improvements.
This commit is contained in:
parent
d2c81cbd01
commit
286e5b8b97
@ -87,7 +87,7 @@ public class Visit extends SubCommand {
|
||||
} else {
|
||||
final Plot plot = MainUtil.getPlotFromString(player, args[0], true);
|
||||
if (plot != null) {
|
||||
unsorted = new HashSet<>(Collections.singletonList(plot.getBasePlot(false)));
|
||||
unsorted = Collections.singletonList(plot.getBasePlot(false));
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -784,14 +784,11 @@ public class SQLManager implements AbstractDB {
|
||||
stmt.setNull((i * 10) + 4, 4); // custom_time
|
||||
stmt.setNull((i * 10) + 5, 4); // time
|
||||
stmt.setNull((i * 10) + 6, 4); // deny_entry
|
||||
if (pair.settings.getAlias().equals("")) {
|
||||
if (pair.settings.getAlias().isEmpty()) {
|
||||
stmt.setNull((i * 10) + 7, 4);
|
||||
} else {
|
||||
stmt.setString((i * 10) + 7, pair.settings.getAlias());
|
||||
}
|
||||
if (pair.settings.flags == null) {
|
||||
stmt.setNull((i * 10) + 8, 4);
|
||||
} else {
|
||||
final StringBuilder flag_string = new StringBuilder();
|
||||
int k = 0;
|
||||
for (final Flag flag : pair.settings.flags.values()) {
|
||||
@ -802,7 +799,6 @@ public class SQLManager implements AbstractDB {
|
||||
k++;
|
||||
}
|
||||
stmt.setString((i * 10) + 8, flag_string.toString());
|
||||
}
|
||||
final boolean[] merged = pair.settings.getMerged();
|
||||
int hash = MainUtil.hash(merged);
|
||||
stmt.setInt((i * 10) + 9, hash);
|
||||
@ -829,9 +825,6 @@ public class SQLManager implements AbstractDB {
|
||||
} else {
|
||||
stmt.setString((i * 10) + 7, pair.settings.getAlias());
|
||||
}
|
||||
if (pair.settings.flags == null) {
|
||||
stmt.setNull((i * 10) + 8, 4);
|
||||
} else {
|
||||
final StringBuilder flag_string = new StringBuilder();
|
||||
int k = 0;
|
||||
for (final Flag flag : pair.settings.flags.values()) {
|
||||
@ -842,7 +835,6 @@ public class SQLManager implements AbstractDB {
|
||||
k++;
|
||||
}
|
||||
stmt.setString((i * 10) + 8, flag_string.toString());
|
||||
}
|
||||
final boolean[] merged = pair.settings.getMerged();
|
||||
int n = 0;
|
||||
for (int j = 0; j < 4; ++j) {
|
||||
|
Loading…
Reference in New Issue
Block a user