mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-14 13:13:24 +00:00
Fix unbanning players who don't have user files.
This commit is contained in:
parent
a753f322df
commit
5ca9927987
2 changed files with 13 additions and 4 deletions
|
@ -252,7 +252,7 @@ public class Util
|
|||
{
|
||||
y = 127;
|
||||
x += 1;
|
||||
if (x - 16 > loc.getBlockX())
|
||||
if (x - 32 > loc.getBlockX())
|
||||
{
|
||||
throw new Exception(Util.i18n("holeInFloor"));
|
||||
}
|
||||
|
|
|
@ -20,9 +20,18 @@ public class Commandunban extends EssentialsCommand
|
|||
{
|
||||
throw new NotEnoughArgumentsException();
|
||||
}
|
||||
|
||||
User u = getPlayer(server, args, 0, true);
|
||||
ess.getBans().unbanByName(u.getName());
|
||||
|
||||
String name;
|
||||
try
|
||||
{
|
||||
User u = getPlayer(server, args, 0, true);
|
||||
name = u.getName();
|
||||
}
|
||||
catch (NoSuchFieldException e)
|
||||
{
|
||||
name = args[0];
|
||||
}
|
||||
ess.getBans().unbanByName(name);
|
||||
sender.sendMessage(Util.i18n("unbannedPlayer"));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue