Skip to content
Snippets Groups Projects
Commit e32bc04d authored by Mariell's avatar Mariell :speech_balloon:
Browse files

Add example command

parent fd77e33b
No related branches found
No related tags found
No related merge requests found
(ns com.coalesce.bukkitforclojure.example.command
(:import [org.bukkit.command CommandSender Command]
[org.bukkit.entity Player]
[org.bukkit Sound]))
(defn clojureCommand
[^CommandSender sender
^Command command
^String label
#^"[Ljava.lang.String;" args]
(.sendMessage sender "You successfully ran a command in Clojure.")
(if (instance? Player sender)
(let [player (cast Player sender)]
(.playSound player (.getLocation player) (Sound/BLOCK_NOTE_BASEDRUM) 1.0 1.0)))
)
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment