-
Notifications
You must be signed in to change notification settings - Fork 35
Players
(:require [cljminecraft.players :as players])
Source: players.clj
Broadcast a message to all players"
(broadcast <format> [<args ...>])
Broadcast a message to all players with a given permission"
(broadcast-permission <permission> <format> [<args ...>])
(send-msg <player> <format> [<args ...>])
(give <player> <material-key> [<quantity>])
Attach a player to a plugin for permission handling - clj-minecraft handles this automatically, so you shouldn't need to.
(permission-attach-player! <plugin> <player>)
Detach a player from permission handling - clj-minecraft handles this automatically, so you shouldn't need to.
(permission-detach-player! <player>)
(permission-attach-all! <plugin>)
(permission-detach-all!)
(defined-permissions)
(command-permissions)
Finds permissions starting with a given name.
(find-permission <name>)
Check if a player has a permission - this does an implicit (get-player player), so you can pass in a String, Player, Event (that has .getPlayer), InventoryView, etc. (see get-player protocol)
(has-permission <player> <permission>)
This uses the clj-minecraft permission handling to set a permission. This is very simplistic and really for basic permission setting so that you don't need another plugin for the basic permission management - allow-type can be :allow, :disallow or :release - :disallow actively disallows a permission, where :release just unsets it and lets possibly another plugin set it again.
(set-permission <player> <permission> <allow-type>)