Skip to content

Commit

Permalink
GH-569 Fixed naming of variables and remove unused annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
P1otrulla committed Dec 10, 2023
1 parent 023f2b9 commit 66b56ef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ public Result<Home, NoticeBroadcast> parse(LiteInvocation invocation, String arg
return Result.ok(home.get());
}

String join = String.join(", ",
String homes = String.join(", ",
this.homeManager.getHomes(uniqueId).stream()
.map(Home::getName)
.toList());

NoticeBroadcast notice = this.noticeService.create()
.notice(translate -> translate.home().homeList())
.placeholder("{HOMES}", join)
.placeholder("{HOMES}", homes)
.viewer(viewer);

return Result.error(notice);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ void execute(Player player) {
Collection<Home> playerHomes = this.homeManager.getHomes(player.getUniqueId());

if (playerHomes.size() != 1) {
String join = String.join(", ",
String homes = String.join(", ",
this.homeManager.getHomes(player.getUniqueId()).stream()
.map(Home::getName)
.toList());

this.noticeService.create()
.player(player.getUniqueId())
.notice(translation -> translation.home().homeList())
.placeholder("{HOMES}", join)
.placeholder("{HOMES}", homes)
.send();
return;
}
Expand All @@ -65,7 +65,7 @@ void execute(Player player, @Arg Home home) {
this.teleportToHome(player, home);
}

private void teleportToHome(Player player, @Arg Home home) {
private void teleportToHome(Player player, Home home) {
if (player.hasPermission("eterncore.teleport.bypass")) {
this.teleportService.teleport(player, home.getLocation());
return;
Expand Down

0 comments on commit 66b56ef

Please sign in to comment.