Skip to content

Commit

Permalink
fix: make it so vanished players dont show in list
Browse files Browse the repository at this point in the history
  • Loading branch information
98ping committed Oct 6, 2023
1 parent 4d44928 commit 489bf7c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ object AlchemistAPI {
fun supplyColoredNames() : CompletableFuture<List<Player>> {
return CompletableFuture.supplyAsync {
Bukkit.getOnlinePlayers()
.filter { !it.hasMetadata("vanish") }
.sortedBy {
AccessiblePermissionHandler.findRankWeight(it)
}.reversed()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,15 @@ class PartyCommands : BaseCommand() {
"This player has already been promoted to the highest rank!"
)
}

myParty.members[it.uuid] = PartyElevation.OFFICER

with (PartyService.handler) {
this.insert(myParty.id, myParty)
PartyService.backingPartyCache[myParty.id] = myParty
}

player.sendMessage(Chat.format("&7[&dParties&7] &aYou have just promoted ${it.getRankDisplay()} &ato an &eOfficer&a!"))
}
}

Expand Down

0 comments on commit 489bf7c

Please sign in to comment.