Skip to content
Ruby Rosario edited this page Sep 4, 2017 · 3 revisions
(:require [cljminecraft.players :as players])

Source: players.clj

Functions

broadcast

Broadcast a message to all players"

(broadcast <format> [<args ...>])

broadcast-permission

Broadcast a message to all players with a given permission"

(broadcast-permission <permission> <format> [<args ...>])

send-msg

(send-msg <player> <format> [<args ...>])

give

(give <player> <material-key> [<quantity>])

permission-attach-player!

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>)

permission-detach-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!

(permission-attach-all! <plugin>)

permission-detach-all!

(permission-detach-all!)

defined-permissions

(defined-permissions)

command-permissions

(command-permissions)

find-permission

Finds permissions starting with a given name.

(find-permission <name>)

has-permission

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>)

set-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>)