mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2025-06-29 03:36:42 +00:00
removal of aero
This commit is contained in:
@ -4,10 +4,9 @@ import com.google.common.collect.Maps;
|
||||
import java.util.Map;
|
||||
import lombok.Getter;
|
||||
import me.totalfreedom.totalfreedommod.FreedomService;
|
||||
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
|
||||
import me.totalfreedom.totalfreedommod.config.YamlConfig;
|
||||
import me.totalfreedom.totalfreedommod.util.FLog;
|
||||
import net.pravian.aero.config.YamlConfig;
|
||||
import net.pravian.aero.util.Ips;
|
||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -28,21 +27,19 @@ public class ActivityLog extends FreedomService
|
||||
|
||||
private final YamlConfig config;
|
||||
|
||||
public ActivityLog(TotalFreedomMod plugin)
|
||||
public ActivityLog()
|
||||
{
|
||||
super(plugin);
|
||||
|
||||
this.config = new YamlConfig(plugin, FILENAME, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStart()
|
||||
public void onStart()
|
||||
{
|
||||
load();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStop()
|
||||
public void onStop()
|
||||
{
|
||||
save();
|
||||
}
|
||||
@ -110,7 +107,7 @@ public class ActivityLog extends FreedomService
|
||||
ActivityLogEntry activityLog = getEntryByName(player.getName());
|
||||
if (activityLog == null)
|
||||
{
|
||||
String ip = Ips.getIp(player);
|
||||
String ip = FUtil.getIp(player);
|
||||
activityLog = getEntryByIp(ip);
|
||||
if (activityLog != null)
|
||||
{
|
||||
@ -129,7 +126,7 @@ public class ActivityLog extends FreedomService
|
||||
config.save();
|
||||
}
|
||||
}
|
||||
String ip = Ips.getIp(player);
|
||||
String ip = FUtil.getIp(player);
|
||||
if (!activityLog.getIps().contains(ip))
|
||||
{
|
||||
activityLog.addIp(ip);
|
||||
|
@ -6,15 +6,13 @@ import java.util.Date;
|
||||
import java.util.List;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import me.totalfreedom.totalfreedommod.config.IConfig;
|
||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||
import net.pravian.aero.base.ConfigLoadable;
|
||||
import net.pravian.aero.base.ConfigSavable;
|
||||
import net.pravian.aero.base.Validatable;
|
||||
import org.apache.commons.lang.Validate;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class ActivityLogEntry implements ConfigLoadable, ConfigSavable, Validatable
|
||||
public class ActivityLogEntry implements IConfig
|
||||
{
|
||||
|
||||
@Getter
|
||||
|
@ -15,7 +15,6 @@ import me.totalfreedom.totalfreedommod.TotalFreedomMod;
|
||||
import me.totalfreedom.totalfreedommod.rank.Rank;
|
||||
import me.totalfreedom.totalfreedommod.util.FLog;
|
||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||
import net.pravian.aero.util.Ips;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -58,7 +57,7 @@ public class Admin
|
||||
public Admin(Player player)
|
||||
{
|
||||
this.name = player.getName();
|
||||
this.ips.add(Ips.getIp(player));
|
||||
this.ips.add(FUtil.getIp(player));
|
||||
}
|
||||
|
||||
public Admin(ResultSet resultSet)
|
||||
@ -107,7 +106,7 @@ public class Admin
|
||||
{
|
||||
name = player.getName();
|
||||
ips.clear();
|
||||
ips.add(Ips.getIp(player));
|
||||
ips.add(FUtil.getIp(player));
|
||||
}
|
||||
|
||||
public Map<String, Object> toSQLStorable()
|
||||
|
@ -1,6 +1,5 @@
|
||||
package me.totalfreedom.totalfreedommod.admin;
|
||||
|
||||
import com.google.common.base.Function;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Sets;
|
||||
import java.sql.ResultSet;
|
||||
@ -13,16 +12,13 @@ import java.util.Set;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import lombok.Getter;
|
||||
import me.totalfreedom.totalfreedommod.FreedomService;
|
||||
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
|
||||
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
|
||||
import me.totalfreedom.totalfreedommod.rank.Rank;
|
||||
import me.totalfreedom.totalfreedommod.util.FLog;
|
||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||
import net.pravian.aero.util.Ips;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.plugin.ServicePriority;
|
||||
|
||||
public class AdminList extends FreedomService
|
||||
{
|
||||
@ -37,20 +33,15 @@ public class AdminList extends FreedomService
|
||||
public final Map<String, List<String>> verifiedNoAdminIps = Maps.newHashMap();
|
||||
public static ArrayList<Player> vanished = new ArrayList<>();
|
||||
|
||||
public AdminList(TotalFreedomMod plugin)
|
||||
{
|
||||
super(plugin);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStart()
|
||||
public void onStart()
|
||||
{
|
||||
load();
|
||||
deactivateOldEntries(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStop()
|
||||
public void onStop()
|
||||
{
|
||||
}
|
||||
|
||||
@ -139,7 +130,7 @@ public class AdminList extends FreedomService
|
||||
public Admin getAdmin(Player player)
|
||||
{
|
||||
// Find admin
|
||||
String ip = Ips.getIp(player);
|
||||
String ip = FUtil.getIp(player);
|
||||
Admin admin = getEntryByName(player.getName());
|
||||
|
||||
// Admin by name
|
||||
@ -223,7 +214,7 @@ public class AdminList extends FreedomService
|
||||
|
||||
public boolean isVerifiedAdmin(Player player)
|
||||
{
|
||||
return verifiedNoAdmins.contains(player.getName()) && verifiedNoAdminIps.get(player.getName()).contains(Ips.getIp(player));
|
||||
return verifiedNoAdmins.contains(player.getName()) && verifiedNoAdminIps.get(player.getName()).contains(FUtil.getIp(player));
|
||||
}
|
||||
|
||||
public boolean isIdentityMatched(Player player)
|
||||
|
Reference in New Issue
Block a user