diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 95ce039..0f2d175 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,6 +4,10 @@
+
+
+
+
@@ -51,7 +55,7 @@
-
+
@@ -162,51 +166,51 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
-
+
+
-
-
+
+
-
+
-
+
-
+
diff --git a/pom.xml b/pom.xml
index 6c98bf2..94a32af 100644
--- a/pom.xml
+++ b/pom.xml
@@ -40,7 +40,7 @@
- C:\code\java\_TEST_SERVER_1.15.2_\plugins\TamableFoxes-MC-v1.15.X-v${project.version}.jar
+ D:\Code\java\spigotPlugins\_TEST_SERVER_1.15.2_\plugins\TamableFoxes-MC-v1.15.X-v${project.version}.jar
false
@@ -71,19 +71,19 @@
-
-
+
+
com.github.WesJD.AnvilGUI
anvilgui
diff --git a/src/main/java/net/seanomik/tamablefoxes/EntityTamableFox.java b/src/main/java/net/seanomik/tamablefoxes/EntityTamableFox.java
index 2e3dc68..e5eab54 100644
--- a/src/main/java/net/seanomik/tamablefoxes/EntityTamableFox.java
+++ b/src/main/java/net/seanomik/tamablefoxes/EntityTamableFox.java
@@ -266,6 +266,29 @@ public class EntityTamableFox extends EntityFox {
}
}
+ public void save() {
+ NamespacedKey rootKey = new NamespacedKey(TamableFoxes.getPlugin(), "tamableFoxes");
+ CraftPersistentDataContainer persistentDataContainer = getBukkitEntity().getPersistentDataContainer();
+ PersistentDataContainer tamableFoxesData;
+ if (persistentDataContainer.has(rootKey, PersistentDataType.TAG_CONTAINER)) {
+ tamableFoxesData = persistentDataContainer.get(rootKey, PersistentDataType.TAG_CONTAINER);
+ } else {
+ tamableFoxesData = persistentDataContainer.getAdapterContext().newPersistentDataContainer();
+ }
+
+ NamespacedKey ownerKey = new NamespacedKey(TamableFoxes.getPlugin(), "owner");
+ NamespacedKey chosenNameKey = new NamespacedKey(TamableFoxes.getPlugin(), "chosenName");
+ NamespacedKey sittingKey = new NamespacedKey(TamableFoxes.getPlugin(), "sitting");
+ NamespacedKey sleepingKey = new NamespacedKey(TamableFoxes.getPlugin(), "sleeping");
+ tamableFoxesData.set(ownerKey, PersistentDataType.STRING, getOwner() == null ? "none" : getOwner().getUniqueID().toString());
+ if (getChosenName() != null && !getChosenName().isEmpty()) {
+ tamableFoxesData.set(chosenNameKey, PersistentDataType.STRING, getChosenName());
+ }
+ tamableFoxesData.set(sittingKey, PersistentDataType.BYTE, (byte) (isSitting() ? 1 : 0));
+ tamableFoxesData.set(sleepingKey, PersistentDataType.BYTE, (byte) (isSleeping() ? 1 : 0));
+
+ persistentDataContainer.set(rootKey, PersistentDataType.TAG_CONTAINER, tamableFoxesData);
+ }
// Used for all the nasty stuff below.
private static boolean isLevelAtLeast(NBTTagCompound tag, int level) {
@@ -468,26 +491,4 @@ public class EntityTamableFox extends EntityFox {
return groupdataentity;
}
-
- public void save() {
- NamespacedKey rootKey = new NamespacedKey(TamableFoxes.getPlugin(), "tamableFoxes");
- CraftPersistentDataContainer persistentDataContainer = getBukkitEntity().getPersistentDataContainer();
- PersistentDataContainer tamableFoxesData;
- if (persistentDataContainer.has(rootKey, PersistentDataType.TAG_CONTAINER)) {
- tamableFoxesData = persistentDataContainer.get(rootKey, PersistentDataType.TAG_CONTAINER);
- } else {
- tamableFoxesData = persistentDataContainer.getAdapterContext().newPersistentDataContainer();
- }
-
- NamespacedKey ownerKey = new NamespacedKey(TamableFoxes.getPlugin(), "owner");
- NamespacedKey chosenNameKey = new NamespacedKey(TamableFoxes.getPlugin(), "chosenName");
- NamespacedKey sittingKey = new NamespacedKey(TamableFoxes.getPlugin(), "sitting");
- NamespacedKey sleepingKey = new NamespacedKey(TamableFoxes.getPlugin(), "sleeping");
- tamableFoxesData.set(ownerKey, PersistentDataType.STRING, getOwner() == null ? "none" : getOwner().getUniqueID().toString());
- tamableFoxesData.set(chosenNameKey, PersistentDataType.STRING, getChosenName());
- tamableFoxesData.set(sittingKey, PersistentDataType.BYTE, (byte) (isSitting() ? 1 : 0));
- tamableFoxesData.set(sleepingKey, PersistentDataType.BYTE, (byte) (isSleeping() ? 1 : 0));
-
- persistentDataContainer.set(rootKey, PersistentDataType.TAG_CONTAINER, tamableFoxesData);
- }
}
diff --git a/src/main/java/net/seanomik/tamablefoxes/Utils.java b/src/main/java/net/seanomik/tamablefoxes/Utils.java
index 4873f01..019db07 100644
--- a/src/main/java/net/seanomik/tamablefoxes/Utils.java
+++ b/src/main/java/net/seanomik/tamablefoxes/Utils.java
@@ -92,28 +92,6 @@ public class Utils {
}
}
- public static Entity getEntity(UUID uuid) {
- for (World world : Bukkit.getServer().getWorlds()) {
- for (Entity entity : world.getEntities()) {
- if (entity.getUniqueId().equals(uuid)) {
- return entity;
- }
- }
- }
-
- return null;
- }
-
- public static Entity getEntity(Chunk chunk, UUID uuid) {
- for (Entity entity : chunk.getEntities()) {
- if (entity.getUniqueId().equals(uuid)) {
- return entity;
- }
- }
-
- return null;
- }
-
public static List loadFoxesInChunk(Chunk chunk) {
return Arrays.stream(chunk.getEntities()).filter(Utils::isTamableFox)
.map(entity -> (EntityTamableFox) ((CraftEntity) entity).getHandle())
diff --git a/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
index 9064534..b641638 100644
--- a/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
+++ b/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
@@ -1,16 +1,14 @@
net\seanomik\tamablefoxes\EntityTamableFox.class
net\seanomik\tamablefoxes\versions\version_1_15\pathfinding\FoxPathfinderGoalMeleeAttack.class
-net\seanomik\tamablefoxes\versions\version_1_15\pathfinding\FoxPathfinderGoalOwnerHurtTarget.class
-net\seanomik\tamablefoxes\io\LanguageConfig.class
net\seanomik\tamablefoxes\versions\version_1_15\pathfinding\FoxPathfinderGoalPanic.class
net\seanomik\tamablefoxes\versions\version_1_15\pathfinding\FoxPathfinderGoalHurtByTarget.class
-net\seanomik\tamablefoxes\sqlite\SQLiteHandler.class
net\seanomik\tamablefoxes\versions\version_1_15\pathfinding\FoxPathfinderGoalFollowOwner.class
net\seanomik\tamablefoxes\TamableFoxes.class
net\seanomik\tamablefoxes\EntityTamableFox$UpdateFoxRunnable.class
net\seanomik\tamablefoxes\versions\version_1_15\pathfinding\FoxPathfinderGoalSit.class
net\seanomik\tamablefoxes\versions\version_1_15\command\CommandSpawnTamableFox.class
net\seanomik\tamablefoxes\versions\version_1_15\pathfinding\FoxPathfinderGoalOwnerHurtByTarget.class
-net\seanomik\tamablefoxes\versions\version_1_15\sqlite\SQLiteSetterGetter.class
+net\seanomik\tamablefoxes\versions\version_1_15\pathfinding\FoxPathfinderGoalOwnerHurtTarget.class
+net\seanomik\tamablefoxes\io\LanguageConfig.class
net\seanomik\tamablefoxes\Utils.class
net\seanomik\tamablefoxes\io\Config.class
diff --git a/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
index f7ebfda..df075aa 100644
--- a/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
+++ b/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
@@ -1,15 +1,13 @@
-C:\code\java\TamableFoxes\src\main\java\net\seanomik\tamablefoxes\sqlite\SQLiteHandler.java
-C:\code\java\TamableFoxes\src\main\java\net\seanomik\tamablefoxes\Utils.java
-C:\code\java\TamableFoxes\src\main\java\net\seanomik\tamablefoxes\versions\version_1_15\pathfinding\FoxPathfinderGoalPanic.java
-C:\code\java\TamableFoxes\src\main\java\net\seanomik\tamablefoxes\EntityTamableFox.java
-C:\code\java\TamableFoxes\src\main\java\net\seanomik\tamablefoxes\versions\version_1_15\sqlite\SQLiteSetterGetter.java
-C:\code\java\TamableFoxes\src\main\java\net\seanomik\tamablefoxes\versions\version_1_15\pathfinding\FoxPathfinderGoalSit.java
-C:\code\java\TamableFoxes\src\main\java\net\seanomik\tamablefoxes\versions\version_1_15\command\CommandSpawnTamableFox.java
-C:\code\java\TamableFoxes\src\main\java\net\seanomik\tamablefoxes\versions\version_1_15\pathfinding\FoxPathfinderGoalOwnerHurtTarget.java
-C:\code\java\TamableFoxes\src\main\java\net\seanomik\tamablefoxes\versions\version_1_15\pathfinding\FoxPathfinderGoalFollowOwner.java
-C:\code\java\TamableFoxes\src\main\java\net\seanomik\tamablefoxes\TamableFoxes.java
-C:\code\java\TamableFoxes\src\main\java\net\seanomik\tamablefoxes\versions\version_1_15\pathfinding\FoxPathfinderGoalHurtByTarget.java
-C:\code\java\TamableFoxes\src\main\java\net\seanomik\tamablefoxes\io\LanguageConfig.java
-C:\code\java\TamableFoxes\src\main\java\net\seanomik\tamablefoxes\versions\version_1_15\pathfinding\FoxPathfinderGoalMeleeAttack.java
-C:\code\java\TamableFoxes\src\main\java\net\seanomik\tamablefoxes\versions\version_1_15\pathfinding\FoxPathfinderGoalOwnerHurtByTarget.java
-C:\code\java\TamableFoxes\src\main\java\net\seanomik\tamablefoxes\io\Config.java
+D:\Code\java\spigotPlugins\myPlugins\TamableFoxes\src\main\java\net\seanomik\tamablefoxes\versions\version_1_15\pathfinding\FoxPathfinderGoalHurtByTarget.java
+D:\Code\java\spigotPlugins\myPlugins\TamableFoxes\src\main\java\net\seanomik\tamablefoxes\versions\version_1_15\pathfinding\FoxPathfinderGoalPanic.java
+D:\Code\java\spigotPlugins\myPlugins\TamableFoxes\src\main\java\net\seanomik\tamablefoxes\versions\version_1_15\pathfinding\FoxPathfinderGoalOwnerHurtByTarget.java
+D:\Code\java\spigotPlugins\myPlugins\TamableFoxes\src\main\java\net\seanomik\tamablefoxes\versions\version_1_15\command\CommandSpawnTamableFox.java
+D:\Code\java\spigotPlugins\myPlugins\TamableFoxes\src\main\java\net\seanomik\tamablefoxes\versions\version_1_15\pathfinding\FoxPathfinderGoalSit.java
+D:\Code\java\spigotPlugins\myPlugins\TamableFoxes\src\main\java\net\seanomik\tamablefoxes\Utils.java
+D:\Code\java\spigotPlugins\myPlugins\TamableFoxes\src\main\java\net\seanomik\tamablefoxes\versions\version_1_15\pathfinding\FoxPathfinderGoalFollowOwner.java
+D:\Code\java\spigotPlugins\myPlugins\TamableFoxes\src\main\java\net\seanomik\tamablefoxes\TamableFoxes.java
+D:\Code\java\spigotPlugins\myPlugins\TamableFoxes\src\main\java\net\seanomik\tamablefoxes\io\Config.java
+D:\Code\java\spigotPlugins\myPlugins\TamableFoxes\src\main\java\net\seanomik\tamablefoxes\versions\version_1_15\pathfinding\FoxPathfinderGoalOwnerHurtTarget.java
+D:\Code\java\spigotPlugins\myPlugins\TamableFoxes\src\main\java\net\seanomik\tamablefoxes\versions\version_1_15\pathfinding\FoxPathfinderGoalMeleeAttack.java
+D:\Code\java\spigotPlugins\myPlugins\TamableFoxes\src\main\java\net\seanomik\tamablefoxes\EntityTamableFox.java
+D:\Code\java\spigotPlugins\myPlugins\TamableFoxes\src\main\java\net\seanomik\tamablefoxes\io\LanguageConfig.java