From a705cdfaf4fb38941b516e0e94774e8bd4d8cefd Mon Sep 17 00:00:00 2001 From: SeanOMik Date: Sun, 8 May 2022 15:39:06 -0400 Subject: [PATCH] Fix #78 --- .../versions/version_1_14_R1/EntityTamableFox.java | 12 ++++++------ .../versions/version_1_15_R1/EntityTamableFox.java | 12 ++++++------ .../versions/version_1_16_R1/EntityTamableFox.java | 12 ++++++------ .../versions/version_1_16_R2/EntityTamableFox.java | 12 ++++++------ .../versions/version_1_16_R3/EntityTamableFox.java | 12 ++++++------ .../versions/version_1_17_1_R1/EntityTamableFox.java | 12 ++++++------ .../versions/version_1_17_R1/EntityTamableFox.java | 12 ++++++------ .../versions/version_1_18_1_R1/EntityTamableFox.java | 12 ++++++------ .../versions/version_1_18_R1/EntityTamableFox.java | 12 ++++++------ .../versions/version_1_18_R2/EntityTamableFox.java | 12 ++++++------ 10 files changed, 60 insertions(+), 60 deletions(-) diff --git a/1_14_R1/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 index 727f30a..90b4578 100644 --- a/1_14_R1/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 @@ -518,16 +518,16 @@ public class EntityTamableFox extends EntityFox { return super.r(entity); } - // When the fox dies, show a chat message. + // When the fox dies, show a chat message, and remove the player's stored tamed foxed. public void die(DamageSource damageSource) { if (!this.world.isClientSide && this.world.getGameRules().getBoolean(GameRules.SHOW_DEATH_MESSAGES) && this.getOwner() instanceof EntityPlayer) { this.getOwner().sendMessage(this.getCombatTracker().getDeathMessage()); + } - // Remove the amount of foxes the player has tamed if the limit is enabled. - if (Config.getMaxPlayerFoxTames() > 0) { - SQLiteHelper sqliteHelper = SQLiteHelper.getInstance(Utils.tamableFoxesPlugin); - sqliteHelper.removePlayerFoxAmount(this.getOwner().getUniqueID(), 1); - } + // Remove the amount of foxes the player has tamed if the limit is enabled. + if (Config.getMaxPlayerFoxTames() > 0) { + SQLiteHelper sqliteHelper = SQLiteHelper.getInstance(Utils.tamableFoxesPlugin); + sqliteHelper.removePlayerFoxAmount(this.getOwner().getUniqueID(), 1); } super.die(damageSource); diff --git a/1_15_R1/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 index aad3b2d..299995c 100644 --- a/1_15_R1/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 @@ -518,16 +518,16 @@ public class EntityTamableFox extends EntityFox { return super.r(entity); } - // When the fox dies, show a chat message. + // When the fox dies, show a chat message, and remove the player's stored tamed foxed. public void die(DamageSource damageSource) { if (!this.world.isClientSide && this.world.getGameRules().getBoolean(GameRules.SHOW_DEATH_MESSAGES) && this.getOwner() instanceof EntityPlayer) { this.getOwner().sendMessage(this.getCombatTracker().getDeathMessage()); + } - // Remove the amount of foxes the player has tamed if the limit is enabled. - if (Config.getMaxPlayerFoxTames() > 0) { - SQLiteHelper sqliteHelper = SQLiteHelper.getInstance(Utils.tamableFoxesPlugin); - sqliteHelper.removePlayerFoxAmount(this.getOwner().getUniqueID(), 1); - } + // Remove the amount of foxes the player has tamed if the limit is enabled. + if (Config.getMaxPlayerFoxTames() > 0) { + SQLiteHelper sqliteHelper = SQLiteHelper.getInstance(Utils.tamableFoxesPlugin); + sqliteHelper.removePlayerFoxAmount(this.getOwner().getUniqueID(), 1); } super.die(damageSource); diff --git a/1_16_R1/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 index 6edeb9d..341e75b 100644 --- a/1_16_R1/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 @@ -520,16 +520,16 @@ public class EntityTamableFox extends EntityFox { return super.r(entity); } - // When the fox dies, show a chat message. + // When the fox dies, show a chat message, and remove the player's stored tamed foxed. public void die(DamageSource damageSource) { if (!this.world.isClientSide && this.world.getGameRules().getBoolean(GameRules.SHOW_DEATH_MESSAGES) && this.getOwner() instanceof EntityPlayer) { this.getOwner().sendMessage(this.getCombatTracker().getDeathMessage(), getOwnerUUID()); + } - // Remove the amount of foxes the player has tamed if the limit is enabled. - if (Config.getMaxPlayerFoxTames() > 0) { - SQLiteHelper sqliteHelper = SQLiteHelper.getInstance(Utils.tamableFoxesPlugin); - sqliteHelper.removePlayerFoxAmount(this.getOwner().getUniqueID(), 1); - } + // Remove the amount of foxes the player has tamed if the limit is enabled. + if (Config.getMaxPlayerFoxTames() > 0) { + SQLiteHelper sqliteHelper = SQLiteHelper.getInstance(Utils.tamableFoxesPlugin); + sqliteHelper.removePlayerFoxAmount(this.getOwner().getUniqueID(), 1); } super.die(damageSource); diff --git a/1_16_R2/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 index 52ca290..2ed04b5 100644 --- a/1_16_R2/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 @@ -512,16 +512,16 @@ public class EntityTamableFox extends EntityFox { return super.r(entity); } - // When the fox dies, show a chat message. + // When the fox dies, show a chat message, and remove the player's stored tamed foxed. public void die(DamageSource damageSource) { if (!this.world.isClientSide && this.world.getGameRules().getBoolean(GameRules.SHOW_DEATH_MESSAGES) && this.getOwner() instanceof EntityPlayer) { this.getOwner().sendMessage(this.getCombatTracker().getDeathMessage(), getOwnerUUID()); + } - // Remove the amount of foxes the player has tamed if the limit is enabled. - if (Config.getMaxPlayerFoxTames() > 0) { - SQLiteHelper sqliteHelper = SQLiteHelper.getInstance(Utils.tamableFoxesPlugin); - sqliteHelper.removePlayerFoxAmount(this.getOwner().getUniqueID(), 1); - } + // Remove the amount of foxes the player has tamed if the limit is enabled. + if (Config.getMaxPlayerFoxTames() > 0) { + SQLiteHelper sqliteHelper = SQLiteHelper.getInstance(Utils.tamableFoxesPlugin); + sqliteHelper.removePlayerFoxAmount(this.getOwner().getUniqueID(), 1); } super.die(damageSource); diff --git a/1_16_R3/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 index 75d5d24..fc02c0d 100644 --- a/1_16_R3/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 @@ -512,16 +512,16 @@ public class EntityTamableFox extends EntityFox { return super.r(entity); } - // When the fox dies, show a chat message. + // When the fox dies, show a chat message, and remove the player's stored tamed foxed. public void die(DamageSource damageSource) { if (!this.world.isClientSide && this.world.getGameRules().getBoolean(GameRules.SHOW_DEATH_MESSAGES) && this.getOwner() instanceof EntityPlayer) { this.getOwner().sendMessage(this.getCombatTracker().getDeathMessage(), getOwnerUUID()); + } - // Remove the amount of foxes the player has tamed if the limit is enabled. - if (Config.getMaxPlayerFoxTames() > 0) { - SQLiteHelper sqliteHelper = SQLiteHelper.getInstance(Utils.tamableFoxesPlugin); - sqliteHelper.removePlayerFoxAmount(this.getOwner().getUniqueID(), 1); - } + // Remove the amount of foxes the player has tamed if the limit is enabled. + if (Config.getMaxPlayerFoxTames() > 0) { + SQLiteHelper sqliteHelper = SQLiteHelper.getInstance(Utils.tamableFoxesPlugin); + sqliteHelper.removePlayerFoxAmount(this.getOwner().getUniqueID(), 1); } super.die(damageSource); diff --git a/1_17_1_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_17_1_R1/EntityTamableFox.java b/1_17_1_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_17_1_R1/EntityTamableFox.java index 250cf66..0748488 100644 --- a/1_17_1_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_17_1_R1/EntityTamableFox.java +++ b/1_17_1_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_17_1_R1/EntityTamableFox.java @@ -543,17 +543,17 @@ public class EntityTamableFox extends Fox { return super.isAlliedTo(entity); } - // When the fox dies, show a chat message. + // When the fox dies, show a chat message, and remove the player's stored tamed foxed. @Override public void die(DamageSource damageSource) { if (!this.getCommandSenderWorld().isClientSide && this.getCommandSenderWorld().getGameRules().getBoolean(GameRules.RULE_SHOWDEATHMESSAGES) && this.getOwner() instanceof ServerPlayer) { this.getOwner().sendMessage(this.getCombatTracker().getDeathMessage(), getOwnerUUID()); + } - // Remove the amount of foxes the player has tamed if the limit is enabled. - if (Config.getMaxPlayerFoxTames() > 0) { - SQLiteHelper sqliteHelper = SQLiteHelper.getInstance(Utils.tamableFoxesPlugin); - sqliteHelper.removePlayerFoxAmount(this.getOwner().getUUID(), 1); - } + // Remove the amount of foxes the player has tamed if the limit is enabled. + if (Config.getMaxPlayerFoxTames() > 0) { + SQLiteHelper sqliteHelper = SQLiteHelper.getInstance(Utils.tamableFoxesPlugin); + sqliteHelper.removePlayerFoxAmount(this.getOwner().getUUID(), 1); } super.die(damageSource); diff --git a/1_17_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_17_R1/EntityTamableFox.java b/1_17_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_17_R1/EntityTamableFox.java index d8013f8..180a9b4 100644 --- a/1_17_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_17_R1/EntityTamableFox.java +++ b/1_17_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_17_R1/EntityTamableFox.java @@ -540,17 +540,17 @@ public class EntityTamableFox extends Fox { return super.isAlliedTo(entity); } - // When the fox dies, show a chat message. + // When the fox dies, show a chat message, and remove the player's stored tamed foxed. @Override public void die(DamageSource damageSource) { if (!this.getCommandSenderWorld().isClientSide && this.getCommandSenderWorld().getGameRules().getBoolean(GameRules.RULE_SHOWDEATHMESSAGES) && this.getOwner() instanceof ServerPlayer) { this.getOwner().sendMessage(this.getCombatTracker().getDeathMessage(), getOwnerUUID()); + } - // Remove the amount of foxes the player has tamed if the limit is enabled. - if (Config.getMaxPlayerFoxTames() > 0) { - SQLiteHelper sqliteHelper = SQLiteHelper.getInstance(Utils.tamableFoxesPlugin); - sqliteHelper.removePlayerFoxAmount(this.getOwner().getUUID(), 1); - } + // Remove the amount of foxes the player has tamed if the limit is enabled. + if (Config.getMaxPlayerFoxTames() > 0) { + SQLiteHelper sqliteHelper = SQLiteHelper.getInstance(Utils.tamableFoxesPlugin); + sqliteHelper.removePlayerFoxAmount(this.getOwner().getUUID(), 1); } super.die(damageSource); diff --git a/1_18_1_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_18_1_R1/EntityTamableFox.java b/1_18_1_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_18_1_R1/EntityTamableFox.java index 51cf1ef..087e91a 100644 --- a/1_18_1_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_18_1_R1/EntityTamableFox.java +++ b/1_18_1_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_18_1_R1/EntityTamableFox.java @@ -562,17 +562,17 @@ public class EntityTamableFox extends Fox { return super.isAlliedTo(entity); } - // When the fox dies, show a chat message. + // When the fox dies, show a chat message, and remove the player's stored tamed foxed. @Override public void die(DamageSource damageSource) { if (!this.getCommandSenderWorld().isClientSide && this.getCommandSenderWorld().getGameRules().getBoolean(GameRules.RULE_SHOWDEATHMESSAGES) && this.getOwner() instanceof ServerPlayer) { this.getOwner().sendMessage(this.getCombatTracker().getDeathMessage(), getOwnerUUID()); + } - // Remove the amount of foxes the player has tamed if the limit is enabled. - if (Config.getMaxPlayerFoxTames() > 0) { - SQLiteHelper sqliteHelper = SQLiteHelper.getInstance(Utils.tamableFoxesPlugin); - sqliteHelper.removePlayerFoxAmount(this.getOwner().getUUID(), 1); - } + // Remove the amount of foxes the player has tamed if the limit is enabled. + if (Config.getMaxPlayerFoxTames() > 0) { + SQLiteHelper sqliteHelper = SQLiteHelper.getInstance(Utils.tamableFoxesPlugin); + sqliteHelper.removePlayerFoxAmount(this.getOwner().getUUID(), 1); } super.die(damageSource); diff --git a/1_18_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_18_R1/EntityTamableFox.java b/1_18_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_18_R1/EntityTamableFox.java index 2c67ecd..b0d262d 100644 --- a/1_18_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_18_R1/EntityTamableFox.java +++ b/1_18_R1/src/main/java/net/seanomik/tamablefoxes/versions/version_1_18_R1/EntityTamableFox.java @@ -562,17 +562,17 @@ public class EntityTamableFox extends Fox { return super.isAlliedTo(entity); } - // When the fox dies, show a chat message. + // When the fox dies, show a chat message, and remove the player's stored tamed foxed. @Override public void die(DamageSource damageSource) { if (!this.getCommandSenderWorld().isClientSide && this.getCommandSenderWorld().getGameRules().getBoolean(GameRules.RULE_SHOWDEATHMESSAGES) && this.getOwner() instanceof ServerPlayer) { this.getOwner().sendMessage(this.getCombatTracker().getDeathMessage(), getOwnerUUID()); + } - // Remove the amount of foxes the player has tamed if the limit is enabled. - if (Config.getMaxPlayerFoxTames() > 0) { - SQLiteHelper sqliteHelper = SQLiteHelper.getInstance(Utils.tamableFoxesPlugin); - sqliteHelper.removePlayerFoxAmount(this.getOwner().getUUID(), 1); - } + // Remove the amount of foxes the player has tamed if the limit is enabled. + if (Config.getMaxPlayerFoxTames() > 0) { + SQLiteHelper sqliteHelper = SQLiteHelper.getInstance(Utils.tamableFoxesPlugin); + sqliteHelper.removePlayerFoxAmount(this.getOwner().getUUID(), 1); } super.die(damageSource); diff --git a/1_18_R2/src/main/java/net/seanomik/tamablefoxes/versions/version_1_18_R2/EntityTamableFox.java b/1_18_R2/src/main/java/net/seanomik/tamablefoxes/versions/version_1_18_R2/EntityTamableFox.java index e790ef6..62d7db5 100644 --- a/1_18_R2/src/main/java/net/seanomik/tamablefoxes/versions/version_1_18_R2/EntityTamableFox.java +++ b/1_18_R2/src/main/java/net/seanomik/tamablefoxes/versions/version_1_18_R2/EntityTamableFox.java @@ -560,17 +560,17 @@ public class EntityTamableFox extends Fox { return super.isAlliedTo(entity); } - // When the fox dies, show a chat message. + // When the fox dies, show a chat message, and remove the player's stored tamed foxed. @Override public void die(DamageSource damageSource) { if (!this.getCommandSenderWorld().isClientSide && this.getCommandSenderWorld().getGameRules().getBoolean(GameRules.RULE_SHOWDEATHMESSAGES) && this.getOwner() instanceof ServerPlayer) { this.getOwner().sendMessage(this.getCombatTracker().getDeathMessage(), getOwnerUUID()); + } - // Remove the amount of foxes the player has tamed if the limit is enabled. - if (Config.getMaxPlayerFoxTames() > 0) { - SQLiteHelper sqliteHelper = SQLiteHelper.getInstance(Utils.tamableFoxesPlugin); - sqliteHelper.removePlayerFoxAmount(this.getOwner().getUUID(), 1); - } + // Remove the amount of foxes the player has tamed if the limit is enabled. + if (Config.getMaxPlayerFoxTames() > 0) { + SQLiteHelper sqliteHelper = SQLiteHelper.getInstance(Utils.tamableFoxesPlugin); + sqliteHelper.removePlayerFoxAmount(this.getOwner().getUUID(), 1); } super.die(damageSource);