Utility functions that don't have a natural home in any other namespace.
This code is heavily borrowed from the cljminecraft project: https://github.com/CmdrDats/clj-minecraft
Utility functions that don't have a natural home in any other namespace. This code is heavily borrowed from the cljminecraft project: https://github.com/CmdrDats/clj-minecraft
(class->kebab-case cls)
Takes a class and returns the fully-qualified name, but with each segment converted from CamelCase to kebab-case. org.bukkit.plugin.JavaPlugin -> 'org.bukkit.plugin.java-plugin'
Takes a class and returns the fully-qualified name, but with each segment converted from CamelCase to kebab-case. org.bukkit.plugin.JavaPlugin -> 'org.bukkit.plugin.java-plugin'
(find-has-command-sender)
Use Reflections library to find all bukkit classes with a nargs getCommandSender() function.
Use Reflections library to find all bukkit classes with a nargs getCommandSender() function.
(find-has-player-classes)
Use Reflections library to find all bukkit classes with a method called getPlayer() that returns org.bukkit.entity.Player and has 0 parameters.
Use Reflections library to find all bukkit classes with a method called getPlayer() that returns org.bukkit.entity.Player and has 0 parameters.
(find-subclasses class package-name)
Use Reflections library to find all subclasses of a given class in a given package. This is useful, say, for getting all Bukkit Event types.
Use Reflections library to find all subclasses of a given class in a given package. This is useful, say, for getting all Bukkit Event types.
(kebab-case->class class-name)
Does the reverse of the above fn. 'org.bukkit.plugin.java-plugin' -> org.bukkit.plugin.JavaPlugin
Does the reverse of the above fn. 'org.bukkit.plugin.java-plugin' -> org.bukkit.plugin.JavaPlugin
(map-enums ns-sym enum-class)
Transforms an Enum class into a map. Keywords are converted to :kebab-case and given a namespace prefix (can be nil).
Transforms an Enum class into a map. Keywords are converted to :kebab-case and given a namespace prefix (can be nil).
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close