Minor fix

This commit is contained in:
Paul Reilly 2023-03-10 19:25:18 -06:00
parent 3a96c853d2
commit 49696f0c30

View File

@ -1,49 +1,26 @@
package me.totalfreedom.totalfreedommod; package me.totalfreedom.totalfreedommod;
import java.io.File;
import java.io.InputStream;
import java.util.Properties;
import me.totalfreedom.totalfreedommod.admin.ActivityLog; import me.totalfreedom.totalfreedommod.admin.ActivityLog;
import me.totalfreedom.totalfreedommod.admin.AdminList; import me.totalfreedom.totalfreedommod.admin.AdminList;
import me.totalfreedom.totalfreedommod.api.Aggregator; import me.totalfreedom.totalfreedommod.api.Aggregator;
import me.totalfreedom.totalfreedommod.api.ShoppeCommons; import me.totalfreedom.totalfreedommod.api.ShoppeCommons;
import me.totalfreedom.totalfreedommod.api.TFD4JCommons; import me.totalfreedom.totalfreedommod.api.TFD4JCommons;
import me.totalfreedom.totalfreedommod.api.VotifierCommons;
import me.totalfreedom.totalfreedommod.banning.BanManager; import me.totalfreedom.totalfreedommod.banning.BanManager;
import me.totalfreedom.totalfreedommod.banning.IndefiniteBanList; import me.totalfreedom.totalfreedommod.banning.IndefiniteBanList;
import me.totalfreedom.totalfreedommod.blocking.BlockBlocker; import me.totalfreedom.totalfreedommod.blocking.*;
import me.totalfreedom.totalfreedommod.blocking.EditBlocker;
import me.totalfreedom.totalfreedommod.blocking.EventBlocker;
import me.totalfreedom.totalfreedommod.blocking.InteractBlocker;
import me.totalfreedom.totalfreedommod.blocking.MobBlocker;
import me.totalfreedom.totalfreedommod.blocking.PVPBlocker;
import me.totalfreedom.totalfreedommod.blocking.PotionBlocker;
import me.totalfreedom.totalfreedommod.blocking.command.CommandBlocker; import me.totalfreedom.totalfreedommod.blocking.command.CommandBlocker;
import me.totalfreedom.totalfreedommod.bridge.BukkitTelnetBridge; import me.totalfreedom.totalfreedommod.bridge.*;
import me.totalfreedom.totalfreedommod.bridge.CoreProtectBridge;
import me.totalfreedom.totalfreedommod.bridge.EssentialsBridge;
import me.totalfreedom.totalfreedommod.bridge.LibsDisguisesBridge;
import me.totalfreedom.totalfreedommod.bridge.WorldEditBridge;
import me.totalfreedom.totalfreedommod.bridge.WorldGuardBridge;
import me.totalfreedom.totalfreedommod.caging.Cager; import me.totalfreedom.totalfreedommod.caging.Cager;
import me.totalfreedom.totalfreedommod.command.CommandLoader; import me.totalfreedom.totalfreedommod.command.CommandLoader;
import me.totalfreedom.totalfreedommod.config.MainConfig; import me.totalfreedom.totalfreedommod.config.MainConfig;
import me.totalfreedom.discord.TFD4J;
import me.totalfreedom.totalfreedommod.freeze.Freezer; import me.totalfreedom.totalfreedommod.freeze.Freezer;
import me.totalfreedom.totalfreedommod.fun.ItemFun; import me.totalfreedom.totalfreedommod.fun.*;
import me.totalfreedom.totalfreedommod.fun.Jumppads;
import me.totalfreedom.totalfreedommod.fun.Landminer;
import me.totalfreedom.totalfreedommod.fun.MP44;
import me.totalfreedom.totalfreedommod.fun.Trailer;
import me.totalfreedom.totalfreedommod.httpd.HTTPDaemon; import me.totalfreedom.totalfreedommod.httpd.HTTPDaemon;
import me.totalfreedom.totalfreedommod.permissions.PermissionConfig; import me.totalfreedom.totalfreedommod.permissions.PermissionConfig;
import me.totalfreedom.totalfreedommod.permissions.PermissionManager; import me.totalfreedom.totalfreedommod.permissions.PermissionManager;
import me.totalfreedom.totalfreedommod.player.PlayerList; import me.totalfreedom.totalfreedommod.player.PlayerList;
import me.totalfreedom.totalfreedommod.punishments.PunishmentList; import me.totalfreedom.totalfreedommod.punishments.PunishmentList;
import me.totalfreedom.totalfreedommod.rank.RankManager; import me.totalfreedom.totalfreedommod.rank.RankManager;
import me.totalfreedom.shop.Shop;
import me.totalfreedom.shop.Votifier;
import me.totalfreedom.totalfreedommod.sql.SQLite; import me.totalfreedom.totalfreedommod.sql.SQLite;
import me.totalfreedom.totalfreedommod.util.FLog; import me.totalfreedom.totalfreedommod.util.FLog;
import me.totalfreedom.totalfreedommod.util.FUtil; import me.totalfreedom.totalfreedommod.util.FUtil;
@ -58,6 +35,10 @@ import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.plugin.java.JavaPlugin;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import java.io.File;
import java.io.InputStream;
import java.util.Properties;
public class TotalFreedomMod extends JavaPlugin public class TotalFreedomMod extends JavaPlugin
{ {
public static final String CONFIG_FILENAME = "config.yml"; public static final String CONFIG_FILENAME = "config.yml";
@ -227,6 +208,22 @@ public class TotalFreedomMod extends JavaPlugin
return new CleanroomChunkGenerator(id); return new CleanroomChunkGenerator(id);
} }
public void registerDiscord()
{
if (Bukkit.getPluginManager().isPluginEnabled("TFD4J"))
{
dc = ag.getDiscordContext().getValue();
}
}
public void registerShoppe()
{
if (Bukkit.getPluginManager().isPluginEnabled("TF-Shoppe"))
{
sh = ag.getShoppeContext().getValue();
}
}
public static class BuildProperties public static class BuildProperties
{ {
public String author; public String author;
@ -255,8 +252,7 @@ public class TotalFreedomMod extends JavaPlugin
number = props.getProperty("buildNumber", "1"); number = props.getProperty("buildNumber", "1");
date = props.getProperty("buildDate", unknown); date = props.getProperty("buildDate", unknown);
head = props.getProperty("buildHead", unknown).replace("${git.commit.id.abbrev}", unknown); head = props.getProperty("buildHead", unknown).replace("${git.commit.id.abbrev}", unknown);
} } catch (Exception ex)
catch (Exception ex)
{ {
FLog.severe("Could not load build properties! Did you compile with NetBeans/Maven?"); FLog.severe("Could not load build properties! Did you compile with NetBeans/Maven?");
FLog.severe(ex); FLog.severe(ex);
@ -269,18 +265,6 @@ public class TotalFreedomMod extends JavaPlugin
} }
} }
public void registerDiscord() {
if (Bukkit.getPluginManager().isPluginEnabled("TFD4J")) {
dc = ag.getDiscordContext().getValue();
}
}
public void registerShoppe() {
if (Bukkit.getPluginManager().isPluginEnabled("TF-Shoppe")) {
sh = ag.getShoppeContext().getValue();
}
}
/** /**
* This class is provided to please Codacy. * This class is provided to please Codacy.
*/ */