Skip to content

Commit

Permalink
Changed inspection permission message
Browse files Browse the repository at this point in the history
  • Loading branch information
A-Flying-Poro committed Nov 22, 2022
1 parent e640474 commit 6d42bd3
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,14 @@ class HorseEventListener(private val main: HorseEnhancerMain) : Listener {

database.removeInvalidHorses()
val horseData = database.getHorse(horse.uniqueId)
if (horseData == null) {
player.sendMessage(ColouredTextComponent("You cannot ${mode.verb} a wild horse.", ChatColor.RED))
return
} else if (!horse.isTamed) {
if (horseData == null || !horse.isTamed) {
if (!player.hasPermission(permissionInspectionWild)) {
player.sendMessage(ColouredTextComponent("You cannot ${mode.verb} a wild horse.", ChatColor.RED))
} else {
return
} else if (horseData == null) {
player.sendMessage(ColouredTextComponent("This horse is not yet registered.", ChatColor.RED))
return
}
return
}

when (mode) {
Expand Down

0 comments on commit 6d42bd3

Please sign in to comment.