rename folder
This commit is contained in:
parent
87d0f75a4c
commit
5b089a57d8
@ -31,16 +31,12 @@ public final class Main extends JavaPlugin {
|
||||
private static Boolean enable = false;
|
||||
public static Boolean legacy = false;
|
||||
|
||||
public static String prefix = "§8[§4C§9GUI§8]";
|
||||
|
||||
public static String version;
|
||||
|
||||
public static List<String> autor;
|
||||
|
||||
public static Main plugin;
|
||||
public static List plugins;
|
||||
|
||||
public static String update_version = null;
|
||||
public static Boolean PaPi = false;
|
||||
public static Boolean PlotSquaredGUI = false;
|
||||
public static Boolean LuckyBox = false;
|
||||
@ -53,7 +49,6 @@ public final class Main extends JavaPlugin {
|
||||
|
||||
@Override
|
||||
public void onEnable() {
|
||||
plugins = Arrays.asList(getServer().getPluginManager().getPlugins());
|
||||
// Plugin startup logic
|
||||
// Plugin startup logic
|
||||
Logger logger = this.getLogger();
|
||||
@ -68,7 +63,7 @@ public final class Main extends JavaPlugin {
|
||||
if (PluginCheck.papi()) {
|
||||
PaPi = true;
|
||||
}
|
||||
Load.onLoad(prefix, autor, version, Util.getSpigot(), Util.getSpigotID(), Util.getDiscord(), Util.getBstatsID());
|
||||
Load.onLoad(Util.getPrefix(), autor, version, Util.getSpigot(), Util.getSpigotID(), Util.getDiscord(), Util.getBstatsID());
|
||||
enable = true;
|
||||
|
||||
}
|
||||
@ -88,13 +83,13 @@ public final class Main extends JavaPlugin {
|
||||
}
|
||||
|
||||
public static void addonEnable(Plugin plugin) {
|
||||
send.console(prefix + " §aAddon for: §e" + plugin.getName() + "§7 - Version: " + plugin.getDescription().getVersion() + " §aloaded successfully!");
|
||||
send.console(Util.getPrefix() + " §aAddon for: §e" + plugin.getName() + "§7 - Version: " + plugin.getDescription().getVersion() + " §aloaded successfully!");
|
||||
}
|
||||
|
||||
public static Boolean pluginNotFound(String pl, Integer spigotID) {
|
||||
if (Bukkit.getPluginManager().getPlugin(pl) == null) {
|
||||
plugin.getLogger().log(Level.SEVERE, "Plugin can not be loaded!");
|
||||
Bukkit.getConsoleSender().sendMessage(prefix + " §e" + pl + " §4could not be found. Please download it here: " +
|
||||
Bukkit.getConsoleSender().sendMessage(Util.getPrefix() + " §e" + pl + " §4could not be found. Please download it here: " +
|
||||
"§6https://spigotmc.org/resources/" + pl + "." + spigotID + " §4to be able to use this plugin.");
|
||||
Main.plugin.getPluginLoader().disablePlugin(Main.plugin);
|
||||
return true;
|
||||
@ -104,14 +99,14 @@ public final class Main extends JavaPlugin {
|
||||
public static Boolean pluginNotFound(String pl, Integer spigotID, double ver) {
|
||||
if (Bukkit.getPluginManager().getPlugin(pl) == null) {
|
||||
plugin.getLogger().log(Level.SEVERE, "Plugin can not be loaded!");
|
||||
Bukkit.getConsoleSender().sendMessage(prefix + " §e" + pl + " §4could not be found. Please download it here: " +
|
||||
Bukkit.getConsoleSender().sendMessage(Util.getPrefix() + " §e" + pl + " §4could not be found. Please download it here: " +
|
||||
"§6https://spigotmc.org/resources/" + pl + "." + spigotID + " §4to be able to use this plugin.");
|
||||
Main.plugin.getPluginLoader().disablePlugin(Main.plugin);
|
||||
return true;
|
||||
} else {
|
||||
if (Double.parseDouble(Bukkit.getPluginManager().getPlugin(pl).getDescription().getVersion()) < ver) {
|
||||
plugin.getLogger().log(Level.SEVERE, "Plugin can not be loaded!");
|
||||
Bukkit.getConsoleSender().sendMessage(prefix + " §e" + pl + " §4is out of date! This plugin requires at least version §2" + ver + " §4of §6" + pl + " §4Please update it here: §6https://spigotmc.org/resources/" + pl + "." + spigotID + " §4to use this version of " + plugin.getDescription().getName() + ".");
|
||||
Bukkit.getConsoleSender().sendMessage(Util.getPrefix() + " §e" + pl + " §4is out of date! This plugin requires at least version §2" + ver + " §4of §6" + pl + " §4Please update it here: §6https://spigotmc.org/resources/" + pl + "." + spigotID + " §4to use this version of " + plugin.getDescription().getName() + ".");
|
||||
Main.plugin.getPluginLoader().disablePlugin(Main.plugin);
|
||||
return true;
|
||||
}
|
||||
@ -126,7 +121,7 @@ public final class Main extends JavaPlugin {
|
||||
@Override
|
||||
public void onDisable() {
|
||||
// Plugin shutdown logic
|
||||
if (enable) T2CodeTemplate.onDisable(prefix, autor, version, Util.getSpigot(), Util.getDiscord());
|
||||
if (enable) T2CodeTemplate.onDisable(Util.getPrefix(), autor, version, Util.getSpigot(), Util.getDiscord());
|
||||
MySQL.close();
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
package de.jatitv.commandguiv2.Spigot.cmdManagement;
|
||||
|
||||
import de.jatitv.commandguiv2.Spigot.Listener.UseItem_Listener.Events;
|
||||
import de.jatitv.commandguiv2.Spigot.listener.UseItem_Listener.Events;
|
||||
import de.jatitv.commandguiv2.Spigot.Main;
|
||||
import de.jatitv.commandguiv2.Spigot.objects.Obj_Select;
|
||||
import de.jatitv.commandguiv2.Spigot.objects.guis.Gui;
|
||||
|
@ -15,10 +15,8 @@ public class AliasRegister {
|
||||
public static void onRegister() {
|
||||
Plugin plugin = Main.plugin;
|
||||
send.debug(plugin, Bukkit.getServer().getClass().getPackage().getName());
|
||||
File f = new File(Main.getPath() + "/GUIs/");
|
||||
File[] fileArray = f.listFiles();
|
||||
if (Main.allAliases.toString().equals("[]")) {
|
||||
send.console(Util.getSpigot() + " §4No GUI files available");
|
||||
send.console(Util.getPrefix() + " §4No GUI files available");
|
||||
return;
|
||||
}
|
||||
for (String alias : Main.allAliases) {
|
||||
|
@ -22,8 +22,8 @@ public class ConfigCreate {
|
||||
public static void configCreate() {
|
||||
long long_ = System.currentTimeMillis();
|
||||
if (new File(Main.getPath(), "config.yml").exists()) {
|
||||
if (Main.plugin.getConfig().getBoolean("Plugin.Debug")) send.console(Main.prefix + " §5DEBUG: §6" + " §4config.yml are created / updated...");
|
||||
} else send.console(Main.prefix + " §4config.yml are created...");
|
||||
if (Main.plugin.getConfig().getBoolean("Plugin.Debug")) send.console(Util.getPrefix() + " §5DEBUG: §6" + " §4config.yml are created / updated...");
|
||||
} else send.console(Util.getPrefix() + " §4config.yml are created...");
|
||||
|
||||
File config = new File(Main.getPath(), "config.yml");
|
||||
YamlConfiguration yamlConfiguration = YamlConfiguration.loadConfiguration(config);
|
||||
@ -196,6 +196,6 @@ public class ConfigCreate {
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
send.console(Main.prefix + " §2config.yml were successfully created / updated." + " §7- §e" + (System.currentTimeMillis() - long_) + "ms");
|
||||
send.console(Util.getPrefix() + " §2config.yml were successfully created / updated." + " §7- §e" + (System.currentTimeMillis() - long_) + "ms");
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package de.jatitv.commandguiv2.Spigot.config.gui;
|
||||
|
||||
import de.jatitv.commandguiv2.Spigot.Main;
|
||||
import de.jatitv.commandguiv2.Util;
|
||||
import net.t2code.lib.Spigot.Lib.messages.send;
|
||||
import net.t2code.lib.Spigot.Lib.minecraftVersion.MCVersion;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
@ -14,7 +15,7 @@ import java.util.List;
|
||||
public class CreateGUI {
|
||||
public static void configCreate() {
|
||||
long long_ = System.currentTimeMillis();
|
||||
send.console(Main.prefix + " §4Default GUI file (GUIs/default.yml) is loaded...");
|
||||
send.console(Util.getPrefix() + " §4Default GUI file (GUIs/default.yml) is loaded...");
|
||||
File config = new File(Main.getPath(), "GUIs/default.yml");
|
||||
YamlConfiguration yamlConfiguration = YamlConfiguration.loadConfiguration(config);
|
||||
|
||||
@ -49,7 +50,7 @@ public class CreateGUI {
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
send.console(Main.prefix + " §2Default GUI file (GUIs/default.yml) was loaded." + " §7- §e" + (System.currentTimeMillis() - long_) + "ms");
|
||||
send.console(Util.getPrefix() + " §2Default GUI file (GUIs/default.yml) was loaded." + " §7- §e" + (System.currentTimeMillis() - long_) + "ms");
|
||||
}
|
||||
|
||||
private static void set(String path, String value, YamlConfiguration config) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
package de.jatitv.commandguiv2.Spigot.gui;
|
||||
|
||||
import de.jatitv.commandguiv2.Spigot.Listener.GUIListener;
|
||||
import de.jatitv.commandguiv2.Spigot.Listener.UseItem_Listener.Events;
|
||||
import de.jatitv.commandguiv2.Spigot.listener.GUIListener;
|
||||
import de.jatitv.commandguiv2.Spigot.listener.UseItem_Listener.Events;
|
||||
import de.jatitv.commandguiv2.Spigot.Main;
|
||||
import de.jatitv.commandguiv2.Spigot.objects.functions.Function;
|
||||
import de.jatitv.commandguiv2.Spigot.config.languages.SelectMessages;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package de.jatitv.commandguiv2.Spigot.Listener;
|
||||
package de.jatitv.commandguiv2.Spigot.listener;
|
||||
|
||||
import de.jatitv.commandguiv2.Spigot.Listener.UseItem_Listener.Events;
|
||||
import de.jatitv.commandguiv2.Spigot.listener.UseItem_Listener.Events;
|
||||
import de.jatitv.commandguiv2.Spigot.objects.functions.Function;
|
||||
import de.jatitv.commandguiv2.Spigot.cmdManagement.Commands;
|
||||
import de.jatitv.commandguiv2.Spigot.objects.slots.Slot;
|
||||
@ -10,7 +10,6 @@ import de.jatitv.commandguiv2.Spigot.objects.guis.Gui;
|
||||
import de.jatitv.commandguiv2.Spigot.gui.OpenGUI;
|
||||
import de.jatitv.commandguiv2.Spigot.config.config.SelectConfig;
|
||||
import de.jatitv.commandguiv2.Spigot.Main;
|
||||
import de.jatitv.commandguiv2.Spigot.system.Papi;
|
||||
import de.jatitv.commandguiv2.Spigot.system.Placeholder;
|
||||
import de.jatitv.commandguiv2.Util;
|
||||
import net.t2code.lib.Spigot.Lib.items.ItemVersion;
|
@ -1,10 +1,9 @@
|
||||
package de.jatitv.commandguiv2.Spigot.Listener;
|
||||
package de.jatitv.commandguiv2.Spigot.listener;
|
||||
|
||||
import de.jatitv.commandguiv2.Spigot.Listener.UseItem_Listener.Events;
|
||||
import de.jatitv.commandguiv2.Spigot.listener.UseItem_Listener.Events;
|
||||
import de.jatitv.commandguiv2.Spigot.Main;
|
||||
import de.jatitv.commandguiv2.Spigot.system.UseItem;
|
||||
import de.jatitv.commandguiv2.Spigot.config.config.SelectConfig;
|
||||
import de.jatitv.commandguiv2.Spigot.system.database.SelectDatabase;
|
||||
import net.t2code.lib.Spigot.Lib.messages.send;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
@ -1,6 +1,6 @@
|
||||
// This claas was created by JaTiTV
|
||||
|
||||
package de.jatitv.commandguiv2.Spigot.Listener;
|
||||
package de.jatitv.commandguiv2.Spigot.listener;
|
||||
|
||||
import de.jatitv.commandguiv2.Spigot.Main;
|
||||
import de.jatitv.commandguiv2.Spigot.config.config.SelectConfig;
|
@ -1,4 +1,4 @@
|
||||
package de.jatitv.commandguiv2.Spigot.Listener;
|
||||
package de.jatitv.commandguiv2.Spigot.listener;
|
||||
|
||||
import de.jatitv.commandguiv2.Spigot.Main;
|
||||
import org.bukkit.entity.Player;
|
@ -1,6 +1,6 @@
|
||||
package de.jatitv.commandguiv2.Spigot.Listener.UseItem_Listener;
|
||||
package de.jatitv.commandguiv2.Spigot.listener.UseItem_Listener;
|
||||
|
||||
import de.jatitv.commandguiv2.Spigot.Listener.ItemChange;
|
||||
import de.jatitv.commandguiv2.Spigot.listener.ItemChange;
|
||||
import de.jatitv.commandguiv2.Spigot.Main;
|
||||
import de.jatitv.commandguiv2.Spigot.cmdManagement.Commands;
|
||||
import de.jatitv.commandguiv2.Spigot.config.config.SelectConfig;
|
||||
@ -11,8 +11,6 @@ import de.jatitv.commandguiv2.Spigot.system.database.SelectDatabase;
|
||||
import de.jatitv.commandguiv2.api.CGuiAPI;
|
||||
import net.t2code.lib.Spigot.Lib.items.ItemVersion;
|
||||
import net.t2code.lib.Spigot.Lib.messages.send;
|
||||
import net.t2code.lib.Spigot.Lib.minecraftVersion.MCVersion;
|
||||
import net.t2code.lib.Spigot.Lib.minecraftVersion.NMSVersion;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
@ -1,4 +1,4 @@
|
||||
package de.jatitv.commandguiv2.Spigot.Listener.UseItem_Listener;
|
||||
package de.jatitv.commandguiv2.Spigot.listener.UseItem_Listener;
|
||||
|
||||
import de.jatitv.commandguiv2.Spigot.config.config.SelectConfig;
|
||||
import net.t2code.lib.Spigot.Lib.minecraftVersion.MCVersion;
|
@ -10,6 +10,7 @@ import org.bukkit.plugin.Plugin;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
|
||||
@ -24,7 +25,7 @@ public class Debug {
|
||||
send.debug(plugin, "§3Version: §e" + Bukkit.getVersion());
|
||||
send.debug(plugin, "§3Java: §e" + System.getProperty("java.version"));
|
||||
send.debug(plugin, "§3Worlds: §e" + String.valueOf(Bukkit.getServer().getWorlds()));
|
||||
send.debug(plugin, String.valueOf(Main.plugins));
|
||||
send.debug(plugin, String.valueOf(Arrays.asList(Main.plugin.getServer().getPluginManager().getPlugins())));
|
||||
send.debug(plugin, "§5----------------------------------");
|
||||
if (new File(Main.getPath(), "config.yml").exists()) {
|
||||
File f = new File(String.valueOf(Main.getPath()));
|
||||
|
@ -1,7 +1,7 @@
|
||||
package de.jatitv.commandguiv2.Spigot.system;
|
||||
|
||||
import de.jatitv.commandguiv2.Spigot.Listener.GUIListener;
|
||||
import de.jatitv.commandguiv2.Spigot.Listener.UseItem_Listener.EventsFrom110;
|
||||
import de.jatitv.commandguiv2.Spigot.listener.GUIListener;
|
||||
import de.jatitv.commandguiv2.Spigot.listener.UseItem_Listener.EventsFrom110;
|
||||
import de.jatitv.commandguiv2.Spigot.cmdManagement.CmdExecuter_GUI;
|
||||
import de.jatitv.commandguiv2.Spigot.cmdManagement.CmdExecuter_GUIItem;
|
||||
import de.jatitv.commandguiv2.Spigot.cmdManagement.CmdExecuter_Help;
|
||||
@ -11,8 +11,8 @@ import de.jatitv.commandguiv2.Spigot.config.gui.CreateGUI;
|
||||
import de.jatitv.commandguiv2.Spigot.config.languages.LanguagesCreate;
|
||||
import de.jatitv.commandguiv2.Spigot.config.languages.SelectMessages;
|
||||
import de.jatitv.commandguiv2.Spigot.system.database.MySQL;
|
||||
import de.jatitv.commandguiv2.Spigot.Listener.PluginEvent;
|
||||
import de.jatitv.commandguiv2.Spigot.Listener.UseItem_Listener.Events;
|
||||
import de.jatitv.commandguiv2.Spigot.listener.PluginEvent;
|
||||
import de.jatitv.commandguiv2.Spigot.listener.UseItem_Listener.Events;
|
||||
import de.jatitv.commandguiv2.Spigot.Main;
|
||||
import de.jatitv.commandguiv2.Spigot.objects.Obj_Select;
|
||||
import de.jatitv.commandguiv2.Spigot.config.config.ConfigCreate;
|
||||
@ -20,7 +20,6 @@ import de.jatitv.commandguiv2.Spigot.config.config.SelectConfig;
|
||||
import de.jatitv.commandguiv2.Spigot.system.database.SQLITE;
|
||||
import de.jatitv.commandguiv2.Spigot.system.database.SelectDatabase;
|
||||
import de.jatitv.commandguiv2.Spigot.system.database.StorageType;
|
||||
import de.jatitv.commandguiv2.Util;
|
||||
import net.t2code.lib.Spigot.Lib.messages.T2CodeTemplate;
|
||||
import net.t2code.lib.Spigot.Lib.messages.send;
|
||||
import net.t2code.lib.Spigot.Lib.minecraftVersion.MCVersion;
|
||||
|
@ -2,15 +2,10 @@
|
||||
|
||||
package de.jatitv.commandguiv2.Spigot.system;
|
||||
|
||||
import de.jatitv.commandguiv2.Spigot.Listener.UseItem_Listener.Events;
|
||||
import de.jatitv.commandguiv2.Spigot.Main;
|
||||
import de.jatitv.commandguiv2.Spigot.config.config.SelectConfig;
|
||||
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class Papi extends PlaceholderExpansion {
|
||||
|
||||
@Override
|
||||
|
@ -1,6 +1,6 @@
|
||||
package de.jatitv.commandguiv2.Spigot.system;
|
||||
|
||||
import de.jatitv.commandguiv2.Spigot.Listener.UseItem_Listener.Events;
|
||||
import de.jatitv.commandguiv2.Spigot.listener.UseItem_Listener.Events;
|
||||
import de.jatitv.commandguiv2.Spigot.config.config.SelectConfig;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
|
@ -2,7 +2,7 @@ package de.jatitv.commandguiv2.Spigot.system;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import com.mojang.authlib.properties.Property;
|
||||
import de.jatitv.commandguiv2.Spigot.Listener.UseItem_Listener.Events;
|
||||
import de.jatitv.commandguiv2.Spigot.listener.UseItem_Listener.Events;
|
||||
import de.jatitv.commandguiv2.Spigot.Main;
|
||||
import de.jatitv.commandguiv2.Spigot.config.config.SelectConfig;
|
||||
import de.jatitv.commandguiv2.Spigot.config.languages.SelectMessages;
|
||||
|
@ -1,11 +1,7 @@
|
||||
package de.jatitv.commandguiv2.Spigot.system.database;
|
||||
|
||||
import de.jatitv.commandguiv2.Spigot.Listener.UseItem_Listener.Events;
|
||||
import de.jatitv.commandguiv2.Spigot.listener.UseItem_Listener.Events;
|
||||
import de.jatitv.commandguiv2.Spigot.Main;
|
||||
import de.jatitv.commandguiv2.Spigot.config.config.SelectConfig;
|
||||
import de.jatitv.commandguiv2.Spigot.system.Load;
|
||||
import de.jatitv.commandguiv2.Util;
|
||||
import net.t2code.lib.Spigot.Lib.messages.send;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.sql.SQLException;
|
||||
|
@ -1,7 +1,7 @@
|
||||
package de.jatitv.commandguiv2.api;
|
||||
|
||||
import de.jatitv.commandguiv2.Spigot.Listener.ItemChange;
|
||||
import de.jatitv.commandguiv2.Spigot.Listener.UseItem_Listener.Events;
|
||||
import de.jatitv.commandguiv2.Spigot.listener.ItemChange;
|
||||
import de.jatitv.commandguiv2.Spigot.listener.UseItem_Listener.Events;
|
||||
import de.jatitv.commandguiv2.Spigot.Main;
|
||||
import de.jatitv.commandguiv2.Spigot.cmdManagement.Commands;
|
||||
import de.jatitv.commandguiv2.Spigot.cmdManagement.Help;
|
||||
|
Loading…
Reference in New Issue
Block a user