Skip to content

Commit

Permalink
Only print server-sided foreign pet messages
Browse files Browse the repository at this point in the history
  • Loading branch information
ACGaming committed Apr 19, 2024
1 parent 72d7a09 commit ba4f3e1
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,12 @@ private boolean checkOwnership(EntityPlayer player, EnumHand hand) {
}

//if the player interacting is not the owner, do nothing!
if (MoCreatures.proxy.enableOwnership && this.getOwnerId() != null
&& !player.getUniqueID().equals(this.getOwnerId())) {
ITextComponent message = new TextComponentTranslation("msg.mocreatures.foreignpet");
message.getStyle().setColor(TextFormatting.RED);
player.sendMessage(message);
if (MoCreatures.proxy.enableOwnership && this.getOwnerId() != null && !player.getUniqueID().equals(this.getOwnerId())) {
if (!this.world.isRemote) {
ITextComponent message = new TextComponentTranslation("msg.mocreatures.foreignpet");
message.getStyle().setColor(TextFormatting.RED);
player.sendMessage(message);
}
return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,11 @@ private boolean checkOwnership(EntityPlayer player, EnumHand hand) {

//if the player interacting is not the owner, do nothing!
if (MoCreatures.proxy.enableOwnership && this.getOwnerId() != null && !player.getUniqueID().equals(this.getOwnerId())) {
ITextComponent message = new TextComponentTranslation("msg.mocreatures.foreignpet");
message.getStyle().setColor(TextFormatting.RED);
player.sendMessage(message);
if (!this.world.isRemote) {
ITextComponent message = new TextComponentTranslation("msg.mocreatures.foreignpet");
message.getStyle().setColor(TextFormatting.RED);
player.sendMessage(message);
}
return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,12 @@ private boolean checkOwnership(EntityPlayer player, EnumHand hand) {
}

//if the player interacting is not the owner, do nothing!
if (MoCreatures.proxy.enableOwnership && this.getOwnerId() != null
&& !player.getUniqueID().equals(this.getOwnerId())) {
ITextComponent message = new TextComponentTranslation("msg.mocreatures.foreignpet");
message.getStyle().setColor(TextFormatting.RED);
player.sendMessage(message);
if (MoCreatures.proxy.enableOwnership && this.getOwnerId() != null && !player.getUniqueID().equals(this.getOwnerId())) {
if (!this.world.isRemote) {
ITextComponent message = new TextComponentTranslation("msg.mocreatures.foreignpet");
message.getStyle().setColor(TextFormatting.RED);
player.sendMessage(message);
}
return false;
}

Expand Down

0 comments on commit ba4f3e1

Please sign in to comment.