diff --git a/.gitignore b/.gitignore
index 7afb5fd..c9189a5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,11 @@
# Don't track content of these folders
.idea/*
target/*
+1_14_R1/target/*
+1_15_R1/target/*
+1_16_R1/target/*
+1_16_R2/target/*
+1_16_R3/target/*
1_17_R1/target/*
Plugin/target/*
Utility/target/*
diff --git a/1_14_R1/pom.xml b/1_14_R1/pom.xml
new file mode 100644
index 0000000..e8f3760
--- /dev/null
+++ b/1_14_R1/pom.xml
@@ -0,0 +1,45 @@
+
+
+ 4.0.0
+
+
+ tamablefoxes-parent
+ net.seanomik
+ 2.0.0-SNAPSHOT
+
+
+ tamablefoxes_v1_14_R1
+
+
+
+ spigot-repo
+ https://hub.spigotmc.org/nexus/content/repositories/snapshots/
+
+
+ codemc-snapshots
+ https://repo.codemc.io/repository/maven-snapshots/
+
+
+
+
+
+ net.seanomik
+ tamablefoxes-util
+ ${project.parent.version}
+ provided
+
+
+ org.spigotmc
+ spigot
+ 1.14.4-R0.1-SNAPSHOT
+ provided
+
+
+ net.wesjd
+ anvilgui
+ 1.5.1-SNAPSHOT
+
+
+
\ No newline at end of file
diff --git a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_14_R1/EntityTamableFox.java b/1_14_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_14_R1/EntityTamableFox.java
similarity index 98%
rename from Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_14_R1/EntityTamableFox.java
rename to 1_14_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_14_R1/EntityTamableFox.java
index bb0ce8c..6fc3ab0 100644
--- a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_14_R1/EntityTamableFox.java
+++ b/1_14_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_14_R1/EntityTamableFox.java
@@ -1,7 +1,6 @@
package net.seanomik.tamablefoxes.versions.version_1_14_R1;
import net.minecraft.server.v1_14_R1.*;
-import net.seanomik.tamablefoxes.TamableFoxes;
import net.seanomik.tamablefoxes.util.Utils;
import net.seanomik.tamablefoxes.util.io.Config;
import net.seanomik.tamablefoxes.util.io.LanguageConfig;
@@ -80,7 +79,7 @@ public class EntityTamableFox extends EntityFox {
return !isTamed() && !((EntityLiving) entityliving).isSneaking() && IEntitySelector.e.test((EntityLiving) entityliving) && !this.isDefending();
}));
this.goalSelector.a(4, new PathfinderGoalAvoidTarget(this, EntityWolf.class, 8.0F, 1.6D, 1.4D, (entityliving) -> {
- return !((net.minecraft.server.v1_16_R1.EntityWolf)entityliving).isTamed() && !this.isDefending();
+ return !((EntityWolf)entityliving).isTamed() && !this.isDefending();
}));
this.goalSelector.a(5, getFoxInnerPathfinderGoal("u")); // StalkPreyGoal
@@ -287,7 +286,7 @@ public class EntityTamableFox extends EntityFox {
// Run this task async to make sure to not slow the server down.
// This is needed due to the item being remove as soon as its put in the foxes mouth.
- Bukkit.getScheduler().runTaskLaterAsynchronously(TamableFoxes.getPlugin(), ()-> {
+ Bukkit.getScheduler().runTaskLaterAsynchronously(Utils.tamableFoxesPlugin, ()-> {
// Put item in mouth
if (item != Items.AIR) {
ItemStack c = itemstack.cloneItemStack();
@@ -318,7 +317,7 @@ public class EntityTamableFox extends EntityFox {
itemstack.subtract(1);
}
- SQLiteHelper sqLiteHelper = SQLiteHelper.getInstance(TamableFoxes.getPlugin());
+ SQLiteHelper sqLiteHelper = SQLiteHelper.getInstance(Utils.tamableFoxesPlugin);
int maxTameCount = Config.getMaxPlayerFoxTames();
if ( !((Player) entityhuman.getBukkitEntity()).hasPermission("tamablefoxes.tame.unlimited") && maxTameCount > 0 && sqLiteHelper.getPlayerFoxAmount(entityhuman.getUniqueID()) >= maxTameCount) {
((Player) entityhuman.getBukkitEntity()).sendMessage(Utils.getPrefix() + ChatColor.RED + LanguageConfig.getFoxDoesntTrust());
@@ -365,7 +364,7 @@ public class EntityTamableFox extends EntityFox {
return AnvilGUI.Response.close();
})
.text("Fox name") // Sets the text the GUI should start with
- .plugin(TamableFoxes.getPlugin()) // Set the plugin instance
+ .plugin(Utils.tamableFoxesPlugin) // Set the plugin instance
.open(player); // Opens the GUI for the player provided
}
} else {
@@ -499,7 +498,7 @@ public class EntityTamableFox extends EntityFox {
// Remove the amount of foxes the player has tamed if the limit is enabled.
if (Config.getMaxPlayerFoxTames() > 0) {
- SQLiteHelper sqliteHelper = SQLiteHelper.getInstance(TamableFoxes.getPlugin());
+ SQLiteHelper sqliteHelper = SQLiteHelper.getInstance(Utils.tamableFoxesPlugin);
sqliteHelper.removePlayerFoxAmount(this.getOwner().getUniqueID(), 1);
}
}
diff --git a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_14_R1/NMSInterface_1_14_R1.java b/1_14_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_14_R1/NMSInterface_1_14_R1.java
similarity index 100%
rename from Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_14_R1/NMSInterface_1_14_R1.java
rename to 1_14_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_14_R1/NMSInterface_1_14_R1.java
diff --git a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_14_R1/pathfinding/FoxPathfinderGoalFollowOwner.java b/1_14_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_14_R1/pathfinding/FoxPathfinderGoalFollowOwner.java
similarity index 100%
rename from Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_14_R1/pathfinding/FoxPathfinderGoalFollowOwner.java
rename to 1_14_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_14_R1/pathfinding/FoxPathfinderGoalFollowOwner.java
diff --git a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_14_R1/pathfinding/FoxPathfinderGoalHurtByTarget.java b/1_14_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_14_R1/pathfinding/FoxPathfinderGoalHurtByTarget.java
similarity index 97%
rename from Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_14_R1/pathfinding/FoxPathfinderGoalHurtByTarget.java
rename to 1_14_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_14_R1/pathfinding/FoxPathfinderGoalHurtByTarget.java
index a8385ae..f0585ab 100644
--- a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_14_R1/pathfinding/FoxPathfinderGoalHurtByTarget.java
+++ b/1_14_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_14_R1/pathfinding/FoxPathfinderGoalHurtByTarget.java
@@ -1,6 +1,5 @@
package net.seanomik.tamablefoxes.versions.version_1_14_R1.pathfinding;
-import net.seanomik.tamablefoxes.versions.version_1_14_R1.EntityTamableFox;
import net.minecraft.server.v1_14_R1.*;
import org.bukkit.event.entity.EntityTargetEvent.TargetReason;
diff --git a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_14_R1/pathfinding/FoxPathfinderGoalOwnerHurtByTarget.java b/1_14_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_14_R1/pathfinding/FoxPathfinderGoalOwnerHurtByTarget.java
similarity index 100%
rename from Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_14_R1/pathfinding/FoxPathfinderGoalOwnerHurtByTarget.java
rename to 1_14_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_14_R1/pathfinding/FoxPathfinderGoalOwnerHurtByTarget.java
diff --git a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_14_R1/pathfinding/FoxPathfinderGoalOwnerHurtTarget.java b/1_14_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_14_R1/pathfinding/FoxPathfinderGoalOwnerHurtTarget.java
similarity index 96%
rename from Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_14_R1/pathfinding/FoxPathfinderGoalOwnerHurtTarget.java
rename to 1_14_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_14_R1/pathfinding/FoxPathfinderGoalOwnerHurtTarget.java
index 68516fd..e6503d3 100644
--- a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_14_R1/pathfinding/FoxPathfinderGoalOwnerHurtTarget.java
+++ b/1_14_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_14_R1/pathfinding/FoxPathfinderGoalOwnerHurtTarget.java
@@ -1,7 +1,6 @@
package net.seanomik.tamablefoxes.versions.version_1_14_R1.pathfinding;
import net.minecraft.server.v1_14_R1.EntityLiving;
-import net.minecraft.server.v1_14_R1.EntityTameableAnimal;
import net.minecraft.server.v1_14_R1.PathfinderGoalTarget;
import net.minecraft.server.v1_14_R1.PathfinderTargetCondition;
import net.seanomik.tamablefoxes.versions.version_1_14_R1.EntityTamableFox;
diff --git a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_14_R1/pathfinding/FoxPathfinderGoalPanic.java b/1_14_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_14_R1/pathfinding/FoxPathfinderGoalPanic.java
similarity index 87%
rename from Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_14_R1/pathfinding/FoxPathfinderGoalPanic.java
rename to 1_14_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_14_R1/pathfinding/FoxPathfinderGoalPanic.java
index 610a268..c3e9900 100644
--- a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_14_R1/pathfinding/FoxPathfinderGoalPanic.java
+++ b/1_14_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_14_R1/pathfinding/FoxPathfinderGoalPanic.java
@@ -1,11 +1,8 @@
package net.seanomik.tamablefoxes.versions.version_1_14_R1.pathfinding;
-import net.minecraft.server.v1_14_R1.EntityFox;
import net.minecraft.server.v1_14_R1.PathfinderGoalPanic;
import net.seanomik.tamablefoxes.versions.version_1_14_R1.EntityTamableFox;
-import java.lang.reflect.Method;
-
public class FoxPathfinderGoalPanic extends PathfinderGoalPanic {
EntityTamableFox tamableFox;
diff --git a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_14_R1/pathfinding/FoxPathfinderGoalSit.java b/1_14_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_14_R1/pathfinding/FoxPathfinderGoalSit.java
similarity index 92%
rename from Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_14_R1/pathfinding/FoxPathfinderGoalSit.java
rename to 1_14_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_14_R1/pathfinding/FoxPathfinderGoalSit.java
index bd42556..d2196cf 100644
--- a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_14_R1/pathfinding/FoxPathfinderGoalSit.java
+++ b/1_14_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_14_R1/pathfinding/FoxPathfinderGoalSit.java
@@ -1,6 +1,6 @@
package net.seanomik.tamablefoxes.versions.version_1_14_R1.pathfinding;
-import net.seanomik.tamablefoxes.TamableFoxes;
+import net.seanomik.tamablefoxes.util.Utils;
import net.seanomik.tamablefoxes.versions.version_1_14_R1.EntityTamableFox;
import net.minecraft.server.v1_14_R1.EntityLiving;
import net.minecraft.server.v1_14_R1.PathfinderGoal;
@@ -39,7 +39,7 @@ public class FoxPathfinderGoalSit extends PathfinderGoal {
this.entity.setGoalTarget(null);
// For some reason it needs to be ran later.
- Bukkit.getScheduler().runTaskLater(TamableFoxes.getPlugin(), () -> {
+ Bukkit.getScheduler().runTaskLater(Utils.tamableFoxesPlugin, () -> {
this.entity.setSitting(true);
}, 1L);
}
diff --git a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_14_R1/pathfinding/FoxPathfinderGoalSleepWithOwner.java b/1_14_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_14_R1/pathfinding/FoxPathfinderGoalSleepWithOwner.java
similarity index 99%
rename from Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_14_R1/pathfinding/FoxPathfinderGoalSleepWithOwner.java
rename to 1_14_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_14_R1/pathfinding/FoxPathfinderGoalSleepWithOwner.java
index f2f967a..578ba69 100644
--- a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_14_R1/pathfinding/FoxPathfinderGoalSleepWithOwner.java
+++ b/1_14_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_14_R1/pathfinding/FoxPathfinderGoalSleepWithOwner.java
@@ -1,7 +1,6 @@
package net.seanomik.tamablefoxes.versions.version_1_14_R1.pathfinding;
import net.minecraft.server.v1_14_R1.*;
-import net.seanomik.tamablefoxes.TamableFoxes;
import net.seanomik.tamablefoxes.versions.version_1_14_R1.EntityTamableFox;
import java.util.Iterator;
diff --git a/1_15_R1/pom.xml b/1_15_R1/pom.xml
new file mode 100644
index 0000000..f1ad010
--- /dev/null
+++ b/1_15_R1/pom.xml
@@ -0,0 +1,45 @@
+
+
+ 4.0.0
+
+
+ tamablefoxes-parent
+ net.seanomik
+ 2.0.0-SNAPSHOT
+
+
+ tamablefoxes_v1_15_R1
+
+
+
+ spigot-repo
+ https://hub.spigotmc.org/nexus/content/repositories/snapshots/
+
+
+ codemc-snapshots
+ https://repo.codemc.io/repository/maven-snapshots/
+
+
+
+
+
+ net.seanomik
+ tamablefoxes-util
+ ${project.parent.version}
+ provided
+
+
+ org.spigotmc
+ spigot
+ 1.15.2-R0.1-SNAPSHOT
+ provided
+
+
+ net.wesjd
+ anvilgui
+ 1.5.1-SNAPSHOT
+
+
+
\ No newline at end of file
diff --git a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_15_R1/EntityTamableFox.java b/1_15_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_15_R1/EntityTamableFox.java
similarity index 98%
rename from Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_15_R1/EntityTamableFox.java
rename to 1_15_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_15_R1/EntityTamableFox.java
index 72daa98..61ebae5 100644
--- a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_15_R1/EntityTamableFox.java
+++ b/1_15_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_15_R1/EntityTamableFox.java
@@ -1,7 +1,6 @@
package net.seanomik.tamablefoxes.versions.version_1_15_R1;
import net.minecraft.server.v1_15_R1.*;
-import net.seanomik.tamablefoxes.TamableFoxes;
import net.seanomik.tamablefoxes.util.Utils;
import net.seanomik.tamablefoxes.util.io.Config;
import net.seanomik.tamablefoxes.util.io.LanguageConfig;
@@ -287,7 +286,7 @@ public class EntityTamableFox extends EntityFox {
// Run this task async to make sure to not slow the server down.
// This is needed due to the item being remove as soon as its put in the foxes mouth.
- Bukkit.getScheduler().runTaskLaterAsynchronously(TamableFoxes.getPlugin(), ()-> {
+ Bukkit.getScheduler().runTaskLaterAsynchronously(Utils.tamableFoxesPlugin, ()-> {
// Put item in mouth
if (item != Items.AIR) {
ItemStack c = itemstack.cloneItemStack();
@@ -318,7 +317,7 @@ public class EntityTamableFox extends EntityFox {
itemstack.subtract(1);
}
- SQLiteHelper sqLiteHelper = SQLiteHelper.getInstance(TamableFoxes.getPlugin());
+ SQLiteHelper sqLiteHelper = SQLiteHelper.getInstance(Utils.tamableFoxesPlugin);
int maxTameCount = Config.getMaxPlayerFoxTames();
if ( !((Player) entityhuman.getBukkitEntity()).hasPermission("tamablefoxes.tame.unlimited") && maxTameCount > 0 && sqLiteHelper.getPlayerFoxAmount(entityhuman.getUniqueID()) >= maxTameCount) {
((Player) entityhuman.getBukkitEntity()).sendMessage(Utils.getPrefix() + ChatColor.RED + LanguageConfig.getFoxDoesntTrust());
@@ -365,7 +364,7 @@ public class EntityTamableFox extends EntityFox {
return AnvilGUI.Response.close();
})
.text("Fox name") // Sets the text the GUI should start with
- .plugin(TamableFoxes.getPlugin()) // Set the plugin instance
+ .plugin(Utils.tamableFoxesPlugin) // Set the plugin instance
.open(player); // Opens the GUI for the player provided
}
} else {
@@ -499,7 +498,7 @@ public class EntityTamableFox extends EntityFox {
// Remove the amount of foxes the player has tamed if the limit is enabled.
if (Config.getMaxPlayerFoxTames() > 0) {
- SQLiteHelper sqliteHelper = SQLiteHelper.getInstance(TamableFoxes.getPlugin());
+ SQLiteHelper sqliteHelper = SQLiteHelper.getInstance(Utils.tamableFoxesPlugin);
sqliteHelper.removePlayerFoxAmount(this.getOwner().getUniqueID(), 1);
}
}
diff --git a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_15_R1/NMSInterface_1_15_R1.java b/1_15_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_15_R1/NMSInterface_1_15_R1.java
similarity index 100%
rename from Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_15_R1/NMSInterface_1_15_R1.java
rename to 1_15_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_15_R1/NMSInterface_1_15_R1.java
diff --git a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_15_R1/pathfinding/FoxPathfinderGoalFollowOwner.java b/1_15_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_15_R1/pathfinding/FoxPathfinderGoalFollowOwner.java
similarity index 100%
rename from Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_15_R1/pathfinding/FoxPathfinderGoalFollowOwner.java
rename to 1_15_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_15_R1/pathfinding/FoxPathfinderGoalFollowOwner.java
diff --git a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_15_R1/pathfinding/FoxPathfinderGoalHurtByTarget.java b/1_15_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_15_R1/pathfinding/FoxPathfinderGoalHurtByTarget.java
similarity index 100%
rename from Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_15_R1/pathfinding/FoxPathfinderGoalHurtByTarget.java
rename to 1_15_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_15_R1/pathfinding/FoxPathfinderGoalHurtByTarget.java
diff --git a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_15_R1/pathfinding/FoxPathfinderGoalOwnerHurtByTarget.java b/1_15_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_15_R1/pathfinding/FoxPathfinderGoalOwnerHurtByTarget.java
similarity index 100%
rename from Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_15_R1/pathfinding/FoxPathfinderGoalOwnerHurtByTarget.java
rename to 1_15_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_15_R1/pathfinding/FoxPathfinderGoalOwnerHurtByTarget.java
diff --git a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_15_R1/pathfinding/FoxPathfinderGoalOwnerHurtTarget.java b/1_15_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_15_R1/pathfinding/FoxPathfinderGoalOwnerHurtTarget.java
similarity index 100%
rename from Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_15_R1/pathfinding/FoxPathfinderGoalOwnerHurtTarget.java
rename to 1_15_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_15_R1/pathfinding/FoxPathfinderGoalOwnerHurtTarget.java
diff --git a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_15_R1/pathfinding/FoxPathfinderGoalPanic.java b/1_15_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_15_R1/pathfinding/FoxPathfinderGoalPanic.java
similarity index 100%
rename from Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_15_R1/pathfinding/FoxPathfinderGoalPanic.java
rename to 1_15_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_15_R1/pathfinding/FoxPathfinderGoalPanic.java
diff --git a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_15_R1/pathfinding/FoxPathfinderGoalSit.java b/1_15_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_15_R1/pathfinding/FoxPathfinderGoalSit.java
similarity index 92%
rename from Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_15_R1/pathfinding/FoxPathfinderGoalSit.java
rename to 1_15_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_15_R1/pathfinding/FoxPathfinderGoalSit.java
index 76a7526..b38ab79 100644
--- a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_15_R1/pathfinding/FoxPathfinderGoalSit.java
+++ b/1_15_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_15_R1/pathfinding/FoxPathfinderGoalSit.java
@@ -1,6 +1,6 @@
package net.seanomik.tamablefoxes.versions.version_1_15_R1.pathfinding;
-import net.seanomik.tamablefoxes.TamableFoxes;
+import net.seanomik.tamablefoxes.util.Utils;
import net.seanomik.tamablefoxes.versions.version_1_15_R1.EntityTamableFox;
import net.minecraft.server.v1_15_R1.EntityLiving;
import net.minecraft.server.v1_15_R1.PathfinderGoal;
@@ -40,7 +40,7 @@ public class FoxPathfinderGoalSit extends PathfinderGoal {
this.entity.setGoalTarget(null);
// For some reason it needs to be ran later.
- Bukkit.getScheduler().runTaskLater(TamableFoxes.getPlugin(), () -> {
+ Bukkit.getScheduler().runTaskLater(Utils.tamableFoxesPlugin, () -> {
this.entity.setSitting(true);
}, 1L);
}
diff --git a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_15_R1/pathfinding/FoxPathfinderGoalSleepWithOwner.java b/1_15_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_15_R1/pathfinding/FoxPathfinderGoalSleepWithOwner.java
similarity index 100%
rename from Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_15_R1/pathfinding/FoxPathfinderGoalSleepWithOwner.java
rename to 1_15_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_15_R1/pathfinding/FoxPathfinderGoalSleepWithOwner.java
diff --git a/1_16_R1/pom.xml b/1_16_R1/pom.xml
new file mode 100644
index 0000000..548ad9f
--- /dev/null
+++ b/1_16_R1/pom.xml
@@ -0,0 +1,45 @@
+
+
+ 4.0.0
+
+
+ tamablefoxes-parent
+ net.seanomik
+ 2.0.0-SNAPSHOT
+
+
+ tamablefoxes_v1_16_R1
+
+
+
+ spigot-repo
+ https://hub.spigotmc.org/nexus/content/repositories/snapshots/
+
+
+ codemc-snapshots
+ https://repo.codemc.io/repository/maven-snapshots/
+
+
+
+
+
+ net.seanomik
+ tamablefoxes-util
+ ${project.parent.version}
+ provided
+
+
+ org.spigotmc
+ spigot
+ 1.16.1-R0.1-SNAPSHOT
+ provided
+
+
+ net.wesjd
+ anvilgui
+ 1.5.1-SNAPSHOT
+
+
+
\ No newline at end of file
diff --git a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R1/EntityTamableFox.java b/1_16_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R1/EntityTamableFox.java
similarity index 98%
rename from Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R1/EntityTamableFox.java
rename to 1_16_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R1/EntityTamableFox.java
index f896d62..a5bcf79 100644
--- a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R1/EntityTamableFox.java
+++ b/1_16_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R1/EntityTamableFox.java
@@ -1,7 +1,6 @@
package net.seanomik.tamablefoxes.versions.version_1_16_R1;
import net.minecraft.server.v1_16_R1.*;
-import net.seanomik.tamablefoxes.TamableFoxes;
import net.seanomik.tamablefoxes.util.Utils;
import net.seanomik.tamablefoxes.util.io.Config;
import net.seanomik.tamablefoxes.util.io.LanguageConfig;
@@ -289,7 +288,7 @@ public class EntityTamableFox extends EntityFox {
// Run this task async to make sure to not slow the server down.
// This is needed due to the item being remove as soon as its put in the foxes mouth.
- Bukkit.getScheduler().runTaskLaterAsynchronously(TamableFoxes.getPlugin(), ()-> {
+ Bukkit.getScheduler().runTaskLaterAsynchronously(Utils.tamableFoxesPlugin, ()-> {
// Put item in mouth
if (item != Items.AIR) {
ItemStack c = itemstack.cloneItemStack();
@@ -321,7 +320,7 @@ public class EntityTamableFox extends EntityFox {
itemstack.subtract(1);
}
- SQLiteHelper sqLiteHelper = SQLiteHelper.getInstance(TamableFoxes.getPlugin());
+ SQLiteHelper sqLiteHelper = SQLiteHelper.getInstance(Utils.tamableFoxesPlugin);
int maxTameCount = Config.getMaxPlayerFoxTames();
if ( !((Player) entityhuman.getBukkitEntity()).hasPermission("tamablefoxes.tame.unlimited") && maxTameCount > 0 && sqLiteHelper.getPlayerFoxAmount(entityhuman.getUniqueID()) >= maxTameCount) {
((Player) entityhuman.getBukkitEntity()).sendMessage(Utils.getPrefix() + ChatColor.RED + LanguageConfig.getFoxDoesntTrust());
@@ -368,7 +367,7 @@ public class EntityTamableFox extends EntityFox {
return AnvilGUI.Response.close();
})
.text("Fox name") // Sets the text the GUI should start with
- .plugin(TamableFoxes.getPlugin()) // Set the plugin instance
+ .plugin(Utils.tamableFoxesPlugin) // Set the plugin instance
.open(player); // Opens the GUI for the player provided
}
} else {
@@ -503,7 +502,7 @@ public class EntityTamableFox extends EntityFox {
// Remove the amount of foxes the player has tamed if the limit is enabled.
if (Config.getMaxPlayerFoxTames() > 0) {
- SQLiteHelper sqliteHelper = SQLiteHelper.getInstance(TamableFoxes.getPlugin());
+ SQLiteHelper sqliteHelper = SQLiteHelper.getInstance(Utils.tamableFoxesPlugin);
sqliteHelper.removePlayerFoxAmount(this.getOwner().getUniqueID(), 1);
}
}
diff --git a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R1/NMSInterface_1_16_R1.java b/1_16_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R1/NMSInterface_1_16_R1.java
similarity index 100%
rename from Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R1/NMSInterface_1_16_R1.java
rename to 1_16_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R1/NMSInterface_1_16_R1.java
diff --git a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R1/pathfinding/FoxPathfinderGoalFollowOwner.java b/1_16_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R1/pathfinding/FoxPathfinderGoalFollowOwner.java
similarity index 100%
rename from Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R1/pathfinding/FoxPathfinderGoalFollowOwner.java
rename to 1_16_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R1/pathfinding/FoxPathfinderGoalFollowOwner.java
diff --git a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R1/pathfinding/FoxPathfinderGoalHurtByTarget.java b/1_16_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R1/pathfinding/FoxPathfinderGoalHurtByTarget.java
similarity index 100%
rename from Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R1/pathfinding/FoxPathfinderGoalHurtByTarget.java
rename to 1_16_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R1/pathfinding/FoxPathfinderGoalHurtByTarget.java
diff --git a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R1/pathfinding/FoxPathfinderGoalOwnerHurtByTarget.java b/1_16_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R1/pathfinding/FoxPathfinderGoalOwnerHurtByTarget.java
similarity index 100%
rename from Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R1/pathfinding/FoxPathfinderGoalOwnerHurtByTarget.java
rename to 1_16_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R1/pathfinding/FoxPathfinderGoalOwnerHurtByTarget.java
diff --git a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R1/pathfinding/FoxPathfinderGoalOwnerHurtTarget.java b/1_16_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R1/pathfinding/FoxPathfinderGoalOwnerHurtTarget.java
similarity index 100%
rename from Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R1/pathfinding/FoxPathfinderGoalOwnerHurtTarget.java
rename to 1_16_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R1/pathfinding/FoxPathfinderGoalOwnerHurtTarget.java
diff --git a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R1/pathfinding/FoxPathfinderGoalPanic.java b/1_16_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R1/pathfinding/FoxPathfinderGoalPanic.java
similarity index 100%
rename from Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R1/pathfinding/FoxPathfinderGoalPanic.java
rename to 1_16_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R1/pathfinding/FoxPathfinderGoalPanic.java
diff --git a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R1/pathfinding/FoxPathfinderGoalSit.java b/1_16_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R1/pathfinding/FoxPathfinderGoalSit.java
similarity index 93%
rename from Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R1/pathfinding/FoxPathfinderGoalSit.java
rename to 1_16_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R1/pathfinding/FoxPathfinderGoalSit.java
index 02df520..a181625 100644
--- a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R1/pathfinding/FoxPathfinderGoalSit.java
+++ b/1_16_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R1/pathfinding/FoxPathfinderGoalSit.java
@@ -2,7 +2,7 @@ package net.seanomik.tamablefoxes.versions.version_1_16_R1.pathfinding;
import net.minecraft.server.v1_16_R1.PathfinderGoal;
import net.minecraft.server.v1_16_R1.EntityLiving;
-import net.seanomik.tamablefoxes.TamableFoxes;
+import net.seanomik.tamablefoxes.util.Utils;
import net.seanomik.tamablefoxes.versions.version_1_16_R1.EntityTamableFox;
import org.bukkit.Bukkit;
@@ -39,7 +39,7 @@ public class FoxPathfinderGoalSit extends PathfinderGoal {
this.entity.setGoalTarget(null);
// For some reason it needs to be ran later.
- Bukkit.getScheduler().runTaskLater(TamableFoxes.getPlugin(), () -> {
+ Bukkit.getScheduler().runTaskLater(Utils.tamableFoxesPlugin, () -> {
this.entity.setSitting(true);
}, 1L);
}
diff --git a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R1/pathfinding/FoxPathfinderGoalSleepWithOwner.java b/1_16_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R1/pathfinding/FoxPathfinderGoalSleepWithOwner.java
similarity index 100%
rename from Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R1/pathfinding/FoxPathfinderGoalSleepWithOwner.java
rename to 1_16_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R1/pathfinding/FoxPathfinderGoalSleepWithOwner.java
diff --git a/1_16_R2/pom.xml b/1_16_R2/pom.xml
new file mode 100644
index 0000000..2f99109
--- /dev/null
+++ b/1_16_R2/pom.xml
@@ -0,0 +1,45 @@
+
+
+ 4.0.0
+
+
+ tamablefoxes-parent
+ net.seanomik
+ 2.0.0-SNAPSHOT
+
+
+ tamablefoxes_v1_16_R2
+
+
+
+ spigot-repo
+ https://hub.spigotmc.org/nexus/content/repositories/snapshots/
+
+
+ codemc-snapshots
+ https://repo.codemc.io/repository/maven-snapshots/
+
+
+
+
+
+ net.seanomik
+ tamablefoxes-util
+ ${project.parent.version}
+ provided
+
+
+ org.spigotmc
+ spigot
+ 1.16.3-R0.1-SNAPSHOT
+ provided
+
+
+ net.wesjd
+ anvilgui
+ 1.5.1-SNAPSHOT
+
+
+
\ No newline at end of file
diff --git a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R2/EntityTamableFox.java b/1_16_R2/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R2/EntityTamableFox.java
similarity index 98%
rename from Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R2/EntityTamableFox.java
rename to 1_16_R2/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R2/EntityTamableFox.java
index 83678fc..9d3b80b 100644
--- a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R2/EntityTamableFox.java
+++ b/1_16_R2/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R2/EntityTamableFox.java
@@ -1,7 +1,6 @@
package net.seanomik.tamablefoxes.versions.version_1_16_R2;
import net.minecraft.server.v1_16_R2.*;
-import net.seanomik.tamablefoxes.TamableFoxes;
import net.seanomik.tamablefoxes.util.Utils;
import net.seanomik.tamablefoxes.util.io.Config;
import net.seanomik.tamablefoxes.util.io.LanguageConfig;
@@ -286,7 +285,7 @@ public class EntityTamableFox extends EntityFox {
// Run this task async to make sure to not slow the server down.
// This is needed due to the item being remove as soon as its put in the foxes mouth.
- Bukkit.getScheduler().runTaskLaterAsynchronously(TamableFoxes.getPlugin(), ()-> {
+ Bukkit.getScheduler().runTaskLaterAsynchronously(Utils.tamableFoxesPlugin, ()-> {
// Put item in mouth
if (item != Items.AIR) {
ItemStack c = itemstack.cloneItemStack();
@@ -318,7 +317,7 @@ public class EntityTamableFox extends EntityFox {
itemstack.subtract(1);
}
- SQLiteHelper sqLiteHelper = SQLiteHelper.getInstance(TamableFoxes.getPlugin());
+ SQLiteHelper sqLiteHelper = SQLiteHelper.getInstance(Utils.tamableFoxesPlugin);
int maxTameCount = Config.getMaxPlayerFoxTames();
if ( !((Player) entityhuman.getBukkitEntity()).hasPermission("tamablefoxes.tame.unlimited") && maxTameCount > 0 && sqLiteHelper.getPlayerFoxAmount(entityhuman.getUniqueID()) >= maxTameCount) {
((Player) entityhuman.getBukkitEntity()).sendMessage(Utils.getPrefix() + ChatColor.RED + LanguageConfig.getFoxDoesntTrust());
@@ -365,7 +364,7 @@ public class EntityTamableFox extends EntityFox {
return AnvilGUI.Response.close();
})
.text("Fox name") // Sets the text the GUI should start with
- .plugin(TamableFoxes.getPlugin()) // Set the plugin instance
+ .plugin(Utils.tamableFoxesPlugin) // Set the plugin instance
.open(player); // Opens the GUI for the player provided
}
} else {
@@ -500,7 +499,7 @@ public class EntityTamableFox extends EntityFox {
// Remove the amount of foxes the player has tamed if the limit is enabled.
if (Config.getMaxPlayerFoxTames() > 0) {
- SQLiteHelper sqliteHelper = SQLiteHelper.getInstance(TamableFoxes.getPlugin());
+ SQLiteHelper sqliteHelper = SQLiteHelper.getInstance(Utils.tamableFoxesPlugin);
sqliteHelper.removePlayerFoxAmount(this.getOwner().getUniqueID(), 1);
}
}
diff --git a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R2/NMSInterface_1_16_R2.java b/1_16_R2/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R2/NMSInterface_1_16_R2.java
similarity index 100%
rename from Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R2/NMSInterface_1_16_R2.java
rename to 1_16_R2/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R2/NMSInterface_1_16_R2.java
diff --git a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R2/pathfinding/FoxPathfinderGoalFollowOwner.java b/1_16_R2/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R2/pathfinding/FoxPathfinderGoalFollowOwner.java
similarity index 100%
rename from Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R2/pathfinding/FoxPathfinderGoalFollowOwner.java
rename to 1_16_R2/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R2/pathfinding/FoxPathfinderGoalFollowOwner.java
diff --git a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R2/pathfinding/FoxPathfinderGoalHurtByTarget.java b/1_16_R2/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R2/pathfinding/FoxPathfinderGoalHurtByTarget.java
similarity index 100%
rename from Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R2/pathfinding/FoxPathfinderGoalHurtByTarget.java
rename to 1_16_R2/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R2/pathfinding/FoxPathfinderGoalHurtByTarget.java
diff --git a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R2/pathfinding/FoxPathfinderGoalOwnerHurtByTarget.java b/1_16_R2/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R2/pathfinding/FoxPathfinderGoalOwnerHurtByTarget.java
similarity index 100%
rename from Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R2/pathfinding/FoxPathfinderGoalOwnerHurtByTarget.java
rename to 1_16_R2/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R2/pathfinding/FoxPathfinderGoalOwnerHurtByTarget.java
diff --git a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R2/pathfinding/FoxPathfinderGoalOwnerHurtTarget.java b/1_16_R2/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R2/pathfinding/FoxPathfinderGoalOwnerHurtTarget.java
similarity index 100%
rename from Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R2/pathfinding/FoxPathfinderGoalOwnerHurtTarget.java
rename to 1_16_R2/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R2/pathfinding/FoxPathfinderGoalOwnerHurtTarget.java
diff --git a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R2/pathfinding/FoxPathfinderGoalPanic.java b/1_16_R2/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R2/pathfinding/FoxPathfinderGoalPanic.java
similarity index 100%
rename from Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R2/pathfinding/FoxPathfinderGoalPanic.java
rename to 1_16_R2/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R2/pathfinding/FoxPathfinderGoalPanic.java
diff --git a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R2/pathfinding/FoxPathfinderGoalSit.java b/1_16_R2/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R2/pathfinding/FoxPathfinderGoalSit.java
similarity index 92%
rename from Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R2/pathfinding/FoxPathfinderGoalSit.java
rename to 1_16_R2/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R2/pathfinding/FoxPathfinderGoalSit.java
index 2a4078c..2dee1f7 100644
--- a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R2/pathfinding/FoxPathfinderGoalSit.java
+++ b/1_16_R2/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R2/pathfinding/FoxPathfinderGoalSit.java
@@ -2,7 +2,7 @@ package net.seanomik.tamablefoxes.versions.version_1_16_R2.pathfinding;
import net.minecraft.server.v1_16_R2.EntityLiving;
import net.minecraft.server.v1_16_R2.PathfinderGoal;
-import net.seanomik.tamablefoxes.TamableFoxes;
+import net.seanomik.tamablefoxes.util.Utils;
import net.seanomik.tamablefoxes.versions.version_1_16_R2.EntityTamableFox;
import org.bukkit.Bukkit;
@@ -39,7 +39,7 @@ public class FoxPathfinderGoalSit extends PathfinderGoal {
this.entity.setGoalTarget(null);
// For some reason it needs to be ran later.
- Bukkit.getScheduler().runTaskLater(TamableFoxes.getPlugin(), () -> {
+ Bukkit.getScheduler().runTaskLater(Utils.tamableFoxesPlugin, () -> {
this.entity.setSitting(true);
}, 1L);
}
diff --git a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R2/pathfinding/FoxPathfinderGoalSleepWithOwner.java b/1_16_R2/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R2/pathfinding/FoxPathfinderGoalSleepWithOwner.java
similarity index 100%
rename from Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R2/pathfinding/FoxPathfinderGoalSleepWithOwner.java
rename to 1_16_R2/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R2/pathfinding/FoxPathfinderGoalSleepWithOwner.java
diff --git a/1_16_R3/pom.xml b/1_16_R3/pom.xml
new file mode 100644
index 0000000..3a7850b
--- /dev/null
+++ b/1_16_R3/pom.xml
@@ -0,0 +1,45 @@
+
+
+ 4.0.0
+
+
+ net.seanomik
+ tamablefoxes-parent
+ 2.0.0-SNAPSHOT
+
+
+ tamablefoxes_v1_16_R3
+
+
+
+ spigot-repo
+ https://hub.spigotmc.org/nexus/content/repositories/snapshots/
+
+
+ codemc-snapshots
+ https://repo.codemc.io/repository/maven-snapshots/
+
+
+
+
+
+ net.seanomik
+ tamablefoxes-util
+ ${project.parent.version}
+ provided
+
+
+ org.spigotmc
+ spigot
+ 1.16.5-R0.1-SNAPSHOT
+ provided
+
+
+ net.wesjd
+ anvilgui
+ 1.5.1-SNAPSHOT
+
+
+
\ No newline at end of file
diff --git a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R3/EntityTamableFox.java b/1_16_R3/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R3/EntityTamableFox.java
similarity index 98%
rename from Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R3/EntityTamableFox.java
rename to 1_16_R3/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R3/EntityTamableFox.java
index d398654..c636207 100644
--- a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R3/EntityTamableFox.java
+++ b/1_16_R3/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R3/EntityTamableFox.java
@@ -1,7 +1,6 @@
package net.seanomik.tamablefoxes.versions.version_1_16_R3;
import net.minecraft.server.v1_16_R3.*;
-import net.seanomik.tamablefoxes.TamableFoxes;
import net.seanomik.tamablefoxes.util.Utils;
import net.seanomik.tamablefoxes.util.io.Config;
import net.seanomik.tamablefoxes.util.io.LanguageConfig;
@@ -287,7 +286,7 @@ public class EntityTamableFox extends EntityFox {
// Run this task async to make sure to not slow the server down.
// This is needed due to the item being remove as soon as its put in the foxes mouth.
- Bukkit.getScheduler().runTaskLaterAsynchronously(TamableFoxes.getPlugin(), ()-> {
+ Bukkit.getScheduler().runTaskLaterAsynchronously(Utils.tamableFoxesPlugin, ()-> {
// Put item in mouth
if (item != Items.AIR) {
ItemStack c = itemstack.cloneItemStack();
@@ -319,7 +318,7 @@ public class EntityTamableFox extends EntityFox {
itemstack.subtract(1);
}
- SQLiteHelper sqLiteHelper = SQLiteHelper.getInstance(TamableFoxes.getPlugin());
+ SQLiteHelper sqLiteHelper = SQLiteHelper.getInstance(Utils.tamableFoxesPlugin);
int maxTameCount = Config.getMaxPlayerFoxTames();
if ( !((Player) entityhuman.getBukkitEntity()).hasPermission("tamablefoxes.tame.unlimited") && maxTameCount > 0 && sqLiteHelper.getPlayerFoxAmount(entityhuman.getUniqueID()) >= maxTameCount) {
((Player) entityhuman.getBukkitEntity()).sendMessage(Utils.getPrefix() + ChatColor.RED + LanguageConfig.getFoxDoesntTrust());
@@ -366,7 +365,7 @@ public class EntityTamableFox extends EntityFox {
return AnvilGUI.Response.close();
})
.text("Fox name") // Sets the text the GUI should start with
- .plugin(TamableFoxes.getPlugin()) // Set the plugin instance
+ .plugin(Utils.tamableFoxesPlugin) // Set the plugin instance
.open(player); // Opens the GUI for the player provided
}
} else {
@@ -501,7 +500,7 @@ public class EntityTamableFox extends EntityFox {
// Remove the amount of foxes the player has tamed if the limit is enabled.
if (Config.getMaxPlayerFoxTames() > 0) {
- SQLiteHelper sqliteHelper = SQLiteHelper.getInstance(TamableFoxes.getPlugin());
+ SQLiteHelper sqliteHelper = SQLiteHelper.getInstance(Utils.tamableFoxesPlugin);
sqliteHelper.removePlayerFoxAmount(this.getOwner().getUniqueID(), 1);
}
}
diff --git a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R3/NMSInterface_1_16_R3.java b/1_16_R3/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R3/NMSInterface_1_16_R3.java
similarity index 100%
rename from Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R3/NMSInterface_1_16_R3.java
rename to 1_16_R3/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R3/NMSInterface_1_16_R3.java
diff --git a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R3/pathfinding/FoxPathfinderGoalFollowOwner.java b/1_16_R3/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R3/pathfinding/FoxPathfinderGoalFollowOwner.java
similarity index 100%
rename from Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R3/pathfinding/FoxPathfinderGoalFollowOwner.java
rename to 1_16_R3/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R3/pathfinding/FoxPathfinderGoalFollowOwner.java
diff --git a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R3/pathfinding/FoxPathfinderGoalHurtByTarget.java b/1_16_R3/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R3/pathfinding/FoxPathfinderGoalHurtByTarget.java
similarity index 100%
rename from Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R3/pathfinding/FoxPathfinderGoalHurtByTarget.java
rename to 1_16_R3/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R3/pathfinding/FoxPathfinderGoalHurtByTarget.java
diff --git a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R3/pathfinding/FoxPathfinderGoalOwnerHurtByTarget.java b/1_16_R3/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R3/pathfinding/FoxPathfinderGoalOwnerHurtByTarget.java
similarity index 100%
rename from Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R3/pathfinding/FoxPathfinderGoalOwnerHurtByTarget.java
rename to 1_16_R3/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R3/pathfinding/FoxPathfinderGoalOwnerHurtByTarget.java
diff --git a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R3/pathfinding/FoxPathfinderGoalOwnerHurtTarget.java b/1_16_R3/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R3/pathfinding/FoxPathfinderGoalOwnerHurtTarget.java
similarity index 100%
rename from Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R3/pathfinding/FoxPathfinderGoalOwnerHurtTarget.java
rename to 1_16_R3/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R3/pathfinding/FoxPathfinderGoalOwnerHurtTarget.java
diff --git a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R3/pathfinding/FoxPathfinderGoalPanic.java b/1_16_R3/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R3/pathfinding/FoxPathfinderGoalPanic.java
similarity index 100%
rename from Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R3/pathfinding/FoxPathfinderGoalPanic.java
rename to 1_16_R3/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R3/pathfinding/FoxPathfinderGoalPanic.java
diff --git a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R3/pathfinding/FoxPathfinderGoalSit.java b/1_16_R3/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R3/pathfinding/FoxPathfinderGoalSit.java
similarity index 84%
rename from Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R3/pathfinding/FoxPathfinderGoalSit.java
rename to 1_16_R3/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R3/pathfinding/FoxPathfinderGoalSit.java
index 1a3c68e..e0e62f7 100644
--- a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R3/pathfinding/FoxPathfinderGoalSit.java
+++ b/1_16_R3/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R3/pathfinding/FoxPathfinderGoalSit.java
@@ -2,16 +2,11 @@ package net.seanomik.tamablefoxes.versions.version_1_16_R3.pathfinding;
import net.minecraft.server.v1_16_R3.EntityLiving;
import net.minecraft.server.v1_16_R3.PathfinderGoal;
-import net.minecraft.server.v1_16_R3.Vec3D;
-import net.seanomik.tamablefoxes.TamableFoxes;
+import net.seanomik.tamablefoxes.util.Utils;
import net.seanomik.tamablefoxes.versions.version_1_16_R3.EntityTamableFox;
import org.bukkit.Bukkit;
-import org.bukkit.Location;
-import org.bukkit.util.Vector;
import java.util.EnumSet;
-import java.util.LinkedList;
-import java.util.List;
public class FoxPathfinderGoalSit extends PathfinderGoal {
private final EntityTamableFox entity;
@@ -44,7 +39,7 @@ public class FoxPathfinderGoalSit extends PathfinderGoal {
this.entity.setGoalTarget(null);
// For some reason it needs to be ran later.
- Bukkit.getScheduler().runTaskLater(TamableFoxes.getPlugin(), () -> {
+ Bukkit.getScheduler().runTaskLater(Utils.tamableFoxesPlugin, () -> {
this.entity.setSitting(true);
}, 1L);
}
diff --git a/Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R3/pathfinding/FoxPathfinderGoalSleepWithOwner.java b/1_16_R3/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R3/pathfinding/FoxPathfinderGoalSleepWithOwner.java
similarity index 100%
rename from Plugin/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R3/pathfinding/FoxPathfinderGoalSleepWithOwner.java
rename to 1_16_R3/src/main/java/net/seanomik/tamablefoxes/versions/version_1_16_R3/pathfinding/FoxPathfinderGoalSleepWithOwner.java
diff --git a/Plugin/Spigot_v14_v15_v16-v165.jar b/Plugin/Spigot_v14_v15_v16-v165.jar
deleted file mode 100644
index 8d18461..0000000
Binary files a/Plugin/Spigot_v14_v15_v16-v165.jar and /dev/null differ
diff --git a/Plugin/output.jar b/Plugin/output.jar
deleted file mode 100644
index 791f72f..0000000
Binary files a/Plugin/output.jar and /dev/null differ
diff --git a/Plugin/pom.xml b/Plugin/pom.xml
index c6fdad3..e5dfba4 100644
--- a/Plugin/pom.xml
+++ b/Plugin/pom.xml
@@ -2,30 +2,27 @@
-
4.0.0
+
net.seanomik
tamablefoxes-parent
2.0.0-SNAPSHOT
- net.seanomik
tamablefoxes
- 2.0.0-SNAPSHOT
jar
Tamablefoxes
- 1.8
UTF-8
1.17
-
+
org.apache.maven.plugins
maven-shade-plugin
- 3.3.0-SNAPSHOT
package
@@ -45,7 +41,7 @@
shade
- D:\Code\java\spigotPlugins\servers\${server.version}\plugins\TamableFoxes_v${project.version}.jar
+ D:\Code\java\spigotPlugins\servers\${server.version}\plugins\TamableFoxes_v${project.parent.version}.jar
false
@@ -84,9 +80,34 @@
+
net.seanomik
- tamablefoxes-util
+ tamablefoxes_v1_14_R1
+ ${project.parent.version}
+ compile
+
+
+ net.seanomik
+ tamablefoxes_v1_15_R1
+ ${project.parent.version}
+ compile
+
+
+ net.seanomik
+ tamablefoxes_v1_16_R1
+ ${project.parent.version}
+ compile
+
+
+ net.seanomik
+ tamablefoxes_v1_16_R2
+ ${project.parent.version}
+ compile
+
+
+ net.seanomik
+ tamablefoxes_v1_16_R3
${project.parent.version}
compile
@@ -96,15 +117,14 @@
${project.parent.version}
compile
+
- local.spigot.nms
- AllSpigotNMS
- LATEST
- system
- ${project.basedir}/Spigot_v14_v15_v16-v165.jar
+ net.seanomik
+ tamablefoxes-util
+ ${project.parent.version}
+ compile
-
-
+
org.spigotmc
spigot-api
1.14-R0.1-SNAPSHOT
diff --git a/Plugin/src/main/java/net/seanomik/tamablefoxes/TamableFoxes.java b/Plugin/src/main/java/net/seanomik/tamablefoxes/TamableFoxes.java
index f302290..3e8e8af 100644
--- a/Plugin/src/main/java/net/seanomik/tamablefoxes/TamableFoxes.java
+++ b/Plugin/src/main/java/net/seanomik/tamablefoxes/TamableFoxes.java
@@ -1,6 +1,5 @@
package net.seanomik.tamablefoxes;
-import net.seanomik.tamablefoxes.versions.version_1_17_R1.NMSInterface_1_17_R1;
import net.seanomik.tamablefoxes.util.NMSInterface;
import net.seanomik.tamablefoxes.util.Utils;
import net.seanomik.tamablefoxes.util.io.Config;
@@ -10,6 +9,7 @@ import net.seanomik.tamablefoxes.versions.version_1_15_R1.NMSInterface_1_15_R1;
import net.seanomik.tamablefoxes.versions.version_1_16_R1.NMSInterface_1_16_R1;
import net.seanomik.tamablefoxes.versions.version_1_16_R2.NMSInterface_1_16_R2;
import net.seanomik.tamablefoxes.versions.version_1_16_R3.NMSInterface_1_16_R3;
+import net.seanomik.tamablefoxes.versions.version_1_17_R1.NMSInterface_1_17_R1;
import net.seanomik.tamablefoxes.util.io.LanguageConfig;
import org.bukkit.*;
import org.bukkit.event.Listener;
diff --git a/pom.xml b/pom.xml
index d97571d..73b4eb9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,13 +13,14 @@
Plugin
Utility
1_17_R1
+ 1_16_R3
+ 1_16_R2
+ 1_16_R1
+ 1_15_R1
+ 1_14_R1
- 16
- 16
-
UTF-8
@@ -30,10 +31,13 @@
org.apache.maven.plugins
maven-compiler-plugin
3.8.1
-
+
+
+ 1.8
+
+ -parameters
+
+
org.apache.maven.plugins
@@ -51,5 +55,4 @@
-
\ No newline at end of file