mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-07-07 22:38:06 +00:00
Switch to the new I18n class and format cleanup of all classes
This commit is contained in:
parent
19f5a2340d
commit
220d68f375
207 changed files with 1247 additions and 1306 deletions
|
@ -1,7 +1,7 @@
|
|||
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;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
@ -31,19 +31,20 @@ public class Commandlightning extends EssentialsCommand
|
|||
|
||||
if (server.matchPlayer(args[0]).isEmpty())
|
||||
{
|
||||
throw new Exception(Util.i18n("playerNotFound"));
|
||||
throw new Exception(_("playerNotFound"));
|
||||
}
|
||||
|
||||
for (Player matchPlayer : server.matchPlayer(args[0]))
|
||||
{
|
||||
sender.sendMessage(Util.format("lightningUse", matchPlayer.getDisplayName()));
|
||||
sender.sendMessage(_("lightningUse", matchPlayer.getDisplayName()));
|
||||
matchPlayer.getWorld().strikeLightning(matchPlayer.getLocation());
|
||||
if (!ess.getUser(matchPlayer).isGodModeEnabled()) {
|
||||
if (!ess.getUser(matchPlayer).isGodModeEnabled())
|
||||
{
|
||||
matchPlayer.setHealth(matchPlayer.getHealth() < 5 ? 0 : matchPlayer.getHealth() - 5);
|
||||
}
|
||||
if (ess.getSettings().warnOnSmite())
|
||||
{
|
||||
matchPlayer.sendMessage(Util.i18n("lightningSmited"));
|
||||
matchPlayer.sendMessage(_("lightningSmited"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue