001 002 /** 003 * BanSystem.java - Handles all ban related things. 004 * 005 * @author James 006 */ 007 public class BanSystem { 008 009 /** 010 * Files a regular name-only ban. 011 * 012 * @param player 013 * player to ban 014 */ 015 public void fileBan(Player player) { 016 } 017 018 /** 019 * Files an IP address ban 020 * 021 * @param player 022 * player to IP ban 023 */ 024 public void fileIpBan(Player player) { 025 } 026 027 /** 028 * Files a temporary ban (both name and IP bans) 029 * 030 * @param player 031 * player to ban 032 * @param minutes 033 * length in minutes 034 * @param hours 035 * length in hours 036 * @param days 037 * length in days 038 */ 039 public void fileTempBan(Player player, int minutes, int hours, int days) { 040 // This is sort of crappy but I'm lazy. 041 int timestamp = ((int) (System.currentTimeMillis() / 1000L)); 042 timestamp += minutes * 60; 043 timestamp += hours * 60 * 60; 044 timestamp += days * 60 * 60 * 24; 045 } 046 }