mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-14 13:13:24 +00:00
Finally all commands translated.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1471 e251c2fe-e539-e718-e476-b85c1f46cddb
This commit is contained in:
parent
c107f7ed66
commit
5eeb020f01
21 changed files with 166 additions and 75 deletions
|
@ -2,6 +2,7 @@ package com.earth2me.essentials.commands;
|
|||
|
||||
import org.bukkit.Server;
|
||||
import com.earth2me.essentials.User;
|
||||
import com.earth2me.essentials.Util;
|
||||
|
||||
|
||||
public class Commandtpaccept extends EssentialsCommand
|
||||
|
@ -18,21 +19,19 @@ public class Commandtpaccept extends EssentialsCommand
|
|||
User p = user.getTeleportRequest();
|
||||
if (p == null)
|
||||
{
|
||||
throw new Exception("You do not have a pending request.");
|
||||
throw new Exception(Util.i18n("noPendingRequest"));
|
||||
}
|
||||
|
||||
user.canAfford(this);
|
||||
user.sendMessage(Util.i18n("requestAccepted"));
|
||||
p.sendMessage(Util.i18n("requestAccepted"));
|
||||
|
||||
if (user.isTeleportRequestHere())
|
||||
{
|
||||
user.canAfford(this);
|
||||
user.sendMessage("§7Teleport request accepted.");
|
||||
p.sendMessage("§7Teleport request accepted.");
|
||||
user.getTeleport().teleport(p, this.getName());
|
||||
}
|
||||
else
|
||||
{
|
||||
user.canAfford(this);
|
||||
user.sendMessage("§7Teleport request accepted.");
|
||||
p.sendMessage("§7Teleport request accepted.");
|
||||
p.getTeleport().teleport(user, this.getName());
|
||||
}
|
||||
user.requestTeleport(null, false);
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.earth2me.essentials.commands;
|
|||
|
||||
import org.bukkit.Server;
|
||||
import com.earth2me.essentials.User;
|
||||
import com.earth2me.essentials.Util;
|
||||
|
||||
|
||||
public class Commandtpahere extends EssentialsCommand
|
||||
|
@ -22,12 +23,12 @@ public class Commandtpahere extends EssentialsCommand
|
|||
User p = getPlayer(server, args, 0);
|
||||
if (!p.isTeleportEnabled())
|
||||
{
|
||||
throw new Exception(p.getDisplayName() + " has teleportation disabled.");
|
||||
throw new Exception(Util.format("teleportDisabled", p.getDisplayName()));
|
||||
}
|
||||
user.charge(this);
|
||||
p.requestTeleport(user, true);
|
||||
p.sendMessage("§c" + user.getDisplayName() + "§c has requested that you teleport to him/her.");
|
||||
p.sendMessage("§7To teleport, type §c/tpaccept§7.");
|
||||
user.sendMessage("§7Request sent to " + p.getDisplayName() + "§c.");
|
||||
p.sendMessage(Util.format("teleportHereRequest", user.getDisplayName()));
|
||||
p.sendMessage(Util.i18n("typeTpaccept"));
|
||||
user.sendMessage(Util.format("requestSent", p.getDisplayName()));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.earth2me.essentials.commands;
|
|||
|
||||
import org.bukkit.Server;
|
||||
import com.earth2me.essentials.User;
|
||||
import com.earth2me.essentials.Util;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
|
@ -34,7 +35,7 @@ public class Commandtpall extends EssentialsCommand
|
|||
|
||||
private void teleportAllPlayers(Server server, CommandSender sender, User p)
|
||||
{
|
||||
sender.sendMessage("§7Teleporting all players...");
|
||||
sender.sendMessage(Util.i18n("teleportAll"));
|
||||
for (Player player : server.getOnlinePlayers())
|
||||
{
|
||||
User u = ess.getUser(player);
|
||||
|
@ -48,7 +49,7 @@ public class Commandtpall extends EssentialsCommand
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
sender.sendMessage("Error: "+ex.getMessage());
|
||||
sender.sendMessage(Util.format("errorWithMessage", ex.getMessage()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.earth2me.essentials.commands;
|
|||
|
||||
import org.bukkit.Server;
|
||||
import com.earth2me.essentials.User;
|
||||
import com.earth2me.essentials.Util;
|
||||
|
||||
|
||||
public class Commandtpdeny extends EssentialsCommand
|
||||
|
@ -17,21 +18,12 @@ public class Commandtpdeny extends EssentialsCommand
|
|||
User p = user.getTeleportRequest();
|
||||
if (p == null)
|
||||
{
|
||||
throw new Exception("You do not have a pending request.");
|
||||
throw new Exception(Util.i18n("noPendingRequest"));
|
||||
}
|
||||
|
||||
if (user.isTeleportRequestHere())
|
||||
{
|
||||
user.charge(this);
|
||||
user.sendMessage("§7Teleport request denied.");
|
||||
p.sendMessage("§7Teleport request denied.");
|
||||
}
|
||||
else
|
||||
{
|
||||
user.charge(this);
|
||||
user.sendMessage("§7Teleport request denied.");
|
||||
p.sendMessage("§7Teleport request denied.");
|
||||
}
|
||||
user.charge(this);
|
||||
user.sendMessage(Util.i18n("requestDenied"));
|
||||
p.sendMessage(Util.i18n("requestDenied"));
|
||||
user.requestTeleport(null, false);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.earth2me.essentials.commands;
|
|||
|
||||
import org.bukkit.Server;
|
||||
import com.earth2me.essentials.User;
|
||||
import com.earth2me.essentials.Util;
|
||||
|
||||
|
||||
public class Commandtphere extends EssentialsCommand
|
||||
|
@ -17,10 +18,10 @@ public class Commandtphere extends EssentialsCommand
|
|||
User p = getPlayer(server, args, 0);
|
||||
if (!p.isTeleportEnabled())
|
||||
{
|
||||
throw new Exception(p.getDisplayName() + " has teleportation disabled.");
|
||||
throw new Exception(Util.format("teleportDisabled", p.getDisplayName()));
|
||||
}
|
||||
p.getTeleport().teleport(user, commandLabel);
|
||||
user.sendMessage("§7Teleporting...");
|
||||
p.sendMessage("§7Teleporting...");
|
||||
user.sendMessage(Util.i18n("teleporting"));
|
||||
p.sendMessage(Util.i18n("teleporting"));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.earth2me.essentials.commands;
|
|||
|
||||
import org.bukkit.Server;
|
||||
import com.earth2me.essentials.User;
|
||||
import com.earth2me.essentials.Util;
|
||||
|
||||
|
||||
public class Commandtpo extends EssentialsCommand
|
||||
|
@ -23,6 +24,6 @@ public class Commandtpo extends EssentialsCommand
|
|||
User p = getPlayer(server, args, 0);
|
||||
charge(user);
|
||||
user.getTeleport().now(p);
|
||||
user.sendMessage("§7Teleporting...");
|
||||
user.sendMessage(Util.i18n("teleporting"));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.earth2me.essentials.commands;
|
|||
|
||||
import org.bukkit.Server;
|
||||
import com.earth2me.essentials.User;
|
||||
import com.earth2me.essentials.Util;
|
||||
|
||||
|
||||
public class Commandtpohere extends EssentialsCommand
|
||||
|
@ -23,6 +24,6 @@ public class Commandtpohere extends EssentialsCommand
|
|||
User p = getPlayer(server, args, 0);
|
||||
charge(user);
|
||||
p.getTeleport().now(user);
|
||||
user.sendMessage("§7Teleporting...");
|
||||
user.sendMessage(Util.i18n("teleporting"));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ package com.earth2me.essentials.commands;
|
|||
import org.bukkit.Location;
|
||||
import org.bukkit.Server;
|
||||
import com.earth2me.essentials.User;
|
||||
import com.earth2me.essentials.Util;
|
||||
|
||||
|
||||
public class Commandtppos extends EssentialsCommand
|
||||
|
@ -25,7 +26,7 @@ public class Commandtppos extends EssentialsCommand
|
|||
int z = Integer.parseInt(args[2]);
|
||||
Location l = new Location(user.getWorld(), x, y, z);
|
||||
user.canAfford(this);
|
||||
user.sendMessage("§7Teleporting...");
|
||||
user.sendMessage(Util.i18n("teleporting"));
|
||||
user.getTeleport().teleport(l, this.getName());
|
||||
}
|
||||
}
|
|
@ -2,6 +2,7 @@ package com.earth2me.essentials.commands;
|
|||
|
||||
import org.bukkit.Server;
|
||||
import com.earth2me.essentials.User;
|
||||
import com.earth2me.essentials.Util;
|
||||
|
||||
|
||||
public class Commandtptoggle extends EssentialsCommand
|
||||
|
@ -15,6 +16,8 @@ public class Commandtptoggle extends EssentialsCommand
|
|||
public void run(Server server, User user, String commandLabel, String[] args) throws Exception
|
||||
{
|
||||
charge(user);
|
||||
user.sendMessage("§7Teleportation " + (user.toggleTeleportEnabled() ? "enabled." : "disabled."));
|
||||
user.sendMessage(user.toggleTeleportEnabled()
|
||||
? Util.i18n("teleportationEnabled")
|
||||
: Util.i18n("teleportationDisabled"));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -67,11 +67,11 @@ public class Commandtree extends EssentialsCommand
|
|||
if (success)
|
||||
{
|
||||
user.charge(this);
|
||||
user.sendMessage("§7Tree spawned.");
|
||||
user.sendMessage(Util.i18n("treeSpawned"));
|
||||
}
|
||||
else
|
||||
{
|
||||
user.sendMessage("§cTree generation failure. Try again on grass or dirt.");
|
||||
user.sendMessage(Util.i18n("treeFailure"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.earth2me.essentials.commands;
|
||||
|
||||
import com.earth2me.essentials.Util;
|
||||
import org.bukkit.Server;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
|
@ -21,7 +22,7 @@ public class Commandunban extends EssentialsCommand
|
|||
}
|
||||
|
||||
((CraftServer)server).getHandle().b(args[0]);
|
||||
sender.sendMessage("Unbanned player.");
|
||||
sender.sendMessage(Util.i18n("unbannedPlayer"));
|
||||
ess.loadBanList();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.earth2me.essentials.commands;
|
||||
|
||||
import com.earth2me.essentials.Util;
|
||||
import org.bukkit.Server;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
|
@ -21,7 +22,7 @@ public class Commandunbanip extends EssentialsCommand
|
|||
}
|
||||
|
||||
((CraftServer)server).getHandle().d(args[0]);
|
||||
sender.sendMessage("Unbanned IP address.");
|
||||
sender.sendMessage(Util.i18n("unbannedIP"));
|
||||
ess.loadBanList();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,8 +3,8 @@ package com.earth2me.essentials.commands;
|
|||
import com.earth2me.essentials.InventoryWorkaround;
|
||||
import com.earth2me.essentials.ItemDb;
|
||||
import com.earth2me.essentials.User;
|
||||
import com.earth2me.essentials.Util;
|
||||
import java.util.List;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Server;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
@ -35,12 +35,12 @@ public class Commandunlimited extends EssentialsCommand
|
|||
if (args[0].equalsIgnoreCase("list"))
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("Unlimited items: ");
|
||||
sb.append(Util.i18n("unlimitedItems")).append(" ");
|
||||
boolean first = true;
|
||||
List<Integer> items = target.getUnlimited();
|
||||
if (items.isEmpty())
|
||||
{
|
||||
sb.append("none");
|
||||
sb.append(Util.i18n("none"));
|
||||
}
|
||||
for (Integer integer : items)
|
||||
{
|
||||
|
@ -65,7 +65,7 @@ public class Commandunlimited extends EssentialsCommand
|
|||
&& !((stack.getType() == Material.WATER_BUCKET || stack.getType() == Material.LAVA_BUCKET)
|
||||
&& user.isAuthorized("essentials.unlimited.item-bucket")))
|
||||
{
|
||||
user.sendMessage(ChatColor.RED + "No permission for unlimited item " + itemname + ".");
|
||||
user.sendMessage(Util.format("unlimitedItemPermission", itemname));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -74,18 +74,18 @@ public class Commandunlimited extends EssentialsCommand
|
|||
{
|
||||
if (user != target)
|
||||
{
|
||||
user.sendMessage("§7Disable unlimited placing of " + itemname + " for " + target.getDisplayName() + ".");
|
||||
user.sendMessage(Util.format("disableUnlimited", itemname, target.getDisplayName()));
|
||||
}
|
||||
target.sendMessage("§7Disable unlimited placing of " + itemname + " for " + target.getDisplayName() + ".");
|
||||
target.sendMessage(Util.format("disableUnlimited", itemname, target.getDisplayName()));
|
||||
target.setUnlimited(stack, false);
|
||||
return;
|
||||
}
|
||||
charge(user);
|
||||
if (user != target)
|
||||
{
|
||||
user.sendMessage("§7Giving unlimited amount of " + itemname + " to " + target.getDisplayName() + ".");
|
||||
user.sendMessage(Util.format("enableUnlimited", itemname, target.getDisplayName()));
|
||||
}
|
||||
target.sendMessage("§7Giving unlimited amount of " + itemname + " to " + target.getDisplayName() + ".");
|
||||
target.sendMessage(Util.format("enableUnlimited", itemname, target.getDisplayName()));
|
||||
if (!InventoryWorkaround.containsItem(target.getInventory(), true, stack))
|
||||
{
|
||||
target.getInventory().addItem(stack);
|
||||
|
|
|
@ -3,6 +3,7 @@ package com.earth2me.essentials.commands;
|
|||
import org.bukkit.Server;
|
||||
import com.earth2me.essentials.Essentials;
|
||||
import com.earth2me.essentials.User;
|
||||
import com.earth2me.essentials.Util;
|
||||
import com.earth2me.essentials.Warps;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
|
@ -22,14 +23,14 @@ public class Commandwarp extends EssentialsCommand
|
|||
{
|
||||
if (!user.isAuthorized("essentials.warp.list"))
|
||||
{
|
||||
user.sendMessage("§cYou do not have Permission to list that warps.");
|
||||
user.sendMessage(Util.i18n("warpListPermission"));
|
||||
return;
|
||||
}
|
||||
|
||||
Warps warps = Essentials.getWarps();
|
||||
if (warps.isEmpty())
|
||||
{
|
||||
throw new Exception("No warps defined");
|
||||
throw new Exception(Util.i18n("noWarpsDefined"));
|
||||
}
|
||||
StringBuilder sb = new StringBuilder();
|
||||
int i = 0;
|
||||
|
@ -61,7 +62,7 @@ public class Commandwarp extends EssentialsCommand
|
|||
otherUser = ess.getUser(server.getPlayer(args[1]));
|
||||
if(otherUser == null)
|
||||
{
|
||||
user.sendMessage("§cPlayer not found");
|
||||
user.sendMessage(Util.i18n("playerNotFound"));
|
||||
return;
|
||||
}
|
||||
warpUser(otherUser, args[0]);
|
||||
|
@ -80,7 +81,7 @@ public class Commandwarp extends EssentialsCommand
|
|||
user.getTeleport().warp(name, this.getName());
|
||||
return;
|
||||
}
|
||||
user.sendMessage("§cYou do not have Permission to use that warp.");
|
||||
user.sendMessage(Util.i18n("warpUsePermission"));
|
||||
return;
|
||||
}
|
||||
user.getTeleport().warp(name, this.getName());
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.earth2me.essentials.commands;
|
||||
|
||||
import com.earth2me.essentials.User;
|
||||
import com.earth2me.essentials.Util;
|
||||
import org.bukkit.Server;
|
||||
import org.bukkit.World;
|
||||
|
||||
|
@ -28,13 +29,17 @@ public class Commandweather extends EssentialsCommand
|
|||
|
||||
world.setStorm(isStorm ? true : false);
|
||||
world.setWeatherDuration(Integer.parseInt(args[1]) * 20);
|
||||
user.sendMessage("§7You set the weather to " + (isStorm ? "storm" : "sun") + " in your world for " + args[1] + " seconds");
|
||||
user.sendMessage(isStorm
|
||||
? Util.format("weatherStormFor", args[1])
|
||||
: Util.format("weatherSunFor", args[1]));
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
world.setStorm(isStorm ? true : false);
|
||||
user.sendMessage("§7You set the weather to " + (isStorm ? "storm" : "sun") + " in your world");
|
||||
user.sendMessage(isStorm
|
||||
? Util.i18n("weatherStorm")
|
||||
: Util.i18n("weatherSun"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,8 +20,7 @@ public class Commandwhois extends EssentialsCommand
|
|||
{
|
||||
if (args.length < 1)
|
||||
{
|
||||
sender.sendMessage("§cUsage: /whois [nickname]");
|
||||
return;
|
||||
throw new NotEnoughArgumentsException();
|
||||
}
|
||||
String whois = args[0].toLowerCase();
|
||||
charge(sender);
|
||||
|
@ -37,20 +36,22 @@ public class Commandwhois extends EssentialsCommand
|
|||
continue;
|
||||
}
|
||||
sender.sendMessage("");
|
||||
sender.sendMessage(u.getDisplayName() + " is " + u.getName());
|
||||
sender.sendMessage(ChatColor.BLUE + " - Health: " + u.getHealth() + "/20");
|
||||
sender.sendMessage(ChatColor.BLUE + " - Location: (" + u.getLocation().getWorld().getName() + ", " + u.getLocation().getBlockX() + ", " + u.getLocation().getBlockY() + ", " + u.getLocation().getBlockZ() + ")");
|
||||
sender.sendMessage(Util.format("whoisIs", u.getDisplayName(), u.getName()));
|
||||
sender.sendMessage(Util.format("whoisHealth", u.getHealth()));
|
||||
sender.sendMessage(Util.format("whoisLocation", u.getLocation().getWorld().getName(), u.getLocation().getBlockX(), u.getLocation().getBlockY(), u.getLocation().getBlockZ()));
|
||||
if (!ess.getConfiguration().getBoolean("disable-eco", false))
|
||||
{
|
||||
sender.sendMessage(ChatColor.BLUE + " - Money: " + Util.formatCurrency(u.getMoney()));
|
||||
sender.sendMessage(Util.format("whoisMoney", Util.formatCurrency(u.getMoney())));
|
||||
}
|
||||
sender.sendMessage(ChatColor.BLUE + " - Status: " + (u.isAfk() ? "§cAway§f" : "Available"));
|
||||
sender.sendMessage(ChatColor.BLUE + " - IP Address: " + u.getAddress().getAddress().toString());
|
||||
sender.sendMessage(u.isAfk()
|
||||
? Util.i18n("whoisStatusAway")
|
||||
: Util.i18n("whoisStatusAvailable"));
|
||||
sender.sendMessage(Util.format("whoisIPAddress", u.getAddress().getAddress().toString()));
|
||||
String location = u.getGeoLocation();
|
||||
if (location != null
|
||||
&& (sender instanceof Player ? ess.getUser(sender).isAuthorized("essentials.geoip.show") : true))
|
||||
{
|
||||
sender.sendMessage(ChatColor.BLUE + " - Location: " + location.toString());
|
||||
sender.sendMessage(Util.format("whoisGeoLocation", location.toString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ import org.bukkit.Server;
|
|||
import org.bukkit.World;
|
||||
import com.earth2me.essentials.Essentials;
|
||||
import com.earth2me.essentials.User;
|
||||
import com.earth2me.essentials.Util;
|
||||
|
||||
|
||||
public class Commandworld extends EssentialsCommand
|
||||
|
@ -43,9 +44,9 @@ public class Commandworld extends EssentialsCommand
|
|||
world = ess.getWorld(getFinalArg(args, 0));
|
||||
if (world == null)
|
||||
{
|
||||
user.sendMessage("§cInvalid world.");
|
||||
user.sendMessage("§7Possible worlds are the numbers 0 through " + (server.getWorlds().size() - 1) + ".");
|
||||
user.sendMessage("§7You can also type the name of a specific world.");
|
||||
user.sendMessage(Util.i18n("invalidWorld"));
|
||||
user.sendMessage(Util.format("possibleWorlds", server.getWorlds().size() - 1));
|
||||
user.sendMessage(Util.i18n("typeWorldName"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,6 @@ import org.bukkit.inventory.ItemStack;
|
|||
|
||||
public class Commandworth extends EssentialsCommand
|
||||
{
|
||||
|
||||
public Commandworth()
|
||||
{
|
||||
super("worth");
|
||||
|
@ -43,14 +42,21 @@ public class Commandworth extends EssentialsCommand
|
|||
double worth = Essentials.getWorth().getPrice(is);
|
||||
if (Double.isNaN(worth))
|
||||
{
|
||||
throw new Exception("That item cannot be sold to the server.");
|
||||
throw new Exception(Util.i18n("itemCannotBeSold"));
|
||||
}
|
||||
|
||||
user.charge(this);
|
||||
user.sendMessage("§7Stack of "
|
||||
+ is.getType().toString().toLowerCase().replace("_", "")
|
||||
+ (is.getDurability() !=0 ? " with metadata of "+ String.valueOf(is.getDurability()) : "")
|
||||
+ " worth §c" + Util.formatCurrency(worth*amount) + "§7 ("
|
||||
+ amount + " item(s) at " + Util.formatCurrency(worth) + " each)");
|
||||
user.charge(this);
|
||||
user.sendMessage(is.getDurability() != 0
|
||||
? Util.format("worthMeta",
|
||||
is.getType().toString().toLowerCase().replace("_", ""),
|
||||
is.getDurability(),
|
||||
Util.formatCurrency(worth * amount),
|
||||
amount,
|
||||
Util.formatCurrency(worth))
|
||||
: Util.format("worth",
|
||||
is.getType().toString().toLowerCase().replace("_", ""),
|
||||
Util.formatCurrency(worth * amount),
|
||||
amount,
|
||||
Util.formatCurrency(worth)));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ import org.bukkit.command.CommandSender;
|
|||
import com.earth2me.essentials.Essentials;
|
||||
import org.bukkit.entity.Player;
|
||||
import com.earth2me.essentials.User;
|
||||
import com.earth2me.essentials.Util;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
|
||||
|
@ -27,11 +28,11 @@ public abstract class EssentialsCommand implements IEssentialsCommand
|
|||
return name;
|
||||
}
|
||||
|
||||
protected User getPlayer(Server server, String[] args, int pos) throws IndexOutOfBoundsException, NoSuchFieldException
|
||||
protected User getPlayer(Server server, String[] args, int pos) throws NoSuchFieldException, NotEnoughArgumentsException
|
||||
{
|
||||
if (args.length <= pos) throw new IndexOutOfBoundsException("§cInvalid command syntax. Did you forget an argument?");
|
||||
if (args.length <= pos) throw new NotEnoughArgumentsException();
|
||||
List<Player> matches = server.matchPlayer(args[pos]);
|
||||
if (matches.size() < 1) throw new NoSuchFieldException("§cNo matching players could be found.");
|
||||
if (matches.size() < 1) throw new NoSuchFieldException(Util.i18n("noPlayerFound"));
|
||||
for (Player p : matches)
|
||||
{
|
||||
if (p.getDisplayName().startsWith(args[pos]))
|
||||
|
@ -61,7 +62,7 @@ public abstract class EssentialsCommand implements IEssentialsCommand
|
|||
|
||||
protected void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
|
||||
{
|
||||
throw new Exception("Only in-game players can use " + commandLabel + ".");
|
||||
throw new Exception(Util.format("onlyPlayers", commandLabel));
|
||||
}
|
||||
|
||||
public static String getFinalArg(String[] args, int start)
|
||||
|
|
|
@ -263,3 +263,40 @@ teleportRequest = \u00a7c{0}\u00a7c has requested to teleport to you.
|
|||
typeTpaccept = \u00a77To teleport, type \u00a7c/tpaccept\u00a77.
|
||||
typeTpdeny = \u00a77To deny this request, type \u00a7c/tpdeny\u00a77.
|
||||
requestSent = \u00a77Request sent to {0}\u00a77.
|
||||
teleportHereRequest = \u00a7c{0}\u00a7c has requested that you teleport to him/her.
|
||||
teleportAll = \u00a77Teleporting all players...
|
||||
noPendingRequest = You do not have a pending request.
|
||||
requestDenied = \u00a77Teleport request denied.
|
||||
requestAccepted = \u00a77Teleport request accepted.
|
||||
teleportationEnabled = \u00a77Teleportation enabled.
|
||||
teleportationDisabled = \u00a77Teleportation disabled.
|
||||
treeSpawned = \u00a77Tree spawned.
|
||||
treeFailure = \u00a7cTree generation failure. Try again on grass or dirt.
|
||||
unbannedPlayer = Unbanned player.
|
||||
unbannedIP = Unbanned IP address.
|
||||
unlimitedItems = Unlimited items:
|
||||
none = none
|
||||
unlimitedItemPermission = \u00a7cNo permission for unlimited item {0}.
|
||||
disableUnlimited = \u00a77Disable unlimited placing of {0} for {1}.
|
||||
enableUnlimited = \u00a77Giving unlimited amount of {0} to {1}.
|
||||
warpListPermission = \u00a7cYou do not have Permission to list that warps.
|
||||
noWarpsDefined = No warps defined
|
||||
warpUsePermission = \u00a7cYou do not have Permission to use that warp.
|
||||
weatherSunFor = \u00a77You set the weather to sun in your world for {0} seconds
|
||||
weatherSun = \u00a77You set the weather to sun in your world
|
||||
weatherStormFor = \u00a77You set the weather to storm in your world for {0} seconds
|
||||
weatherStorm = \u00a77You set the weather to storm in your world
|
||||
whoisIs = {0} is {1}
|
||||
whoisHealth = \u00a79 - Health: {0}/20
|
||||
whoisLocation = \u00a79 - Location: ({0}, {1}, {2}, {3})
|
||||
whoisMoney = \u00a79 - Money: {0}
|
||||
whoisStatusAway = \u00a79 - Status: \u00a7cAway\u00a7f
|
||||
whoisStatusAvailable = \u00a79 - Status: Available
|
||||
whoisIPAddress = \u00a79 - IP Address: {0}
|
||||
whoisGeoLocation = \u00a79 - Location: {0}
|
||||
invalidWorld = \u00a7cInvalid world.
|
||||
possibleWorlds = \u00a77Possible worlds are the numbers 0 through {0}.
|
||||
typeWorldName = \u00a77You can also type the name of a specific world.
|
||||
worth = \u00a77Stack of {0} worth \u00a7c{1}\u00a77 ({2} item(s) at {3} each)
|
||||
worthMeta = \u00a77Stack of {0} with metadata of {1} worth \u00a7c{2}\u00a77 ({3} item(s) at {4} each)
|
||||
onlyPlayers = Only in-game players can use {0}.
|
|
@ -263,3 +263,40 @@ teleportRequest = \u00a7c{0}\u00a7c has requested to teleport to you.
|
|||
typeTpaccept = \u00a77To teleport, type \u00a7c/tpaccept\u00a77.
|
||||
typeTpdeny = \u00a77To deny this request, type \u00a7c/tpdeny\u00a77.
|
||||
requestSent = \u00a77Request sent to {0}\u00a77.
|
||||
teleportHereRequest = \u00a7c{0}\u00a7c has requested that you teleport to him/her.
|
||||
teleportAll = \u00a77Teleporting all players...
|
||||
noPendingRequest = You do not have a pending request.
|
||||
requestDenied = \u00a77Teleport request denied.
|
||||
requestAccepted = \u00a77Teleport request accepted.
|
||||
teleportationEnabled = \u00a77Teleportation enabled.
|
||||
teleportationDisabled = \u00a77Teleportation disabled.
|
||||
treeSpawned = \u00a77Tree spawned.
|
||||
treeFailure = \u00a7cTree generation failure. Try again on grass or dirt.
|
||||
unbannedPlayer = Unbanned player.
|
||||
unbannedIP = Unbanned IP address.
|
||||
unlimitedItems = Unlimited items:
|
||||
none = none
|
||||
unlimitedItemPermission = \u00a7cNo permission for unlimited item {0}.
|
||||
disableUnlimited = \u00a77Disable unlimited placing of {0} for {1}.
|
||||
enableUnlimited = \u00a77Giving unlimited amount of {0} to {1}.
|
||||
warpListPermission = \u00a7cYou do not have Permission to list that warps.
|
||||
noWarpsDefined = No warps defined
|
||||
warpUsePermission = \u00a7cYou do not have Permission to use that warp.
|
||||
weatherSunFor = \u00a77You set the weather to sun in your world for {0} seconds
|
||||
weatherSun = \u00a77You set the weather to sun in your world
|
||||
weatherStormFor = \u00a77You set the weather to storm in your world for {0} seconds
|
||||
weatherStorm = \u00a77You set the weather to storm in your world
|
||||
whoisIs = {0} is {1}
|
||||
whoisHealth = \u00a79 - Health: {0}/20
|
||||
whoisLocation = \u00a79 - Location: ({0}, {1}, {2}, {3})
|
||||
whoisMoney = \u00a79 - Money: {0}
|
||||
whoisStatusAway = \u00a79 - Status: \u00a7cAway\u00a7f
|
||||
whoisStatusAvailable = \u00a79 - Status: Available
|
||||
whoisIPAddress = \u00a79 - IP Address: {0}
|
||||
whoisGeoLocation = \u00a79 - Location: {0}
|
||||
invalidWorld = \u00a7cInvalid world.
|
||||
possibleWorlds = \u00a77Possible worlds are the numbers 0 through {0}.
|
||||
typeWorldName = \u00a77You can also type the name of a specific world.
|
||||
worth = \u00a77Stack of {0} worth \u00a7c{1}\u00a77 ({2} item(s) at {3} each)
|
||||
worthMeta = \u00a77Stack of {0} with metadata of {1} worth \u00a7c{2}\u00a77 ({3} item(s) at {4} each)
|
||||
onlyPlayers = Only in-game players can use {0}.
|
||||
|
|
Loading…
Reference in a new issue