diff --git a/pom.xml b/pom.xml
index 71d43df..1dcaf72 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,101 +1,71 @@
-
- 4.0.0
- de.Ste3et_C0st.furniture
- DiceFurniture
-
-
+
+ 4.0.0
+ de.Ste3et_C0st.furniture
+ DiceFurniture
+
+
-
-
- 3.5${furniture.tag}
-
- clean package install
- src
- DiceFurniture
-
-
- src
-
- **/*.java
-
-
-
-
-
- maven-compiler-plugin
- 3.7.0
-
-
- 1.8
-
-
-
-
- maven-assembly-plugin
-
-
-
-
- de.Ste3et_C0st.ProtectionLib.main.ProtectionLib
-
-
-
-
- jar-with-dependencies
-
- false
-
-
-
-
- maven-deploy-plugin
- 2.8.1
-
-
- default-deploy
- deploy
-
- deploy
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-deploy-plugin
- 3.0.0-M1
-
- false
-
-
-
-
-
-
-
- spigot-repo
- https://hub.spigotmc.org/nexus/content/repositories/snapshots/
-
-
+
+
+ 3.5.0${furniture.tag}
+
+ clean package install
+ src
+ DiceFurniture
+
+
+ src
+
+ **/*.java
+
+ true
+
+
+
+
+ maven-compiler-plugin
+ 3.7.0
+
+
+ 1.8
+
+
+
+
+
+
- jitpack.io
- https://jitpack.io
+ spigot-repo
+ https://hub.spigotmc.org/nexus/content/repositories/snapshots/
+
+
+
+ jitpack.io
+ https://jitpack.io
-
+
-
- org.spigotmc
- spigot-api
- 1.17-R0.1-SNAPSHOT
- provided
-
-
- com.github.Ste3et
- FurnitureLib
- 22fb4086de
+ org.spigotmc
+ spigot-api
+ 1.17-R0.1-SNAPSHOT
+ provided
-
+
+
+ com.github.Ste3et
+ FurnitureLib
+ 22fb4086de
+
+
+
+ Add some new Objects to the Server
+ https://dicecraft.de/furniture/
+
+ https://github.com/Ste3et/FurnitureLib/issues
+ GitHub
+
\ No newline at end of file
diff --git a/src/de/Ste3et_C0st/Furniture/Main/FurnitureHook.java b/src/de/Ste3et_C0st/Furniture/Main/FurnitureHook.java
index a20dcab..a1037f7 100644
--- a/src/de/Ste3et_C0st/Furniture/Main/FurnitureHook.java
+++ b/src/de/Ste3et_C0st/Furniture/Main/FurnitureHook.java
@@ -1,5 +1,7 @@
package de.Ste3et_C0st.Furniture.Main;
+import java.util.Objects;
+
import org.bukkit.Bukkit;
import org.bukkit.plugin.Plugin;
import de.Ste3et_C0st.Furniture.Main.Event.redstoneEvent;
@@ -96,7 +98,9 @@ public class FurnitureHook extends FurniturePlugin{
new Project("AdventCalender", getPlugin(), getResource(modelFolder + "AdventCalender" + ending), PlaceableSide.TOP, AdventCalender::new).setSize(1, 1, 1, CenterType.RIGHT);
new Project("FireworkLauncher", getPlugin(), getResource(modelFolder + "FireworkLauncher" + ending), PlaceableSide.TOP, FireworkLauncher::new).setSize(1, 1, 1, CenterType.CENTER);
- FurnitureLib.getInstance().getFurnitureManager().getProjects().stream().filter(pro -> pro.getPlugin().equals(getPlugin())).forEach(pro -> pro.setEditorProject(editModels));
+ FurnitureLib.getInstance().getFurnitureManager().getProjects().stream().filter(pro -> pro.getPlugin().equals(getPlugin())).forEach(pro -> {
+ if(Objects.nonNull(pro)) pro.setEditorProject(editModels);
+ });
}catch (Exception e) {
e.printStackTrace();
}
diff --git a/src/de/Ste3et_C0st/Furniture/Main/main.java b/src/de/Ste3et_C0st/Furniture/Main/main.java
index a1c6c3b..ae8f20f 100644
--- a/src/de/Ste3et_C0st/Furniture/Main/main.java
+++ b/src/de/Ste3et_C0st/Furniture/Main/main.java
@@ -27,8 +27,19 @@ public class main extends JavaPlugin{
public static HashMap catapultRange = new HashMap();
public void onEnable(){
- if(!Bukkit.getPluginManager().isPluginEnabled("FurnitureLib")){Bukkit.getPluginManager().disablePlugin(this);}
+ if(getServer().getPluginManager().isPluginEnabled("FurnitureLib") == false){
+ this.disablePlugin("[DiceFurniture] FurnitureLib is missing please install it!");
+ System.out.println("You can find the download here: https://www.spigotmc.org/resources/furniturelibary-protectionlib.9368/");
+ return;
+ }
+
instance = this;
+
+ if(FurnitureLib.getInstance().isEnabledPlugin() == false) {
+ this.disablePlugin("[DiceFurniture] Plugin disabled because FurnitureLib is incorectly installed!");
+ return;
+ }
+
util = FurnitureLib.getInstance().getLocationUtil();
if(FurnitureLib.getInstance().getDescription().getVersion().startsWith("2.")){
FurnitureHook furniturePlugin = new FurnitureHook(getInstance());
@@ -41,9 +52,16 @@ public class main extends JavaPlugin{
}else{
FurnitureLib.getInstance().send("FurnitureLib Version > 2.x not found");
FurnitureLib.getInstance().send("DiceFurniture deos not load");
+ this.disablePlugin("");
+ return;
}
}
+
+ private void disablePlugin(String string) {
+ if(string.isEmpty() == false) System.out.println(string);
+ Bukkit.getPluginManager().disablePlugin(this);
+ }
private void setDefaults_2(){
c = new config();
diff --git a/src/plugin.yml b/src/plugin.yml
index 2c267ee..9c78222 100644
--- a/src/plugin.yml
+++ b/src/plugin.yml
@@ -1,8 +1,8 @@
-name: DiceFurniture
-version: 3.4.6
-description: Add some new Objects to the Server
+name: ${project.name}
+version: ${project.version}
+description: ${project.description}
author: Ste3et_C0st
-website: http://dicecraft.de
+website: ${project.url}
depend: [FurnitureLib]
main: de.Ste3et_C0st.Furniture.Main.main
-api-version: 1.13
\ No newline at end of file
+api-version: 1.13