Skip to content

Commit

Permalink
fix(bukkit): permission check for join/quit message
Browse files Browse the repository at this point in the history
  • Loading branch information
Syrent committed Jun 6, 2024
1 parent 01b4c45 commit 55a6058
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class FeatureFakeMessage(
private fun onJoin(event: PlayerJoinEvent) {
if (!isActive()) return
val user = event.player.user(false) ?: return
if (!user.isVanished || user.hasPermission(Permission.VANISH_ON_JOIN)) return
if (!user.isVanished && !user.hasPermission(Permission.VANISH_ON_JOIN)) return
if (disableJoinMessageIfVanished) {
event.joinMessage = null
}
Expand All @@ -53,7 +53,7 @@ class FeatureFakeMessage(
private fun onJoinLast(event: PlayerJoinEvent) {
if (!isActive()) return
val user = event.player.user(false) ?: return
if (!user.isVanished || user.hasPermission(Permission.VANISH_ON_JOIN)) return
if (!user.isVanished && !user.hasPermission(Permission.VANISH_ON_JOIN)) return
if (disableJoinMessageIfVanished) {
event.joinMessage = null
}
Expand Down

0 comments on commit 55a6058

Please sign in to comment.