summaryrefslogtreecommitdiffstats
path: root/Essentials/src/com/earth2me/essentials/commands/Commandtempban.java
diff options
context:
space:
mode:
authorKHobbits <rob@khobbits.co.uk>2013-06-08 22:31:19 +0100
committerKHobbits <rob@khobbits.co.uk>2013-06-08 22:31:19 +0100
commit7470ee685467e9dd7b1d6c0abf6e8ff174ed6e77 (patch)
treebaf76fef3065378e52b8e7657725c579889dc33a /Essentials/src/com/earth2me/essentials/commands/Commandtempban.java
parentc1bcfa628620bdce2ad29f908baa4bec0df7342c (diff)
downloadEssentials-7470ee685467e9dd7b1d6c0abf6e8ff174ed6e77.tar
Essentials-7470ee685467e9dd7b1d6c0abf6e8ff174ed6e77.tar.gz
Essentials-7470ee685467e9dd7b1d6c0abf6e8ff174ed6e77.tar.lz
Essentials-7470ee685467e9dd7b1d6c0abf6e8ff174ed6e77.tar.xz
Essentials-7470ee685467e9dd7b1d6c0abf6e8ff174ed6e77.zip
Split util classes.
Diffstat (limited to 'Essentials/src/com/earth2me/essentials/commands/Commandtempban.java')
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandtempban.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtempban.java b/Essentials/src/com/earth2me/essentials/commands/Commandtempban.java
index 016f7f773..689ffdfcc 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandtempban.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandtempban.java
@@ -3,7 +3,8 @@ package com.earth2me.essentials.commands;
import com.earth2me.essentials.Console;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
+import com.earth2me.essentials.utils.StringUtil;
+import com.earth2me.essentials.utils.DateUtil;
import java.util.GregorianCalendar;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
@@ -43,7 +44,7 @@ public class Commandtempban extends EssentialsCommand
}
}
final String time = getFinalArg(args, 1);
- final long banTimestamp = Util.parseDateDiff(time, true);
+ final long banTimestamp = DateUtil.parseDateDiff(time, true);
final long maxBanLength = ess.getSettings().getMaxTempban() * 1000;
if (maxBanLength > 0 && ((banTimestamp - GregorianCalendar.getInstance().getTimeInMillis()) > maxBanLength)
@@ -54,7 +55,7 @@ public class Commandtempban extends EssentialsCommand
}
final String senderName = sender instanceof Player ? ((Player)sender).getDisplayName() : Console.NAME;
- final String banReason = _("tempBanned", Util.formatDateDiff(banTimestamp), senderName);
+ final String banReason = _("tempBanned", DateUtil.formatDateDiff(banTimestamp), senderName);
user.setBanReason(banReason);
user.setBanTimeout(banTimestamp);
user.setBanned(true);