-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,11 @@ | |
import static com.earth2me.essentials.I18n.tl; | ||
import com.earth2me.essentials.User; | ||
import com.earth2me.essentials.utils.DateUtil; | ||
import java.util.Date; | ||
import java.util.GregorianCalendar; | ||
import java.util.logging.Level; | ||
import org.bukkit.BanList; | ||
import org.bukkit.Bukkit; | ||
import org.bukkit.Server; | ||
|
||
|
||
|
@@ -61,9 +64,8 @@ public void run(final Server server, final CommandSource sender, final String co | |
|
||
final String senderName = sender.isPlayer() ? sender.getPlayer().getDisplayName() : Console.NAME; | ||
final String banReason = tl("tempBanned", DateUtil.formatDateDiff(banTimestamp), senderName, stringDregs); | ||
user.setBanReason(banReason); | ||
user.setBanTimeout(banTimestamp); | ||
user.getBase().setBanned(true); | ||
|
||
Bukkit.getBanList(BanList.Type.NAME).addBan(user.getName(), banReason, new Date(banTimestamp), senderName); | ||
This comment has been minimized.
Sorry, something went wrong.
mibby
|
||
user.getBase().kickPlayer(banReason); | ||
|
||
final String message = tl("playerBanned", senderName, user.getName(), banReason, DateUtil.formatDateDiff(banTimestamp)); | ||
|
Really?