mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-01 22:16:08 +00:00
Fix invalid warp locale not displaying, make home/warp lookup case-insensitive (#384)
This commit is contained in:
1 parent
a37bc8b3eb
commit
4db9bcf6ba
8 files changed
+89
-27
No files matched your search
@@ -131,8 +131,13 @@ public abstract class SavedPositionCommand<T extends SavedPosition> extends Comm
|
||||
|
||||
private Optional<Warp> resolveWarp(@NotNull CommandUser executor, @NotNull String warpName) {
|
||||
final Optional<Warp> warp = resolveWarpByName(warpName);
|
||||
if (warp.isPresent() && executor instanceof OnlineUser user && plugin.getSettings().doPermissionRestrictWarps()
|
||||
&& (!user.hasPermission(Warp.getWildcardPermission()) && !user.hasPermission(Warp.getPermission(warpName)))) {
|
||||
if (warp.isEmpty()) {
|
||||
plugin.getLocales().getLocale("error_warp_invalid", warpName)
|
||||
.ifPresent(executor::sendMessage);
|
||||
return Optional.empty();
|
||||
}
|
||||
if (executor instanceof OnlineUser user && plugin.getSettings().doPermissionRestrictWarps()
|
||||
&& !user.hasPermission(Warp.getWildcardPermission()) && !user.hasPermission(Warp.getPermission(warpName))) {
|
||||
plugin.getLocales().getLocale("error_warp_invalid", warpName)
|
||||
.ifPresent(executor::sendMessage);
|
||||
return Optional.empty();
|
||||
|
||||
Reference in new issue
Block a user