Fix #78
This commit is contained in:
parent
529a5463ba
commit
a705cdfaf4
|
@ -518,17 +518,17 @@ public class EntityTamableFox extends EntityFox {
|
||||||
return super.r(entity);
|
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) {
|
public void die(DamageSource damageSource) {
|
||||||
if (!this.world.isClientSide && this.world.getGameRules().getBoolean(GameRules.SHOW_DEATH_MESSAGES) && this.getOwner() instanceof EntityPlayer) {
|
if (!this.world.isClientSide && this.world.getGameRules().getBoolean(GameRules.SHOW_DEATH_MESSAGES) && this.getOwner() instanceof EntityPlayer) {
|
||||||
this.getOwner().sendMessage(this.getCombatTracker().getDeathMessage());
|
this.getOwner().sendMessage(this.getCombatTracker().getDeathMessage());
|
||||||
|
}
|
||||||
|
|
||||||
// Remove the amount of foxes the player has tamed if the limit is enabled.
|
// Remove the amount of foxes the player has tamed if the limit is enabled.
|
||||||
if (Config.getMaxPlayerFoxTames() > 0) {
|
if (Config.getMaxPlayerFoxTames() > 0) {
|
||||||
SQLiteHelper sqliteHelper = SQLiteHelper.getInstance(Utils.tamableFoxesPlugin);
|
SQLiteHelper sqliteHelper = SQLiteHelper.getInstance(Utils.tamableFoxesPlugin);
|
||||||
sqliteHelper.removePlayerFoxAmount(this.getOwner().getUniqueID(), 1);
|
sqliteHelper.removePlayerFoxAmount(this.getOwner().getUniqueID(), 1);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
super.die(damageSource);
|
super.die(damageSource);
|
||||||
}
|
}
|
||||||
|
|
|
@ -518,17 +518,17 @@ public class EntityTamableFox extends EntityFox {
|
||||||
return super.r(entity);
|
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) {
|
public void die(DamageSource damageSource) {
|
||||||
if (!this.world.isClientSide && this.world.getGameRules().getBoolean(GameRules.SHOW_DEATH_MESSAGES) && this.getOwner() instanceof EntityPlayer) {
|
if (!this.world.isClientSide && this.world.getGameRules().getBoolean(GameRules.SHOW_DEATH_MESSAGES) && this.getOwner() instanceof EntityPlayer) {
|
||||||
this.getOwner().sendMessage(this.getCombatTracker().getDeathMessage());
|
this.getOwner().sendMessage(this.getCombatTracker().getDeathMessage());
|
||||||
|
}
|
||||||
|
|
||||||
// Remove the amount of foxes the player has tamed if the limit is enabled.
|
// Remove the amount of foxes the player has tamed if the limit is enabled.
|
||||||
if (Config.getMaxPlayerFoxTames() > 0) {
|
if (Config.getMaxPlayerFoxTames() > 0) {
|
||||||
SQLiteHelper sqliteHelper = SQLiteHelper.getInstance(Utils.tamableFoxesPlugin);
|
SQLiteHelper sqliteHelper = SQLiteHelper.getInstance(Utils.tamableFoxesPlugin);
|
||||||
sqliteHelper.removePlayerFoxAmount(this.getOwner().getUniqueID(), 1);
|
sqliteHelper.removePlayerFoxAmount(this.getOwner().getUniqueID(), 1);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
super.die(damageSource);
|
super.die(damageSource);
|
||||||
}
|
}
|
||||||
|
|
|
@ -520,17 +520,17 @@ public class EntityTamableFox extends EntityFox {
|
||||||
return super.r(entity);
|
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) {
|
public void die(DamageSource damageSource) {
|
||||||
if (!this.world.isClientSide && this.world.getGameRules().getBoolean(GameRules.SHOW_DEATH_MESSAGES) && this.getOwner() instanceof EntityPlayer) {
|
if (!this.world.isClientSide && this.world.getGameRules().getBoolean(GameRules.SHOW_DEATH_MESSAGES) && this.getOwner() instanceof EntityPlayer) {
|
||||||
this.getOwner().sendMessage(this.getCombatTracker().getDeathMessage(), getOwnerUUID());
|
this.getOwner().sendMessage(this.getCombatTracker().getDeathMessage(), getOwnerUUID());
|
||||||
|
}
|
||||||
|
|
||||||
// Remove the amount of foxes the player has tamed if the limit is enabled.
|
// Remove the amount of foxes the player has tamed if the limit is enabled.
|
||||||
if (Config.getMaxPlayerFoxTames() > 0) {
|
if (Config.getMaxPlayerFoxTames() > 0) {
|
||||||
SQLiteHelper sqliteHelper = SQLiteHelper.getInstance(Utils.tamableFoxesPlugin);
|
SQLiteHelper sqliteHelper = SQLiteHelper.getInstance(Utils.tamableFoxesPlugin);
|
||||||
sqliteHelper.removePlayerFoxAmount(this.getOwner().getUniqueID(), 1);
|
sqliteHelper.removePlayerFoxAmount(this.getOwner().getUniqueID(), 1);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
super.die(damageSource);
|
super.die(damageSource);
|
||||||
}
|
}
|
||||||
|
|
|
@ -512,17 +512,17 @@ public class EntityTamableFox extends EntityFox {
|
||||||
return super.r(entity);
|
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) {
|
public void die(DamageSource damageSource) {
|
||||||
if (!this.world.isClientSide && this.world.getGameRules().getBoolean(GameRules.SHOW_DEATH_MESSAGES) && this.getOwner() instanceof EntityPlayer) {
|
if (!this.world.isClientSide && this.world.getGameRules().getBoolean(GameRules.SHOW_DEATH_MESSAGES) && this.getOwner() instanceof EntityPlayer) {
|
||||||
this.getOwner().sendMessage(this.getCombatTracker().getDeathMessage(), getOwnerUUID());
|
this.getOwner().sendMessage(this.getCombatTracker().getDeathMessage(), getOwnerUUID());
|
||||||
|
}
|
||||||
|
|
||||||
// Remove the amount of foxes the player has tamed if the limit is enabled.
|
// Remove the amount of foxes the player has tamed if the limit is enabled.
|
||||||
if (Config.getMaxPlayerFoxTames() > 0) {
|
if (Config.getMaxPlayerFoxTames() > 0) {
|
||||||
SQLiteHelper sqliteHelper = SQLiteHelper.getInstance(Utils.tamableFoxesPlugin);
|
SQLiteHelper sqliteHelper = SQLiteHelper.getInstance(Utils.tamableFoxesPlugin);
|
||||||
sqliteHelper.removePlayerFoxAmount(this.getOwner().getUniqueID(), 1);
|
sqliteHelper.removePlayerFoxAmount(this.getOwner().getUniqueID(), 1);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
super.die(damageSource);
|
super.die(damageSource);
|
||||||
}
|
}
|
||||||
|
|
|
@ -512,17 +512,17 @@ public class EntityTamableFox extends EntityFox {
|
||||||
return super.r(entity);
|
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) {
|
public void die(DamageSource damageSource) {
|
||||||
if (!this.world.isClientSide && this.world.getGameRules().getBoolean(GameRules.SHOW_DEATH_MESSAGES) && this.getOwner() instanceof EntityPlayer) {
|
if (!this.world.isClientSide && this.world.getGameRules().getBoolean(GameRules.SHOW_DEATH_MESSAGES) && this.getOwner() instanceof EntityPlayer) {
|
||||||
this.getOwner().sendMessage(this.getCombatTracker().getDeathMessage(), getOwnerUUID());
|
this.getOwner().sendMessage(this.getCombatTracker().getDeathMessage(), getOwnerUUID());
|
||||||
|
}
|
||||||
|
|
||||||
// Remove the amount of foxes the player has tamed if the limit is enabled.
|
// Remove the amount of foxes the player has tamed if the limit is enabled.
|
||||||
if (Config.getMaxPlayerFoxTames() > 0) {
|
if (Config.getMaxPlayerFoxTames() > 0) {
|
||||||
SQLiteHelper sqliteHelper = SQLiteHelper.getInstance(Utils.tamableFoxesPlugin);
|
SQLiteHelper sqliteHelper = SQLiteHelper.getInstance(Utils.tamableFoxesPlugin);
|
||||||
sqliteHelper.removePlayerFoxAmount(this.getOwner().getUniqueID(), 1);
|
sqliteHelper.removePlayerFoxAmount(this.getOwner().getUniqueID(), 1);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
super.die(damageSource);
|
super.die(damageSource);
|
||||||
}
|
}
|
||||||
|
|
|
@ -543,18 +543,18 @@ public class EntityTamableFox extends Fox {
|
||||||
return super.isAlliedTo(entity);
|
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
|
@Override
|
||||||
public void die(DamageSource damageSource) {
|
public void die(DamageSource damageSource) {
|
||||||
if (!this.getCommandSenderWorld().isClientSide && this.getCommandSenderWorld().getGameRules().getBoolean(GameRules.RULE_SHOWDEATHMESSAGES) && this.getOwner() instanceof ServerPlayer) {
|
if (!this.getCommandSenderWorld().isClientSide && this.getCommandSenderWorld().getGameRules().getBoolean(GameRules.RULE_SHOWDEATHMESSAGES) && this.getOwner() instanceof ServerPlayer) {
|
||||||
this.getOwner().sendMessage(this.getCombatTracker().getDeathMessage(), getOwnerUUID());
|
this.getOwner().sendMessage(this.getCombatTracker().getDeathMessage(), getOwnerUUID());
|
||||||
|
}
|
||||||
|
|
||||||
// Remove the amount of foxes the player has tamed if the limit is enabled.
|
// Remove the amount of foxes the player has tamed if the limit is enabled.
|
||||||
if (Config.getMaxPlayerFoxTames() > 0) {
|
if (Config.getMaxPlayerFoxTames() > 0) {
|
||||||
SQLiteHelper sqliteHelper = SQLiteHelper.getInstance(Utils.tamableFoxesPlugin);
|
SQLiteHelper sqliteHelper = SQLiteHelper.getInstance(Utils.tamableFoxesPlugin);
|
||||||
sqliteHelper.removePlayerFoxAmount(this.getOwner().getUUID(), 1);
|
sqliteHelper.removePlayerFoxAmount(this.getOwner().getUUID(), 1);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
super.die(damageSource);
|
super.die(damageSource);
|
||||||
}
|
}
|
||||||
|
|
|
@ -540,18 +540,18 @@ public class EntityTamableFox extends Fox {
|
||||||
return super.isAlliedTo(entity);
|
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
|
@Override
|
||||||
public void die(DamageSource damageSource) {
|
public void die(DamageSource damageSource) {
|
||||||
if (!this.getCommandSenderWorld().isClientSide && this.getCommandSenderWorld().getGameRules().getBoolean(GameRules.RULE_SHOWDEATHMESSAGES) && this.getOwner() instanceof ServerPlayer) {
|
if (!this.getCommandSenderWorld().isClientSide && this.getCommandSenderWorld().getGameRules().getBoolean(GameRules.RULE_SHOWDEATHMESSAGES) && this.getOwner() instanceof ServerPlayer) {
|
||||||
this.getOwner().sendMessage(this.getCombatTracker().getDeathMessage(), getOwnerUUID());
|
this.getOwner().sendMessage(this.getCombatTracker().getDeathMessage(), getOwnerUUID());
|
||||||
|
}
|
||||||
|
|
||||||
// Remove the amount of foxes the player has tamed if the limit is enabled.
|
// Remove the amount of foxes the player has tamed if the limit is enabled.
|
||||||
if (Config.getMaxPlayerFoxTames() > 0) {
|
if (Config.getMaxPlayerFoxTames() > 0) {
|
||||||
SQLiteHelper sqliteHelper = SQLiteHelper.getInstance(Utils.tamableFoxesPlugin);
|
SQLiteHelper sqliteHelper = SQLiteHelper.getInstance(Utils.tamableFoxesPlugin);
|
||||||
sqliteHelper.removePlayerFoxAmount(this.getOwner().getUUID(), 1);
|
sqliteHelper.removePlayerFoxAmount(this.getOwner().getUUID(), 1);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
super.die(damageSource);
|
super.die(damageSource);
|
||||||
}
|
}
|
||||||
|
|
|
@ -562,18 +562,18 @@ public class EntityTamableFox extends Fox {
|
||||||
return super.isAlliedTo(entity);
|
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
|
@Override
|
||||||
public void die(DamageSource damageSource) {
|
public void die(DamageSource damageSource) {
|
||||||
if (!this.getCommandSenderWorld().isClientSide && this.getCommandSenderWorld().getGameRules().getBoolean(GameRules.RULE_SHOWDEATHMESSAGES) && this.getOwner() instanceof ServerPlayer) {
|
if (!this.getCommandSenderWorld().isClientSide && this.getCommandSenderWorld().getGameRules().getBoolean(GameRules.RULE_SHOWDEATHMESSAGES) && this.getOwner() instanceof ServerPlayer) {
|
||||||
this.getOwner().sendMessage(this.getCombatTracker().getDeathMessage(), getOwnerUUID());
|
this.getOwner().sendMessage(this.getCombatTracker().getDeathMessage(), getOwnerUUID());
|
||||||
|
}
|
||||||
|
|
||||||
// Remove the amount of foxes the player has tamed if the limit is enabled.
|
// Remove the amount of foxes the player has tamed if the limit is enabled.
|
||||||
if (Config.getMaxPlayerFoxTames() > 0) {
|
if (Config.getMaxPlayerFoxTames() > 0) {
|
||||||
SQLiteHelper sqliteHelper = SQLiteHelper.getInstance(Utils.tamableFoxesPlugin);
|
SQLiteHelper sqliteHelper = SQLiteHelper.getInstance(Utils.tamableFoxesPlugin);
|
||||||
sqliteHelper.removePlayerFoxAmount(this.getOwner().getUUID(), 1);
|
sqliteHelper.removePlayerFoxAmount(this.getOwner().getUUID(), 1);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
super.die(damageSource);
|
super.die(damageSource);
|
||||||
}
|
}
|
||||||
|
|
|
@ -562,18 +562,18 @@ public class EntityTamableFox extends Fox {
|
||||||
return super.isAlliedTo(entity);
|
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
|
@Override
|
||||||
public void die(DamageSource damageSource) {
|
public void die(DamageSource damageSource) {
|
||||||
if (!this.getCommandSenderWorld().isClientSide && this.getCommandSenderWorld().getGameRules().getBoolean(GameRules.RULE_SHOWDEATHMESSAGES) && this.getOwner() instanceof ServerPlayer) {
|
if (!this.getCommandSenderWorld().isClientSide && this.getCommandSenderWorld().getGameRules().getBoolean(GameRules.RULE_SHOWDEATHMESSAGES) && this.getOwner() instanceof ServerPlayer) {
|
||||||
this.getOwner().sendMessage(this.getCombatTracker().getDeathMessage(), getOwnerUUID());
|
this.getOwner().sendMessage(this.getCombatTracker().getDeathMessage(), getOwnerUUID());
|
||||||
|
}
|
||||||
|
|
||||||
// Remove the amount of foxes the player has tamed if the limit is enabled.
|
// Remove the amount of foxes the player has tamed if the limit is enabled.
|
||||||
if (Config.getMaxPlayerFoxTames() > 0) {
|
if (Config.getMaxPlayerFoxTames() > 0) {
|
||||||
SQLiteHelper sqliteHelper = SQLiteHelper.getInstance(Utils.tamableFoxesPlugin);
|
SQLiteHelper sqliteHelper = SQLiteHelper.getInstance(Utils.tamableFoxesPlugin);
|
||||||
sqliteHelper.removePlayerFoxAmount(this.getOwner().getUUID(), 1);
|
sqliteHelper.removePlayerFoxAmount(this.getOwner().getUUID(), 1);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
super.die(damageSource);
|
super.die(damageSource);
|
||||||
}
|
}
|
||||||
|
|
|
@ -560,18 +560,18 @@ public class EntityTamableFox extends Fox {
|
||||||
return super.isAlliedTo(entity);
|
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
|
@Override
|
||||||
public void die(DamageSource damageSource) {
|
public void die(DamageSource damageSource) {
|
||||||
if (!this.getCommandSenderWorld().isClientSide && this.getCommandSenderWorld().getGameRules().getBoolean(GameRules.RULE_SHOWDEATHMESSAGES) && this.getOwner() instanceof ServerPlayer) {
|
if (!this.getCommandSenderWorld().isClientSide && this.getCommandSenderWorld().getGameRules().getBoolean(GameRules.RULE_SHOWDEATHMESSAGES) && this.getOwner() instanceof ServerPlayer) {
|
||||||
this.getOwner().sendMessage(this.getCombatTracker().getDeathMessage(), getOwnerUUID());
|
this.getOwner().sendMessage(this.getCombatTracker().getDeathMessage(), getOwnerUUID());
|
||||||
|
}
|
||||||
|
|
||||||
// Remove the amount of foxes the player has tamed if the limit is enabled.
|
// Remove the amount of foxes the player has tamed if the limit is enabled.
|
||||||
if (Config.getMaxPlayerFoxTames() > 0) {
|
if (Config.getMaxPlayerFoxTames() > 0) {
|
||||||
SQLiteHelper sqliteHelper = SQLiteHelper.getInstance(Utils.tamableFoxesPlugin);
|
SQLiteHelper sqliteHelper = SQLiteHelper.getInstance(Utils.tamableFoxesPlugin);
|
||||||
sqliteHelper.removePlayerFoxAmount(this.getOwner().getUUID(), 1);
|
sqliteHelper.removePlayerFoxAmount(this.getOwner().getUUID(), 1);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
super.die(damageSource);
|
super.die(damageSource);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue