mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 14:38:52 +00:00
More refactor work, encapsulate classes
This commit is contained in:
1 parent
3e1ec09487
commit
1cebdac9b8
51 files changed
+756
-621
No files matched your search
@@ -63,7 +63,7 @@ public class WarpCommand extends CommandBase implements TabCompletable, ConsoleE
|
||||
|
||||
@Override
|
||||
public @NotNull List<String> onTabComplete(@NotNull String[] args, @Nullable OnlineUser user) {
|
||||
return plugin.getCache().warps.stream()
|
||||
return plugin.getCache().getWarps().stream()
|
||||
.filter(s -> user == null || Warp.hasPermission(plugin.getSettings().isPermissionRestrictWarps(), user, s))
|
||||
.filter(s -> s.toLowerCase().startsWith(args.length >= 1 ? args[0].toLowerCase() : ""))
|
||||
.sorted()
|
||||
@@ -89,7 +89,7 @@ public class WarpCommand extends CommandBase implements TabCompletable, ConsoleE
|
||||
}
|
||||
final Warp warp = optionalWarp.get();
|
||||
|
||||
plugin.getLoggingAdapter().log(Level.INFO, "Teleporting " + playerToTeleport.username + " to " + warp.meta.name);
|
||||
plugin.getLoggingAdapter().log(Level.INFO, "Teleporting " + playerToTeleport.username + " to " + warp.getMeta().getName());
|
||||
Teleport.builder(plugin, playerToTeleport)
|
||||
.setTarget(warp)
|
||||
.toTimedTeleport()
|
||||
|
||||
Reference in new issue
Block a user