Skip to content

Commit

Permalink
Remove PLAYER replacements which aren't relevant to 'not-owner' message
Browse files Browse the repository at this point in the history
  • Loading branch information
PyvesB committed Jul 5, 2020
1 parent 5cc4a34 commit 8c42cc8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,15 @@ public void onPlayerInteractEntityEvent(PlayerInteractEntityEvent event) {

if (disableRiding && !isOwner && !player.hasPermission("petmaster.admin") && tameable instanceof AbstractHorse) {
player.sendMessage(plugin.getChatHeader() + plugin.getPluginLang()
.getString("not-owner", "You do not own this pet!").replace("PLAYER", player.getName()));
.getString("not-owner", "You do not own this pet!"));
event.setCancelled(true);
return;
}

// Cannot change ownership or free pet if not owner and no bypass permission.
if ((newOwner != null || freePet) && !isOwner && !player.hasPermission("petmaster.admin")) {
player.sendMessage(plugin.getChatHeader() + plugin.getPluginLang()
.getString("not-owner", "You do not own this pet!").replace("PLAYER", player.getName()));
.getString("not-owner", "You do not own this pet!"));
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public void onPlayerLeashEntityEvent(PlayerLeashEntityEvent event) {
return;

player.sendMessage(plugin.getChatHeader() + plugin.getPluginLang()
.getString("not-owner", "You do not own this pet!").replace("PLAYER", player.getName()));
.getString("not-owner", "You do not own this pet!"));
event.setCancelled(true);
}
}

0 comments on commit 8c42cc8

Please sign in to comment.