mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-15 13:36:31 +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;
|
y = 127;
|
||||||
x += 1;
|
x += 1;
|
||||||
if (x - 16 > loc.getBlockX())
|
if (x - 32 > loc.getBlockX())
|
||||||
{
|
{
|
||||||
throw new Exception(Util.i18n("holeInFloor"));
|
throw new Exception(Util.i18n("holeInFloor"));
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,8 +21,17 @@ public class Commandunban extends EssentialsCommand
|
||||||
throw new NotEnoughArgumentsException();
|
throw new NotEnoughArgumentsException();
|
||||||
}
|
}
|
||||||
|
|
||||||
User u = getPlayer(server, args, 0, true);
|
String name;
|
||||||
ess.getBans().unbanByName(u.getName());
|
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"));
|
sender.sendMessage(Util.i18n("unbannedPlayer"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue