diff --git a/.idea/workspace.xml b/.idea/workspace.xml
new file mode 100644
index 0000000..b8f1143
--- /dev/null
+++ b/.idea/workspace.xml
@@ -0,0 +1,96 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {
+ "keyToString": {
+ "RunOnceActivity.OpenProjectViewOnStart": "true",
+ "RunOnceActivity.ShowReadmeOnStart": "true",
+ "SHARE_PROJECT_CONFIGURATION_FILES": "true",
+ "WebServerToolWindowFactoryState": "false",
+ "settings.editor.selected.configurable": "preferences.pluginManager"
+ }
+}
+
+
+
+
+ 1654654153315
+
+
+ 1654654153315
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/.gitignore b/Installer/.idea/.gitignore
similarity index 100%
rename from .idea/.gitignore
rename to Installer/.idea/.gitignore
diff --git a/.idea/artifacts/PluginInstaller_jar.xml b/Installer/.idea/artifacts/PluginInstaller_jar.xml
similarity index 100%
rename from .idea/artifacts/PluginInstaller_jar.xml
rename to Installer/.idea/artifacts/PluginInstaller_jar.xml
diff --git a/.idea/compiler.xml b/Installer/.idea/compiler.xml
similarity index 100%
rename from .idea/compiler.xml
rename to Installer/.idea/compiler.xml
diff --git a/.idea/discord.xml b/Installer/.idea/discord.xml
similarity index 100%
rename from .idea/discord.xml
rename to Installer/.idea/discord.xml
diff --git a/.idea/encodings.xml b/Installer/.idea/encodings.xml
similarity index 100%
rename from .idea/encodings.xml
rename to Installer/.idea/encodings.xml
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/Installer/.idea/inspectionProfiles/Project_Default.xml
similarity index 100%
rename from .idea/inspectionProfiles/Project_Default.xml
rename to Installer/.idea/inspectionProfiles/Project_Default.xml
diff --git a/.idea/jarRepositories.xml b/Installer/.idea/jarRepositories.xml
similarity index 100%
rename from .idea/jarRepositories.xml
rename to Installer/.idea/jarRepositories.xml
diff --git a/.idea/misc.xml b/Installer/.idea/misc.xml
similarity index 100%
rename from .idea/misc.xml
rename to Installer/.idea/misc.xml
diff --git a/.idea/vcs.xml b/Installer/.idea/vcs.xml
similarity index 100%
rename from .idea/vcs.xml
rename to Installer/.idea/vcs.xml
diff --git a/PluginInstaller.iml b/Installer/PluginInstaller.iml
similarity index 100%
rename from PluginInstaller.iml
rename to Installer/PluginInstaller.iml
diff --git a/README.md b/Installer/README.md
similarity index 100%
rename from README.md
rename to Installer/README.md
diff --git a/out/artifacts/PluginInstaller_jar/PluginInstaller.jar b/Installer/out/artifacts/PluginInstaller_jar/PluginInstaller.jar
similarity index 100%
rename from out/artifacts/PluginInstaller_jar/PluginInstaller.jar
rename to Installer/out/artifacts/PluginInstaller_jar/PluginInstaller.jar
diff --git a/pom.xml b/Installer/pom.xml
similarity index 100%
rename from pom.xml
rename to Installer/pom.xml
diff --git a/src/main/java/tech/nully/PluginInstaller/InstallCommand.java b/Installer/src/main/java/tech/nully/PluginInstaller/InstallCommand.java
similarity index 100%
rename from src/main/java/tech/nully/PluginInstaller/InstallCommand.java
rename to Installer/src/main/java/tech/nully/PluginInstaller/InstallCommand.java
diff --git a/src/main/java/tech/nully/PluginInstaller/Installer.java b/Installer/src/main/java/tech/nully/PluginInstaller/Installer.java
similarity index 100%
rename from src/main/java/tech/nully/PluginInstaller/Installer.java
rename to Installer/src/main/java/tech/nully/PluginInstaller/Installer.java
diff --git a/src/main/java/tech/nully/PluginInstaller/Main.java b/Installer/src/main/java/tech/nully/PluginInstaller/Main.java
similarity index 97%
rename from src/main/java/tech/nully/PluginInstaller/Main.java
rename to Installer/src/main/java/tech/nully/PluginInstaller/Main.java
index 96ab452..b37f7e1 100644
--- a/src/main/java/tech/nully/PluginInstaller/Main.java
+++ b/Installer/src/main/java/tech/nully/PluginInstaller/Main.java
@@ -21,6 +21,7 @@ public class Main extends JavaPlugin {
} catch (IOException e) {}
getCommand("install").setExecutor(new InstallCommand());
getCommand("plist").setExecutor(new plistCommand());
+ getCommand("update").setExecutor(new UpdateCommand());
getServer().getConsoleSender().sendMessage("--------------------------------------------");
getServer().getConsoleSender().sendMessage("--------------------------------------------");
getServer().getConsoleSender().sendMessage(
diff --git a/Installer/src/main/java/tech/nully/PluginInstaller/UpdateCommand.java b/Installer/src/main/java/tech/nully/PluginInstaller/UpdateCommand.java
new file mode 100644
index 0000000..26c3eed
--- /dev/null
+++ b/Installer/src/main/java/tech/nully/PluginInstaller/UpdateCommand.java
@@ -0,0 +1,24 @@
+package tech.nully.PluginInstaller;
+
+import org.bukkit.command.Command;
+import org.bukkit.command.CommandExecutor;
+import org.bukkit.command.CommandSender;
+import org.bukkit.command.ConsoleCommandSender;
+
+import java.io.IOException;
+
+public class UpdateCommand implements CommandExecutor {
+ @Override
+ public boolean onCommand(CommandSender Sender, Command cmd, String label, String[] args) {
+ if (cmd.getName().equalsIgnoreCase("update")) {
+ if (Sender.isOp() || Sender instanceof ConsoleCommandSender) {
+ try {
+ Installer.UpdatePlugin();
+ } catch (IOException e) {}
+ Sender.sendMessage("The latest download of the plugin has been installed, please reload the server or reload the plugin to have the changes take effect");
+ return true;
+ }
+ }
+ return false;
+ }
+}
diff --git a/src/main/java/tech/nully/PluginInstaller/plistCommand.java b/Installer/src/main/java/tech/nully/PluginInstaller/plistCommand.java
similarity index 100%
rename from src/main/java/tech/nully/PluginInstaller/plistCommand.java
rename to Installer/src/main/java/tech/nully/PluginInstaller/plistCommand.java
diff --git a/target/classes/plugin.yml b/Installer/src/main/resources/plugin.yml
similarity index 84%
rename from target/classes/plugin.yml
rename to Installer/src/main/resources/plugin.yml
index 542274e..feea49c 100644
--- a/target/classes/plugin.yml
+++ b/Installer/src/main/resources/plugin.yml
@@ -12,3 +12,6 @@ commands:
plist:
usage: /
description: Gives you a list of available plugins with PluginInstaller
+ update:
+ usage: /
+ description: Updates the plugin to the latest version
diff --git a/src/main/resources/plugin.yml b/Installer/target/classes/plugin.yml
similarity index 100%
rename from src/main/resources/plugin.yml
rename to Installer/target/classes/plugin.yml
diff --git a/target/classes/tech/nully/PluginInstaller/InstallCommand.class b/Installer/target/classes/tech/nully/PluginInstaller/InstallCommand.class
similarity index 100%
rename from target/classes/tech/nully/PluginInstaller/InstallCommand.class
rename to Installer/target/classes/tech/nully/PluginInstaller/InstallCommand.class
diff --git a/target/classes/tech/nully/PluginInstaller/Installer.class b/Installer/target/classes/tech/nully/PluginInstaller/Installer.class
similarity index 100%
rename from target/classes/tech/nully/PluginInstaller/Installer.class
rename to Installer/target/classes/tech/nully/PluginInstaller/Installer.class
diff --git a/target/classes/tech/nully/PluginInstaller/Main.class b/Installer/target/classes/tech/nully/PluginInstaller/Main.class
similarity index 100%
rename from target/classes/tech/nully/PluginInstaller/Main.class
rename to Installer/target/classes/tech/nully/PluginInstaller/Main.class
diff --git a/target/classes/tech/nully/PluginInstaller/plistCommand.class b/Installer/target/classes/tech/nully/PluginInstaller/plistCommand.class
similarity index 100%
rename from target/classes/tech/nully/PluginInstaller/plistCommand.class
rename to Installer/target/classes/tech/nully/PluginInstaller/plistCommand.class
diff --git a/Updater/.idea/.gitignore b/Updater/.idea/.gitignore
new file mode 100644
index 0000000..13566b8
--- /dev/null
+++ b/Updater/.idea/.gitignore
@@ -0,0 +1,8 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Editor-based HTTP Client requests
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
diff --git a/Updater/.idea/compiler.xml b/Updater/.idea/compiler.xml
new file mode 100644
index 0000000..46a9cb4
--- /dev/null
+++ b/Updater/.idea/compiler.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Updater/.idea/discord.xml b/Updater/.idea/discord.xml
new file mode 100644
index 0000000..30bab2a
--- /dev/null
+++ b/Updater/.idea/discord.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Updater/.idea/jarRepositories.xml b/Updater/.idea/jarRepositories.xml
new file mode 100644
index 0000000..712ab9d
--- /dev/null
+++ b/Updater/.idea/jarRepositories.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Updater/.idea/misc.xml b/Updater/.idea/misc.xml
new file mode 100644
index 0000000..132404b
--- /dev/null
+++ b/Updater/.idea/misc.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Updater/.idea/vcs.xml b/Updater/.idea/vcs.xml
new file mode 100644
index 0000000..6c0b863
--- /dev/null
+++ b/Updater/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Updater/pom.xml b/Updater/pom.xml
new file mode 100644
index 0000000..4cd0078
--- /dev/null
+++ b/Updater/pom.xml
@@ -0,0 +1,39 @@
+
+
+ 4.0.0
+
+ tech.nully
+ PrimCore
+ 1.0.0
+ jar
+
+ PrimCore
+
+ A custom coded plugin for primcraft written in Kotlin
+ nully.tech
+
+ 1.8
+ UTF-8
+ 1.8
+ 1.8
+
+
+
+
+ PrimCoreRepos-repos
+ https://github.com/darverdevs/EaglerMavenRepo/raw/main
+
+
+
+
+
+ com.github.EaglerMaven
+ craftbukkit
+ 1.5.2-R1.0
+
+
+
+
+
\ No newline at end of file