mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2024-12-23 00:15:06 +00:00
Lower tab completion cache time and fix "Invalid player" message for /plot kick
This commit is contained in:
parent
f69cc5cc98
commit
efab6e92f7
2 changed files with 6 additions and 6 deletions
|
@ -72,12 +72,12 @@ public class Kick extends SubCommand {
|
|||
if (throwable instanceof TimeoutException) {
|
||||
MainUtil.sendMessage(player, Captions.FETCHING_PLAYERS_TIMEOUT);
|
||||
} else if (throwable != null || uuids.isEmpty()) {
|
||||
MainUtil.sendMessage(player, Captions.INVALID_PLAYER);
|
||||
MainUtil.sendMessage(player, Captions.INVALID_PLAYER, args[0]);
|
||||
} else {
|
||||
Set<PlotPlayer> players = new HashSet<>();
|
||||
Set<PlotPlayer<?>> players = new HashSet<>();
|
||||
for (UUID uuid : uuids) {
|
||||
if (uuid == DBFunc.EVERYONE) {
|
||||
for (PlotPlayer pp : plot.getPlayersInPlot()) {
|
||||
for (PlotPlayer<?> pp : plot.getPlayersInPlot()) {
|
||||
if (pp == player || Permissions
|
||||
.hasPermission(pp, Captions.PERMISSION_ADMIN_ENTRY_DENIED)) {
|
||||
continue;
|
||||
|
@ -86,7 +86,7 @@ public class Kick extends SubCommand {
|
|||
}
|
||||
continue;
|
||||
}
|
||||
PlotPlayer pp = PlotSquared.imp().getPlayerManager().getPlayerIfExists(uuid);
|
||||
PlotPlayer<?> pp = PlotSquared.imp().getPlayerManager().getPlayerIfExists(uuid);
|
||||
if (pp != null) {
|
||||
players.add(pp);
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ public class Kick extends SubCommand {
|
|||
MainUtil.sendMessage(player, Captions.INVALID_PLAYER, args[0]);
|
||||
return;
|
||||
}
|
||||
for (PlotPlayer player2 : players) {
|
||||
for (PlotPlayer<?> player2 : players) {
|
||||
if (!plot.equals(player2.getCurrentPlot())) {
|
||||
MainUtil.sendMessage(player, Captions.INVALID_PLAYER, args[0]);
|
||||
return;
|
||||
|
|
|
@ -56,7 +56,7 @@ import java.util.stream.Collectors;
|
|||
public class TabCompletions {
|
||||
|
||||
private final Cache<String, List<String>> cachedCompletionValues =
|
||||
CacheBuilder.newBuilder().expireAfterWrite(1, TimeUnit.MINUTES).build();
|
||||
CacheBuilder.newBuilder().expireAfterWrite(15, TimeUnit.SECONDS).build();
|
||||
|
||||
private final Command booleanTrueCompletion = new Command(null, false, "true", "",
|
||||
RequiredType.NONE, null) {};
|
||||
|
|
Loading…
Reference in a new issue