diff --git a/.gitignore b/.gitignore
index e04c916..8e6d769 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,8 +1,10 @@
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
+
# User-specific stuff:
.idea/workspace.xml
.idea/tasks.xml
+
# Sensitive or high-churn files:
.idea/dataSources.ids
.idea/dataSources.xml
@@ -10,24 +12,148 @@
.idea/sqlDataSources.xml
.idea/dynamic.xml
.idea/uiDesigner.xml
+
# Gradle:
.idea/gradle.xml
.idea/libraries
+
# Mongo Explorer plugin:
.idea/mongoSettings.xml
+
## File-based project format:
*.iws
+
## Plugin-specific files:
+
# IntelliJ
/out/
+
# mpeltonen/sbt-idea plugin
.idea_modules/
+
# JIRA plugin
atlassian-ide-plugin.xml
+
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
src/test/
-target/
\ No newline at end of file
+target/
+/.idea/dictionaries/
+### JetBrains template
+# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
+# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
+
+# User-specific stuff:
+.idea/**/workspace.xml
+.idea/**/tasks.xml
+.idea/dictionaries
+
+# Sensitive or high-churn files:
+.idea/**/dataSources/
+.idea/**/dataSources.ids
+.idea/**/dataSources.xml
+.idea/**/dataSources.local.xml
+.idea/**/sqlDataSources.xml
+.idea/**/dynamic.xml
+.idea/**/uiDesigner.xml
+
+# Gradle:
+.idea/**/gradle.xml
+.idea/**/libraries
+
+# CMake
+cmake-build-debug/
+
+# Mongo Explorer plugin:
+.idea/**/mongoSettings.xml
+
+## File-based project format:
+
+## Plugin-specific files:
+
+# IntelliJ
+out/
+
+# mpeltonen/sbt-idea plugin
+
+# JIRA plugin
+
+# Cursive Clojure plugin
+.idea/replstate.xml
+
+# Crashlytics plugin (for Android Studio and IntelliJ)
+### Maven template
+pom.xml.tag
+pom.xml.releaseBackup
+pom.xml.versionsBackup
+pom.xml.next
+release.properties
+dependency-reduced-pom.xml
+buildNumber.properties
+.mvn/timing.properties
+
+# Avoid ignoring Maven wrapper jar file (.jar files are usually ignored)
+!/.mvn/wrapper/maven-wrapper.jar
+### Linux template
+*~
+
+# temporary files which can be created if a process still has a handle open of a deleted file
+.fuse_hidden*
+
+# KDE directory preferences
+.directory
+
+# Linux trash folder which might appear on any partition or disk
+.Trash-*
+
+# .nfs files are created when an open file is removed but is still being accessed
+.nfs*
+### Windows template
+# Windows thumbnail cache files
+Thumbs.db
+ehthumbs.db
+ehthumbs_vista.db
+
+# Dump file
+*.stackdump
+
+# Folder config file
+Desktop.ini
+
+# Recycle Bin used on file shares
+$RECYCLE.BIN/
+
+# Windows Installer files
+*.cab
+*.msi
+*.msm
+*.msp
+
+# Windows shortcuts
+*.lnk
+### Java template
+# Compiled class file
+*.class
+
+# Log file
+*.log
+
+# BlueJ files
+*.ctxt
+
+# Mobile Tools for Java (J2ME)
+.mtj.tmp/
+
+# Package Files #
+*.jar
+*.war
+*.ear
+*.zip
+*.tar.gz
+*.rar
+
+# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
+hs_err_pid*
diff --git a/.idea/libraries/Maven__com_google_code_gson_gson_2_2_4.xml b/.idea/libraries/Maven__com_google_code_gson_gson_2_2_4.xml
deleted file mode 100644
index 4533c1b..0000000
--- a/.idea/libraries/Maven__com_google_code_gson_gson_2_2_4.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__com_google_guava_guava_17_0.xml b/.idea/libraries/Maven__com_google_guava_guava_17_0.xml
deleted file mode 100644
index 2a9069c..0000000
--- a/.idea/libraries/Maven__com_google_guava_guava_17_0.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__javax_persistence_persistence_api_1_0.xml b/.idea/libraries/Maven__javax_persistence_persistence_api_1_0.xml
deleted file mode 100644
index e60370e..0000000
--- a/.idea/libraries/Maven__javax_persistence_persistence_api_1_0.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__net_md_5_bungeecord_chat_1_10_SNAPSHOT.xml b/.idea/libraries/Maven__net_md_5_bungeecord_chat_1_10_SNAPSHOT.xml
deleted file mode 100644
index 88ae130..0000000
--- a/.idea/libraries/Maven__net_md_5_bungeecord_chat_1_10_SNAPSHOT.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_avaje_ebean_2_8_1.xml b/.idea/libraries/Maven__org_avaje_ebean_2_8_1.xml
deleted file mode 100644
index 91f161a..0000000
--- a/.idea/libraries/Maven__org_avaje_ebean_2_8_1.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_spigotmc_spigot_api_1_11_R0_1_SNAPSHOT.xml b/.idea/libraries/Maven__org_spigotmc_spigot_api_1_11_R0_1_SNAPSHOT.xml
deleted file mode 100644
index bebbe2f..0000000
--- a/.idea/libraries/Maven__org_spigotmc_spigot_api_1_11_R0_1_SNAPSHOT.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_yaml_snakeyaml_1_17.xml b/.idea/libraries/Maven__org_yaml_snakeyaml_1_17.xml
deleted file mode 100644
index 20e2920..0000000
--- a/.idea/libraries/Maven__org_yaml_snakeyaml_1_17.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/runConfigurations/BetterTP.xml b/.idea/runConfigurations/BetterTP.xml
new file mode 100644
index 0000000..9d15b4f
--- /dev/null
+++ b/.idea/runConfigurations/BetterTP.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/runConfigurations/Windows_Server.xml b/.idea/runConfigurations/Windows_Server.xml
new file mode 100644
index 0000000..7d51cc1
--- /dev/null
+++ b/.idea/runConfigurations/Windows_Server.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/BetterTP.iml b/BetterTP.iml
index c22320d..b4374a5 100644
--- a/BetterTP.iml
+++ b/BetterTP.iml
@@ -21,16 +21,15 @@
-
+
-
-
-
-
-
-
+
+
+
+
+
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index b14edde..af96b41 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,19 +6,23 @@
Delta-Wings
BetterTP
- 1.1.0-DEV
- jar
-
BetterTP
-
+ 1.0.0
+ jar
The best teleportation plugin
+ https://delta-wings.net/
+
UTF-8
- https://delta-wings.net
-
+
+ scm:svn:http://127.0.0.1/dummy
+ scm:svn:https://127.0.0.1/dummy
+ HEAD
+ http://127.0.0.1/dummy
+
- BetterTP
+ ${project.artifactId}-${project.version}
clean package
@@ -28,23 +32,31 @@
1.8
1.8
+
- org.apache.maven.plugins
- maven-shade-plugin
- 2.3
+ org.codehaus.mojo
+ buildnumber-maven-plugin
+ 1.4
- package
+ buildnumber
+ validate
- shade
+ create
-
- true
-
+
+ {0,number}
+
+ - buildNumber
+
+ false
+ false
+ unknownbuild
+
@@ -60,14 +72,24 @@
spigotmc-repo
https://hub.spigotmc.org/nexus/content/groups/public/
+
+ sonatype
+ https://oss.sonatype.org/content/groups/public/
+
org.spigotmc
spigot-api
- 1.11-R0.1-SNAPSHOT
+ 1.12-R0.1-SNAPSHOT
+ provided
+
+
+ org.bukkit
+ bukkit
+ 1.12-R0.1-SNAPSHOT
provided
-
+
\ No newline at end of file
diff --git a/src/main/java/net/DeltaWings/Minecraft/BetterTP/Commands/Bettertp.java b/src/main/java/net/DeltaWings/Minecraft/BetterTP/Commands/Bettertp.java
index 03925e5..ac550ee 100644
--- a/src/main/java/net/DeltaWings/Minecraft/BetterTP/Commands/Bettertp.java
+++ b/src/main/java/net/DeltaWings/Minecraft/BetterTP/Commands/Bettertp.java
@@ -1,6 +1,6 @@
package net.DeltaWings.Minecraft.BetterTP.Commands;
-import net.DeltaWings.Minecraft.BetterTP.Custom.Config;
+import net.DeltaWings.Minecraft.BetterTP.Libs.Config;
import org.bukkit.Location;
import org.bukkit.command.Command;
diff --git a/src/main/java/net/DeltaWings/Minecraft/BetterTP/Commands/Delhome.java b/src/main/java/net/DeltaWings/Minecraft/BetterTP/Commands/Delhome.java
index 45ef37a..c6daa6c 100644
--- a/src/main/java/net/DeltaWings/Minecraft/BetterTP/Commands/Delhome.java
+++ b/src/main/java/net/DeltaWings/Minecraft/BetterTP/Commands/Delhome.java
@@ -1,6 +1,6 @@
package net.DeltaWings.Minecraft.BetterTP.Commands;
-import net.DeltaWings.Minecraft.BetterTP.Custom.Config;
+import net.DeltaWings.Minecraft.BetterTP.Libs.Config;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
diff --git a/src/main/java/net/DeltaWings/Minecraft/BetterTP/Commands/Home.java b/src/main/java/net/DeltaWings/Minecraft/BetterTP/Commands/Home.java
index 0abd4af..677876e 100644
--- a/src/main/java/net/DeltaWings/Minecraft/BetterTP/Commands/Home.java
+++ b/src/main/java/net/DeltaWings/Minecraft/BetterTP/Commands/Home.java
@@ -1,6 +1,6 @@
package net.DeltaWings.Minecraft.BetterTP.Commands;
-import net.DeltaWings.Minecraft.BetterTP.Custom.Config;
+import net.DeltaWings.Minecraft.BetterTP.Libs.Config;
import org.bukkit.Bukkit;
import org.bukkit.Location;
diff --git a/src/main/java/net/DeltaWings/Minecraft/BetterTP/Commands/Homelist.java b/src/main/java/net/DeltaWings/Minecraft/BetterTP/Commands/Homelist.java
index 0bba950..a1b7628 100644
--- a/src/main/java/net/DeltaWings/Minecraft/BetterTP/Commands/Homelist.java
+++ b/src/main/java/net/DeltaWings/Minecraft/BetterTP/Commands/Homelist.java
@@ -1,6 +1,6 @@
package net.DeltaWings.Minecraft.BetterTP.Commands;
-import net.DeltaWings.Minecraft.BetterTP.Custom.Config;
+import net.DeltaWings.Minecraft.BetterTP.Libs.Config;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
diff --git a/src/main/java/net/DeltaWings/Minecraft/BetterTP/Commands/Lobby.java b/src/main/java/net/DeltaWings/Minecraft/BetterTP/Commands/Lobby.java
index 899e3fb..6a83178 100644
--- a/src/main/java/net/DeltaWings/Minecraft/BetterTP/Commands/Lobby.java
+++ b/src/main/java/net/DeltaWings/Minecraft/BetterTP/Commands/Lobby.java
@@ -1,6 +1,6 @@
package net.DeltaWings.Minecraft.BetterTP.Commands;
-import net.DeltaWings.Minecraft.BetterTP.Custom.Config;
+import net.DeltaWings.Minecraft.BetterTP.Libs.Config;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.command.Command;
diff --git a/src/main/java/net/DeltaWings/Minecraft/BetterTP/Commands/Sethome.java b/src/main/java/net/DeltaWings/Minecraft/BetterTP/Commands/Sethome.java
index f5c1989..442b02a 100644
--- a/src/main/java/net/DeltaWings/Minecraft/BetterTP/Commands/Sethome.java
+++ b/src/main/java/net/DeltaWings/Minecraft/BetterTP/Commands/Sethome.java
@@ -1,6 +1,6 @@
package net.DeltaWings.Minecraft.BetterTP.Commands;
-import net.DeltaWings.Minecraft.BetterTP.Custom.Config;
+import net.DeltaWings.Minecraft.BetterTP.Libs.Config;
import org.bukkit.Location;
import org.bukkit.command.Command;
diff --git a/src/main/java/net/DeltaWings/Minecraft/BetterTP/Commands/Spawn.java b/src/main/java/net/DeltaWings/Minecraft/BetterTP/Commands/Spawn.java
index 104ad6b..e5cd300 100644
--- a/src/main/java/net/DeltaWings/Minecraft/BetterTP/Commands/Spawn.java
+++ b/src/main/java/net/DeltaWings/Minecraft/BetterTP/Commands/Spawn.java
@@ -1,6 +1,6 @@
package net.DeltaWings.Minecraft.BetterTP.Commands;
-import net.DeltaWings.Minecraft.BetterTP.Custom.Config;
+import net.DeltaWings.Minecraft.BetterTP.Libs.Config;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.command.Command;
diff --git a/src/main/java/net/DeltaWings/Minecraft/BetterTP/Custom/FileManager.java b/src/main/java/net/DeltaWings/Minecraft/BetterTP/Custom/FileManager.java
deleted file mode 100644
index f02adec..0000000
--- a/src/main/java/net/DeltaWings/Minecraft/BetterTP/Custom/FileManager.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package net.DeltaWings.Minecraft.BetterTP.Custom;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Arrays;
-import java.util.List;
-
-public class FileManager {
-
-
- public List listFiles(String path) {
- String[] t = new File(path).list();
- if(t == null) return null;
- else return Arrays.asList(t);
- }
-
- public List listFiles(File path) {
- String[] t = path.list();
- if(t == null) return null;
- else return Arrays.asList(t);
- }
-
- public void delete(File path) {
- path.delete();
- }
-
- public void delete(String path) {
- File file = new File(path);
- file.delete();
- }
-
- public void createFile(String path) {
- try {
- new File(path).createNewFile();
- } catch ( IOException e ) {
- e.printStackTrace();
- }
- }
-
- public void createFile(File path) {
- try {
- path.createNewFile();
- } catch ( IOException e ) {
- e.printStackTrace();
- }
- }
-
- public void createFolder(File path) {
- path.mkdirs();
- }
-
- public void createFolder(String path) {
- new File(path).mkdirs();
- }
-}
\ No newline at end of file
diff --git a/src/main/java/net/DeltaWings/Minecraft/BetterTP/Custom/Config.java b/src/main/java/net/DeltaWings/Minecraft/BetterTP/Libs/Config.java
similarity index 98%
rename from src/main/java/net/DeltaWings/Minecraft/BetterTP/Custom/Config.java
rename to src/main/java/net/DeltaWings/Minecraft/BetterTP/Libs/Config.java
index 63e226d..f20acf0 100644
--- a/src/main/java/net/DeltaWings/Minecraft/BetterTP/Custom/Config.java
+++ b/src/main/java/net/DeltaWings/Minecraft/BetterTP/Libs/Config.java
@@ -1,4 +1,4 @@
-package net.DeltaWings.Minecraft.BetterTP.Custom;
+package net.DeltaWings.Minecraft.BetterTP.Libs;
import net.DeltaWings.Minecraft.BetterTP.Main;
diff --git a/src/main/java/net/DeltaWings/Minecraft/BetterTP/Main.java b/src/main/java/net/DeltaWings/Minecraft/BetterTP/Main.java
index fd6a1fc..4d6f394 100644
--- a/src/main/java/net/DeltaWings/Minecraft/BetterTP/Main.java
+++ b/src/main/java/net/DeltaWings/Minecraft/BetterTP/Main.java
@@ -1,11 +1,11 @@
package net.DeltaWings.Minecraft.BetterTP;
import net.DeltaWings.Minecraft.BetterTP.Commands.*;
-import net.DeltaWings.Minecraft.BetterTP.Custom.Config;
+import net.DeltaWings.Minecraft.BetterTP.Libs.Config;
import net.DeltaWings.Minecraft.BetterTP.TabCompleter.*;
-import org.bukkit.Bukkit;
import org.bukkit.command.PluginCommand;
+import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.java.JavaPlugin;
import java.io.IOException;
@@ -13,47 +13,69 @@ import java.util.logging.Level;
public final class Main extends JavaPlugin {
- public static void log(String Message) {
- Bukkit.getLogger().log(Level.INFO, Message);
- }
-
private static Main instance;
public static Main getInstance() {
return instance;
}
+ public static void log(String message) {
+ getInstance().getLogger().log(Level.INFO, message);
+ }
+
public static void debug(String message) {
- if(new Config("", "config").getBoolean("debug", false)) Main.getInstance().getLogger().info("[Debug] " + message);
+ if(new Config("", "config").getBoolean("debug", true)) getInstance().getLogger().log(Level.INFO, "[Debug] > " + message);
+ }
+
+ public static void error(String message) {
+ getInstance().getLogger().log(Level.WARNING, message);
}
@Override
public void onEnable() {
instance = this;
- getCommand("Spawn").setExecutor(new Spawn());
- getCommand("Lobby").setExecutor(new Lobby());
- getCommand("Home").setExecutor(new Home());
+ debug("Loading Variables");
+ PluginManager pm = getServer().getPluginManager();
PluginCommand bettertp = getCommand("Bettertp");
- bettertp.setExecutor(new Bettertp());
- bettertp.setTabCompleter(new BettertpTab());
- getCommand("Sethome").setExecutor(new Sethome());
- getCommand("Delhome").setExecutor(new Delhome());
- getCommand("Homelist").setExecutor(new Homelist());
+ debug("Loaded variables");
- new Metrics(this);
+ debug("Loading Configuration");
try {
config();
} catch ( IOException e ) {
e.printStackTrace();
- log("Shutting Down for security...");
+ error("Error Config not generated");
+ error("Shutting Down for security...");
this.getPluginLoader().disablePlugin(this);
}
+ debug("Loaded Configuration !");
- log("Plugin Loaded !");
+ debug("Loading Events");
+ //pm.registerEvents(new Event(), this);
+ debug("Loaded Events");
+
+ debug("Loading Commands");
+ //getCommand("Command").setExecutor(new Command());
+ bettertp.setExecutor(new Bettertp());
+ bettertp.setTabCompleter(new BettertpTab());
+ getCommand("Spawn").setExecutor(new Spawn());
+ getCommand("Lobby").setExecutor(new Lobby());
+ getCommand("Home").setExecutor(new Home());
+ getCommand("Sethome").setExecutor(new Sethome());
+ getCommand("Delhome").setExecutor(new Delhome());
+ getCommand("Homelist").setExecutor(new Homelist());
+
+ debug("Loaded Commands");
+
+ debug("Enabling Metrics");
+ //new Metrics(this);
+ log("Metrics Started : https://bstats.org/plugin/bukkit/plugin/");
+
+ log("Loaded !");
}
@Override
public void onDisable() {
- log("Plugin Unloaded !");
+ log("Unloaded !");
}
private void config() throws IOException {