Skip to content
This repository has been archived by the owner on Jul 8, 2024. It is now read-only.

Commit

Permalink
/config : drop setProperty function
Browse files Browse the repository at this point in the history
  • Loading branch information
eone666 committed Oct 4, 2023
1 parent e0d8a3a commit 964c2f3
Showing 1 changed file with 10 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,16 @@ class Config : TabExecutor {
sender.sendMessage("Property $key set to $value")
}

private fun setProperty(args: Array<out String>, sender: CommandSender):Boolean {
override fun onCommand(
sender: CommandSender,
command: Command,
label: String,
args: Array<out String>
): Boolean {
if (args.isEmpty()) {
return false
}

val value = args[1]

when(val key = args.first()){
Expand Down Expand Up @@ -97,19 +106,6 @@ class Config : TabExecutor {
}
}
}

override fun onCommand(
sender: CommandSender,
command: Command,
label: String,
args: Array<out String>
): Boolean {
if (args.isEmpty()) {
return false
}

return setProperty(args, sender)
}
override fun onTabComplete(
sender: CommandSender,
command: Command,
Expand Down

0 comments on commit 964c2f3

Please sign in to comment.