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

Add exampe listener

parent 330044db
No related branches found
No related tags found
No related merge requests found
(ns com.coalesce.bukkitforclojure.example.listener
(:import [org.bukkit.event.player PlayerJoinEvent]
[org.bukkit Bukkit ChatColor]
[org.bukkit.entity Player]))
(defn playerJoinedHandler
[^PlayerJoinEvent event]
(Bukkit/broadcastMessage (ChatColor/translateAlternateColorCodes \& (str "&c" (-> (.getPlayer event) (.getName)) " has joined the Clojure-run server!")))
)
\ 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