mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-10 14:33:00 +00:00
Blocking numeric home names, changing invalid home message
This commit is contained in:
parent
d7829bef28
commit
d8b6742543
14 changed files with 18 additions and 2 deletions
|
@ -2,7 +2,9 @@ package com.earth2me.essentials.commands;
|
|||
|
||||
import static com.earth2me.essentials.I18n._;
|
||||
import com.earth2me.essentials.User;
|
||||
import com.earth2me.essentials.Util;
|
||||
import java.util.Locale;
|
||||
import java.util.regex.Pattern;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Server;
|
||||
|
||||
|
@ -55,9 +57,10 @@ public class Commandsethome extends EssentialsCommand
|
|||
{
|
||||
name = "home";
|
||||
}
|
||||
if ("bed".equals(name))
|
||||
if ("bed".equals(name) || Util.isInt(name))
|
||||
{
|
||||
throw new NotEnoughArgumentsException();
|
||||
user.sendMessage(_("invalidHomeName"));
|
||||
throw new NoChargeException();
|
||||
}
|
||||
usersHome.setHome(name, location);
|
||||
user.sendMessage(_("homeSet", user.getLocation().getWorld().getName(), user.getLocation().getBlockX(), user.getLocation().getBlockY(), user.getLocation().getBlockZ()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue