Skip to content

Commit

Permalink
Fix build issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt-MX committed Nov 21, 2023
1 parent bb630b9 commit 7474db6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions plugin/src/main/kotlin/com/mattmx/ktgui/KotlinGui.kt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class KotlinGui : JavaPlugin() {
suggestSubCommands = true

executes {
it.source.sendMessage(!"${mainColor}You are running ${subColor}KtGUI v${pluginMeta.version}")
source.sendMessage(!"${mainColor}You are running ${subColor}KtGUI v${pluginMeta.version}")
}

subCommands += simpleCommand {
Expand All @@ -55,13 +55,13 @@ class KotlinGui : JavaPlugin() {
playerOnly = true

executes {
val exampleId = it.args.getOrNull(1)
?: return@executes it.source.sendMessage(!"${mainColor}Please provide a valid example id.")
val exampleId = args.getOrNull(1)
?: return@executes source.sendMessage(!"${mainColor}Please provide a valid example id.")

val example = examples[exampleId]
?:return@executes it.source.sendMessage(!"${mainColor}Please provide a valid example id.")
?:return@executes source.sendMessage(!"${mainColor}Please provide a valid example id.")

example().run(it.player())
example().run(player())
}
suggests {
examples.keys.filter { ex -> ex.startsWith(it.lastArg) }
Expand Down

0 comments on commit 7474db6

Please sign in to comment.