mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-14 13:13:24 +00:00
Cleanup sethome
This commit is contained in:
parent
227cde75a7
commit
732dc3bf34
15 changed files with 19 additions and 7 deletions
|
@ -4,7 +4,6 @@ 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;
|
||||
|
||||
|
@ -47,7 +46,7 @@ public class Commandsethome extends EssentialsCommand
|
|||
}
|
||||
if (usersHome == null)
|
||||
{
|
||||
throw new Exception(_("playerNotFound"));
|
||||
throw new NoSuchFieldException(_("playerNotFound"));
|
||||
}
|
||||
name = args[1].toLowerCase(Locale.ENGLISH);
|
||||
}
|
||||
|
@ -59,8 +58,7 @@ public class Commandsethome extends EssentialsCommand
|
|||
}
|
||||
if ("bed".equals(name) || Util.isInt(name))
|
||||
{
|
||||
user.sendMessage(_("invalidHomeName"));
|
||||
throw new NoChargeException();
|
||||
throw new NoSuchFieldException(_("invalidHomeName"));
|
||||
}
|
||||
usersHome.setHome(name, location);
|
||||
user.sendMessage(_("homeSet", user.getLocation().getWorld().getName(), user.getLocation().getBlockX(), user.getLocation().getBlockY(), user.getLocation().getBlockZ()));
|
||||
|
|
|
@ -22,9 +22,10 @@ public class Commandsetwarp extends EssentialsCommand
|
|||
{
|
||||
throw new NotEnoughArgumentsException();
|
||||
}
|
||||
|
||||
if (args[0].matches("[0-9]+")) {
|
||||
throw new NotEnoughArgumentsException();
|
||||
|
||||
if (Util.isInt(args[0]))
|
||||
{
|
||||
throw new NoSuchFieldException(_("invalidWarpName"));
|
||||
}
|
||||
|
||||
final Location loc = user.getLocation();
|
||||
|
|
|
@ -458,3 +458,4 @@ antiBuildCraft=\u00a74You are not permitted to create\u00a7c {0}\u00a74.
|
|||
antiBuildDrop=\u00a74You are not permitted to drop\u00a7c {0}\u00a74.
|
||||
gcWorld=\u00a76{0} "\u00a7c{1}\u00a76": \u00a7c{2}\u00a76 chunks, \u00a7c{3}\u00a76 entities
|
||||
invalidHomeName=\u00a74Invalid home name
|
||||
invalidWarpName=\u00a74Invalid warp name
|
||||
|
|
|
@ -461,3 +461,4 @@ antiBuildCraft=\u00a74You are not permitted to create\u00a7c {0}\u00a74.
|
|||
antiBuildDrop=\u00a74You are not permitted to drop\u00a7c {0}\u00a74.
|
||||
gcWorld=\u00a76{0} "\u00a7c{1}\u00a76": \u00a7c{2}\u00a76 chunks, \u00a7c{3}\u00a76 entities
|
||||
invalidHomeName=\u00a74Invalid home name
|
||||
invalidWarpName=\u00a74Invalid warp name
|
||||
|
|
|
@ -458,3 +458,4 @@ antiBuildCraft=\u00a74You are not permitted to create\u00a7c {0}\u00a74.
|
|||
antiBuildDrop=\u00a74You are not permitted to drop\u00a7c {0}\u00a74.
|
||||
gcWorld=\u00a76{0} "\u00a7c{1}\u00a76": \u00a7c{2}\u00a76 chunks, \u00a7c{3}\u00a76 entities
|
||||
invalidHomeName=\u00a74Invalid home name
|
||||
invalidWarpName=\u00a74Invalid warp name
|
||||
|
|
|
@ -458,3 +458,4 @@ antiBuildCraft=\u00a74You are not permitted to create\u00a7c {0}\u00a74.
|
|||
antiBuildDrop=\u00a74You are not permitted to drop\u00a7c {0}\u00a74.
|
||||
gcWorld=\u00a76{0} "\u00a7c{1}\u00a76": \u00a7c{2}\u00a76 chunks, \u00a7c{3}\u00a76 entities
|
||||
invalidHomeName=\u00a74Invalid home name
|
||||
invalidWarpName=\u00a74Invalid warp name
|
||||
|
|
|
@ -458,3 +458,4 @@ antiBuildCraft=\u00a74You are not permitted to create\u00a7c {0}\u00a74.
|
|||
antiBuildDrop=\u00a74You are not permitted to drop\u00a7c {0}\u00a74.
|
||||
gcWorld=\u00a76{0} "\u00a7c{1}\u00a76": \u00a7c{2}\u00a76 chunks, \u00a7c{3}\u00a76 entities
|
||||
invalidHomeName=\u00a74Invalid home name
|
||||
invalidWarpName=\u00a74Invalid warp name
|
||||
|
|
|
@ -458,3 +458,4 @@ antiBuildCraft=\u00a74You are not permitted to create\u00a7c {0}\u00a74.
|
|||
antiBuildDrop=\u00a74You are not permitted to drop\u00a7c {0}\u00a74.
|
||||
gcWorld=\u00a76{0} "\u00a7c{1}\u00a76": \u00a7c{2}\u00a76 chunks, \u00a7c{3}\u00a76 entities
|
||||
invalidHomeName=\u00a74Invalid home name
|
||||
invalidWarpName=\u00a74Invalid warp name
|
||||
|
|
|
@ -458,3 +458,4 @@ antiBuildCraft=\u00a74You are not permitted to create\u00a7c {0}\u00a74.
|
|||
antiBuildDrop=\u00a74You are not permitted to drop\u00a7c {0}\u00a74.
|
||||
gcWorld=\u00a76{0} "\u00a7c{1}\u00a76": \u00a7c{2}\u00a76 chunks, \u00a7c{3}\u00a76 entities
|
||||
invalidHomeName=\u00a74Invalid home name
|
||||
invalidWarpName=\u00a74Invalid warp name
|
||||
|
|
|
@ -458,3 +458,4 @@ antiBuildCraft=\u00a74You are not permitted to create\u00a7c {0}\u00a74.
|
|||
antiBuildDrop=\u00a74You are not permitted to drop\u00a7c {0}\u00a74.
|
||||
gcWorld=\u00a76{0} "\u00a7c{1}\u00a76": \u00a7c{2}\u00a76 chunks, \u00a7c{3}\u00a76 entities
|
||||
invalidHomeName=\u00a74Invalid home name
|
||||
invalidWarpName=\u00a74Invalid warp name
|
||||
|
|
|
@ -458,3 +458,4 @@ antiBuildCraft=\u00a74You are not permitted to create\u00a7c {0}\u00a74.
|
|||
antiBuildDrop=\u00a74You are not permitted to drop\u00a7c {0}\u00a74.
|
||||
gcWorld=\u00a76{0} "\u00a7c{1}\u00a76": \u00a7c{2}\u00a76 chunks, \u00a7c{3}\u00a76 entities
|
||||
invalidHomeName=\u00a74Invalid home name
|
||||
invalidWarpName=\u00a74Invalid warp name
|
||||
|
|
|
@ -458,3 +458,4 @@ antiBuildCraft=\u00a74You are not permitted to create\u00a7c {0}\u00a74.
|
|||
antiBuildDrop=\u00a74You are not permitted to drop\u00a7c {0}\u00a74.
|
||||
gcWorld=\u00a76{0} "\u00a7c{1}\u00a76": \u00a7c{2}\u00a76 chunks, \u00a7c{3}\u00a76 entities
|
||||
invalidHomeName=\u00a74Invalid home name
|
||||
invalidWarpName=\u00a74Invalid warp name
|
||||
|
|
|
@ -458,3 +458,4 @@ antiBuildCraft=\u00a74You are not permitted to create\u00a7c {0}\u00a74.
|
|||
antiBuildDrop=\u00a74You are not permitted to drop\u00a7c {0}\u00a74.
|
||||
gcWorld=\u00a76{0} "\u00a7c{1}\u00a76": \u00a7c{2}\u00a76 chunks, \u00a7c{3}\u00a76 entities
|
||||
invalidHomeName=\u00a74Invalid home name
|
||||
invalidWarpName=\u00a74Invalid warp name
|
||||
|
|
|
@ -458,3 +458,4 @@ antiBuildCraft=\u00a74You are not permitted to create\u00a7c {0}\u00a74.
|
|||
antiBuildDrop=\u00a74You are not permitted to drop\u00a7c {0}\u00a74.
|
||||
gcWorld=\u00a76{0} "\u00a7c{1}\u00a76": \u00a7c{2}\u00a76 chunks, \u00a7c{3}\u00a76 entities
|
||||
invalidHomeName=\u00a74Invalid home name
|
||||
invalidWarpName=\u00a74Invalid warp name
|
||||
|
|
|
@ -458,3 +458,4 @@ antiBuildCraft=\u00a74You are not permitted to create\u00a7c {0}\u00a74.
|
|||
antiBuildDrop=\u00a74You are not permitted to drop\u00a7c {0}\u00a74.
|
||||
gcWorld=\u00a76{0} "\u00a7c{1}\u00a76": \u00a7c{2}\u00a76 chunks, \u00a7c{3}\u00a76 entities
|
||||
invalidHomeName=\u00a74Invalid home name
|
||||
invalidWarpName=\u00a74Invalid warp name
|
||||
|
|
Loading…
Reference in a new issue