mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-05 20:12:54 +00:00
Fixing a few TL Keys
This commit is contained in:
parent
c0490c0890
commit
dfbc1956c9
12 changed files with 39 additions and 19 deletions
|
@ -1,5 +1,6 @@
|
|||
package com.earth2me.essentials;
|
||||
|
||||
import static com.earth2me.essentials.I18n._;
|
||||
import java.io.File;
|
||||
import java.util.*;
|
||||
import java.util.logging.Logger;
|
||||
|
@ -176,8 +177,7 @@ public abstract class UserData extends PlayerExtension implements IConf
|
|||
}
|
||||
else
|
||||
{
|
||||
//TODO: move this message to messages file
|
||||
throw new Exception("Home " + name + " doesn't exist");
|
||||
throw new Exception(_("invalidHome", name));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.earth2me.essentials.commands;
|
||||
|
||||
import static com.earth2me.essentials.I18n._;
|
||||
import com.earth2me.essentials.User;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Server;
|
||||
|
@ -29,7 +30,7 @@ public class Commandbreak extends EssentialsCommand
|
|||
}
|
||||
if (block.getType() == Material.BEDROCK && !user.isAuthorized("essentials.break.bedrock"))
|
||||
{
|
||||
throw new Exception("You are not allowed to destroy bedrock."); //TODO: Translation
|
||||
throw new Exception(_("noBreakBedrock"));
|
||||
}
|
||||
final BlockBreakEvent event = new BlockBreakEvent(block, user.getBase());
|
||||
server.getPluginManager().callEvent(event);
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.earth2me.essentials.commands;
|
||||
|
||||
import static com.earth2me.essentials.I18n._;
|
||||
import com.earth2me.essentials.craftbukkit.InventoryWorkaround;
|
||||
import com.earth2me.essentials.User;
|
||||
import java.util.Locale;
|
||||
|
@ -19,7 +20,6 @@ public class Commandgive extends EssentialsCommand
|
|||
super("give");
|
||||
}
|
||||
|
||||
//TODO: move these messages to message file
|
||||
@Override
|
||||
public void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
|
||||
{
|
||||
|
@ -39,7 +39,7 @@ public class Commandgive extends EssentialsCommand
|
|||
: (!ess.getUser(sender).isAuthorized("essentials.itemspawn.exempt")
|
||||
&& !ess.getUser(sender).canSpawnItem(stack.getTypeId()))))
|
||||
{
|
||||
throw new Exception(ChatColor.RED + "You are not allowed to spawn the item " + itemname);
|
||||
throw new Exception(_("cantSpawnItem", itemname));
|
||||
}
|
||||
|
||||
final User giveTo = getPlayer(server, args, 0);
|
||||
|
@ -82,7 +82,7 @@ public class Commandgive extends EssentialsCommand
|
|||
|
||||
if (stack.getType() == Material.AIR)
|
||||
{
|
||||
throw new Exception(ChatColor.RED + "You can't give air.");
|
||||
throw new Exception(_("cantSpawnItem", "Air"));
|
||||
}
|
||||
|
||||
final String itemName = stack.getType().toString().toLowerCase(Locale.ENGLISH).replace('_', ' ');
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.earth2me.essentials.commands;
|
||||
|
||||
import static com.earth2me.essentials.I18n._;
|
||||
import com.earth2me.essentials.User;
|
||||
import com.earth2me.essentials.Util;
|
||||
import org.bukkit.Server;
|
||||
|
@ -30,14 +31,12 @@ public class Commandsudo extends EssentialsCommand
|
|||
System.arraycopy(args, 2, arguments, 0, args.length - 2);
|
||||
}
|
||||
|
||||
//TODO: Translate this.
|
||||
if (user.isAuthorized("essentials.sudo.exempt"))
|
||||
{
|
||||
throw new Exception("You cannot sudo this user");
|
||||
throw new Exception(_("sudoExempt"));
|
||||
}
|
||||
|
||||
//TODO: Translate this.
|
||||
sender.sendMessage("Forcing " + user.getDisplayName() + " to run: /" + command + " " + getFinalArg(arguments, 0));
|
||||
sender.sendMessage(_("sudoRun", user.getDisplayName(), command, getFinalArg(arguments, 0)));
|
||||
|
||||
final PluginCommand execCommand = ess.getServer().getPluginCommand(command);
|
||||
if (execCommand != null)
|
||||
|
|
|
@ -39,8 +39,7 @@ public class Commandtp extends EssentialsCommand
|
|||
default:
|
||||
if (!user.isAuthorized("essentials.tpohere"))
|
||||
{
|
||||
//TODO: Translate this
|
||||
throw new Exception("You need access to /tpohere to teleport other players.");
|
||||
throw new Exception(_("needTpohere"));
|
||||
}
|
||||
user.sendMessage(_("teleporting"));
|
||||
final User target = getPlayer(server, args, 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue