mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-23 17:47:34 +01:00
Merge pull request #166 from chrisgward/patch-3
Blocking numeric home names, changing invalid home message
This commit is contained in:
commit
678ae78767
@ -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()));
|
||||
|
@ -457,3 +457,4 @@ uptime=\u00a76Uptime:\u00a7c {0}
|
||||
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
|
||||
|
@ -460,3 +460,4 @@ uptime=\u00a76Uptime:\u00a7c {0}
|
||||
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
|
||||
|
@ -457,3 +457,4 @@ uptime=\u00a76Uptime:\u00a7c {0}
|
||||
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
|
||||
|
@ -457,3 +457,4 @@ uptime=\u00a76Uptime:\u00a7c {0}
|
||||
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
|
||||
|
@ -457,3 +457,4 @@ uptime=\u00a76Uptime:\u00a7c {0}
|
||||
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
|
||||
|
@ -457,3 +457,4 @@ uptime=\u00a76Uptime:\u00a7c {0}
|
||||
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
|
||||
|
@ -457,3 +457,4 @@ uptime=\u00a76Uptime:\u00a7c {0}
|
||||
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
|
||||
|
@ -457,3 +457,4 @@ uptime=\u00a76Uptime:\u00a7c {0}
|
||||
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
|
||||
|
@ -457,3 +457,4 @@ uptime=\u00a76Uptime:\u00a7c {0}
|
||||
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
|
||||
|
@ -457,3 +457,4 @@ uptime=\u00a76Uptime:\u00a7c {0}
|
||||
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
|
||||
|
@ -457,3 +457,4 @@ uptime=\u00a76Uptime:\u00a7c {0}
|
||||
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
|
||||
|
@ -457,3 +457,4 @@ uptime=\u00a76Uptime:\u00a7c {0}
|
||||
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
|
||||
|
@ -457,3 +457,4 @@ uptime=\u00a76Uptime:\u00a7c {0}
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user