Skip to content

Commit

Permalink
remove redundant call to getHomeLocation
Browse files Browse the repository at this point in the history
  • Loading branch information
flpeters committed Mar 13, 2021
1 parent b921490 commit 850485d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/me/downthepark/sethome/SetHome.java
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,11 @@ public void run()
private void
sendPlayerHome(Player player)
{
player.teleport(getHomeLocation(player));
Location location = getHomeLocation(player);
player.teleport(location);
if (config.getBoolean("play-warp-sound"))
{
player.playSound(getHomeLocation(player), Sound.ENTITY_ENDERMAN_TELEPORT, 1.0F, 1.0F);
player.playSound(location, Sound.ENTITY_ENDERMAN_TELEPORT, 1.0F, 1.0F);
}
if (config.getBoolean("show-teleport-message")) {
player.sendMessage(ChatColor.translateAlternateColorCodes('&',
Expand Down

0 comments on commit 850485d

Please sign in to comment.