Created
May 7, 2015 18:47
-
-
Save volgar1x/d296ee69df20b1f20dfe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Player implements Restricted<Player> { | |
@Getter | |
final Permission<Player> permission = | |
Alpha.let("connect").raiseIf("You are banned", this::isBanned) | |
.raiseIf("Already playing", this::isAlreadyPlaying) | |
.let("move").raiseIf("You are jailed", this::isJailed) | |
.raiseIf("Too heavy", this::isTooHeavy) | |
.let("move:teleport").raiseUnless("You are not an admin", this::isAdmin) | |
; | |
; | |
} | |
player.must("move:teleport"); | |
player.teleportTo(BONTA); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment