diff options
Diffstat (limited to 'Essentials/src/com/earth2me/essentials/commands/Commandban.java')
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commandban.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandban.java b/Essentials/src/com/earth2me/essentials/commands/Commandban.java index a9408360f..7480864d7 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandban.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandban.java @@ -7,6 +7,8 @@ import com.earth2me.essentials.OfflinePlayer; import com.earth2me.essentials.User; import com.earth2me.essentials.utils.FormatUtil; import java.util.logging.Level; +import org.bukkit.BanList; +import org.bukkit.Bukkit; import org.bukkit.Server; @@ -61,9 +63,7 @@ public class Commandban extends EssentialsCommand banReason = tl("defaultBanReason"); } - user.setBanReason(tl("banFormat", banReason, senderName)); - user.getBase().setBanned(true); - user.setBanTimeout(0); + Bukkit.getBanList(BanList.Type.NAME).addBan(user.getName(), banReason, null, senderName); user.getBase().kickPlayer(tl("banFormat", banReason, senderName)); server.getLogger().log(Level.INFO, tl("playerBanned", senderName, user.getName(), banReason)); |