mirror of
https://github.com/songoda/SongodaCore.git
synced 2024-11-27 12:35:12 +01:00
Removed legacy code.
This commit is contained in:
parent
4eae6a667e
commit
3935f920f9
@ -8,7 +8,6 @@ import com.songoda.core.core.PluginInfo;
|
||||
import com.songoda.core.core.PluginInfoModule;
|
||||
import com.songoda.core.core.SongodaCoreCommand;
|
||||
import com.songoda.core.core.SongodaCoreDiagCommand;
|
||||
import com.songoda.core.core.SongodaCoreShowGuiKeysCommand;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
@ -18,7 +17,6 @@ import org.bukkit.event.player.PlayerLoginEvent;
|
||||
import org.bukkit.event.player.PlayerQuitEvent;
|
||||
import org.bukkit.event.server.PluginDisableEvent;
|
||||
import org.bukkit.event.server.PluginEnableEvent;
|
||||
import org.bukkit.plugin.PluginManager;
|
||||
import org.bukkit.plugin.ServicePriority;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import org.bukkit.scheduler.BukkitTask;
|
||||
@ -178,7 +176,6 @@ public class SongodaCore {
|
||||
tasks.add(Bukkit.getScheduler().runTaskLaterAsynchronously(piggybackedPlugin, () -> {
|
||||
CommandManager.registerCommandDynamically(piggybackedPlugin, "songoda", commandManager, commandManager);
|
||||
}, 20 * 60 * 2));
|
||||
tasks.add(Bukkit.getScheduler().runTaskLaterAsynchronously(piggybackedPlugin, () -> registerAllPlugins(), 20 * 60 * 2));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -199,75 +196,6 @@ public class SongodaCore {
|
||||
|
||||
private ArrayList<BukkitTask> tasks = new ArrayList();
|
||||
|
||||
/**
|
||||
* Register plugins that may not have been updated yet
|
||||
*/
|
||||
private void registerAllPlugins() {
|
||||
PluginManager pm = Bukkit.getPluginManager();
|
||||
String p;
|
||||
if (!isRegistered(p = "EpicAnchors") && pm.isPluginEnabled(p)) {
|
||||
register((JavaPlugin) pm.getPlugin(p), 31, CompatibleMaterial.END_PORTAL_FRAME.name());
|
||||
}
|
||||
if (!isRegistered(p = "EpicBosses") && pm.isPluginEnabled(p)) {
|
||||
register((JavaPlugin) pm.getPlugin(p), 19, CompatibleMaterial.ZOMBIE_SPAWN_EGG.name());
|
||||
}
|
||||
if (!isRegistered(p = "EpicEnchants") && pm.isPluginEnabled(p)) {
|
||||
register((JavaPlugin) pm.getPlugin(p), 67, CompatibleMaterial.DIAMOND_SWORD.name());
|
||||
}
|
||||
if (!isRegistered(p = "EpicFarming") && pm.isPluginEnabled(p)) {
|
||||
register((JavaPlugin) pm.getPlugin(p), 21, CompatibleMaterial.WHEAT.name());
|
||||
}
|
||||
if (!isRegistered(p = "EpicFurnaces") && pm.isPluginEnabled(p)) {
|
||||
register((JavaPlugin) pm.getPlugin(p), 22, CompatibleMaterial.FURNACE.name());
|
||||
}
|
||||
if (!isRegistered(p = "EpicHeads") && pm.isPluginEnabled(p)) {
|
||||
register((JavaPlugin) pm.getPlugin(p), 26, CompatibleMaterial.PLAYER_HEAD.name());
|
||||
}
|
||||
if (!isRegistered(p = "EpicHoppers") && pm.isPluginEnabled(p)) {
|
||||
register((JavaPlugin) pm.getPlugin(p), 15, CompatibleMaterial.HOPPER.name());
|
||||
}
|
||||
if (!isRegistered(p = "EpicLevels") && pm.isPluginEnabled(p)) {
|
||||
register((JavaPlugin) pm.getPlugin(p), 44, CompatibleMaterial.NETHER_STAR.name());
|
||||
}
|
||||
if (!isRegistered(p = "EpicSpawners") && pm.isPluginEnabled(p)) {
|
||||
register((JavaPlugin) pm.getPlugin(p), 13, CompatibleMaterial.SPAWNER.name());
|
||||
}
|
||||
if (!isRegistered(p = "EpicVouchers") && pm.isPluginEnabled(p)) {
|
||||
register((JavaPlugin) pm.getPlugin(p), 25, CompatibleMaterial.EMERALD.name());
|
||||
}
|
||||
if (!isRegistered(p = "FabledSkyBlock") && pm.isPluginEnabled(p)) {
|
||||
register((JavaPlugin) pm.getPlugin(p), 17, CompatibleMaterial.GRASS_BLOCK.name());
|
||||
}
|
||||
if (!isRegistered(p = "UltimateCatcher") && pm.isPluginEnabled(p)) {
|
||||
register((JavaPlugin) pm.getPlugin(p), 51, CompatibleMaterial.EGG.name());
|
||||
}
|
||||
if (!isRegistered(p = "UltimateClaims") && pm.isPluginEnabled(p)) {
|
||||
register((JavaPlugin) pm.getPlugin(p), 65, CompatibleMaterial.CHEST.name());
|
||||
}
|
||||
if (!isRegistered(p = "UltimateFishing") && pm.isPluginEnabled(p)) {
|
||||
register((JavaPlugin) pm.getPlugin(p), 59, CompatibleMaterial.COD.name());
|
||||
}
|
||||
if (!isRegistered(p = "UltimateKits") && pm.isPluginEnabled(p)) {
|
||||
register((JavaPlugin) pm.getPlugin(p), 14, CompatibleMaterial.BEACON.name());
|
||||
}
|
||||
if (!isRegistered(p = "UltimateModeration") && pm.isPluginEnabled(p)) {
|
||||
register((JavaPlugin) pm.getPlugin(p), 29, CompatibleMaterial.DIAMOND_CHESTPLATE.name());
|
||||
}
|
||||
if (!isRegistered(p = "UltimateRepairing") && pm.isPluginEnabled(p)) {
|
||||
register((JavaPlugin) pm.getPlugin(p), 20, CompatibleMaterial.ANVIL.name());
|
||||
}
|
||||
if (!isRegistered(p = "UltimateStacker") && pm.isPluginEnabled(p)) {
|
||||
register((JavaPlugin) pm.getPlugin(p), 16, CompatibleMaterial.IRON_INGOT.name());
|
||||
}
|
||||
if (!isRegistered(p = "UltimateTimber") && pm.isPluginEnabled(p)) {
|
||||
register((JavaPlugin) pm.getPlugin(p), 18, CompatibleMaterial.IRON_AXE.name());
|
||||
}
|
||||
}
|
||||
|
||||
private void register(JavaPlugin plugin, int pluginID, String icon) {
|
||||
register(plugin, pluginID, icon, "?");
|
||||
}
|
||||
|
||||
private void register(JavaPlugin plugin, int pluginID, String icon, String libraryVersion) {
|
||||
System.out.println(getPrefix() + "Hooked " + plugin.getName() + ".");
|
||||
PluginInfo info = new PluginInfo(plugin, pluginID, icon, libraryVersion);
|
||||
|
@ -1,42 +0,0 @@
|
||||
package com.songoda.core.core;
|
||||
|
||||
import com.songoda.core.commands.AbstractCommand;
|
||||
import com.songoda.core.gui.CustomizableGui;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class SongodaCoreShowGuiKeysCommand extends AbstractCommand {
|
||||
|
||||
public SongodaCoreShowGuiKeysCommand() {
|
||||
super(false, "showguikeys");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ReturnType runCommand(CommandSender sender, String... args) {
|
||||
sender.sendMessage(CustomizableGui.toggleShowGuiKeys() ? "Now showing keys." : "No longer showing keys.");
|
||||
|
||||
return ReturnType.SUCCESS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPermissionNode() {
|
||||
return "songoda.admin";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSyntax() {
|
||||
return "/songoda showguikeys";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "Show the keys for all items in every gui.";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<String> onTab(CommandSender sender, String... args) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user