From ea404985fd36a9f3039664333cfe27ff251e655b Mon Sep 17 00:00:00 2001 From: Jerom van der Sar Date: Mon, 27 Apr 2015 00:39:36 +0200 Subject: [PATCH] Ban IPs in /tban. Resolves #499 --- buildnumber.properties | 4 ++-- .../StevenLawson/TotalFreedomMod/Commands/Command_tban.java | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/buildnumber.properties b/buildnumber.properties index d296377..950c1cb 100644 --- a/buildnumber.properties +++ b/buildnumber.properties @@ -1,3 +1,3 @@ #Build Number for ANT. Do not edit! -#Mon Apr 27 00:31:14 CEST 2015 -build.number=991 +#Mon Apr 27 00:39:03 CEST 2015 +build.number=992 diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_tban.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_tban.java index 907a79a..af56ddd 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_tban.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_tban.java @@ -2,6 +2,7 @@ package me.StevenLawson.TotalFreedomMod.Commands; import me.StevenLawson.TotalFreedomMod.TFM_Ban; import me.StevenLawson.TotalFreedomMod.TFM_BanManager; +import me.StevenLawson.TotalFreedomMod.TFM_PlayerData; import me.StevenLawson.TotalFreedomMod.TFM_Util; import me.StevenLawson.TotalFreedomMod.TFM_UuidManager; import org.bukkit.ChatColor; @@ -44,6 +45,8 @@ public class Command_tban extends TFM_Command TFM_Util.adminAction(sender.getName(), "Tempbanning: " + player.getName() + " for 5 minutes.", true); TFM_BanManager.addUuidBan( new TFM_Ban(TFM_UuidManager.getUniqueId(player), player.getName(), sender.getName(), TFM_Util.parseDateOffset("5m"), ChatColor.RED + "You have been temporarily banned for 5 minutes.")); + TFM_BanManager.addIpBan( + new TFM_Ban(TFM_Util.getIp(player), player.getName(), sender.getName(), TFM_Util.parseDateOffset("5m"), ChatColor.RED + "You have been temporarily banned for 5 minutes.")); player.kickPlayer(ChatColor.RED + "You have been temporarily banned for five minutes. Please read totalfreedom.me for more info.");