mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-01 14:38:53 +00:00
Add checks for unicode in home/description names if enabled
This commit is contained in:
1 parent
e90fc481a9
commit
1c6902fc9e
8 files changed
+36
-19
No files matched your search
@@ -1,14 +1,11 @@
|
||||
package net.william278.huskhomes.command;
|
||||
|
||||
import de.themoep.minedown.MineDown;
|
||||
import net.william278.huskhomes.HuskHomes;
|
||||
import net.william278.huskhomes.player.OnlineUser;
|
||||
import net.william278.huskhomes.position.PositionMeta;
|
||||
import net.william278.huskhomes.util.Permission;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
public class SetWarpCommand extends CommandBase {
|
||||
|
||||
protected SetWarpCommand(@NotNull HuskHomes implementor) {
|
||||
@@ -37,7 +34,7 @@ public class SetWarpCommand extends CommandBase {
|
||||
case FAILED_DUPLICATE -> plugin.getLocales().getLocale("error_warp_name_taken");
|
||||
case FAILED_NAME_LENGTH -> plugin.getLocales().getLocale("error_warp_name_length");
|
||||
case FAILED_NAME_CHARACTERS -> plugin.getLocales().getLocale("error_warp_name_characters");
|
||||
default -> Optional.of(new MineDown(""));
|
||||
default -> plugin.getLocales().getLocale("error_warp_description_characters");
|
||||
}).ifPresent(onlineUser::sendMessage));
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user