mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-30 10:05:59 +00:00
Merge pull request #224 from CoolJWB/development
Fix tempban reason issues
This commit is contained in:
commit
cdb385dd20
@ -58,20 +58,17 @@ public class Command_tempban extends FreedomCommand
|
|||||||
final StringBuilder message = new StringBuilder("Temporarily banned " + player.getName());
|
final StringBuilder message = new StringBuilder("Temporarily banned " + player.getName());
|
||||||
|
|
||||||
Date expires = FUtil.parseDateOffset("30m");
|
Date expires = FUtil.parseDateOffset("30m");
|
||||||
|
message.append(" until ").append(date_format.format(expires));
|
||||||
|
|
||||||
|
String reason = null;
|
||||||
if (args.length >= 2)
|
if (args.length >= 2)
|
||||||
{
|
{
|
||||||
Date parsed_offset = FUtil.parseDateOffset(args[1]);
|
Date parsed_offset = FUtil.parseDateOffset(args[1]);
|
||||||
|
reason = StringUtils.join(ArrayUtils.subarray(args, parsed_offset == null ? 1 : 2, args.length), " ") + " (" + sender.getName() + ")";
|
||||||
if (parsed_offset != null)
|
if (parsed_offset != null)
|
||||||
{
|
{
|
||||||
expires = parsed_offset;
|
expires = parsed_offset;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
message.append(" until ").append(date_format.format(expires));
|
|
||||||
|
|
||||||
String reason = null;
|
|
||||||
if (args.length >= 3)
|
|
||||||
{
|
|
||||||
reason = StringUtils.join(ArrayUtils.subarray(args, 2, args.length), " ") + " (" + sender.getName() + ")";
|
|
||||||
message.append(", Reason: \"").append(reason).append("\"");
|
message.append(", Reason: \"").append(reason).append("\"");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user