-
-
Save aikar/420fbb563685580c643f4df35b562f9a 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
this.getCommandConditions().addCondition(Residence.class, "serverowned", (contexts, execContext, res) -> { | |
if (res == null || !res.isServerOwned()) { | |
throw new ConditionFailedException("Must be server owned"); | |
} | |
}); | |
this.getCommandConditions().addCondition("creative", c -> { | |
Player player = c.getIssuer().getPlayer(); | |
if (player == null || player.getGameMode() != GameMode.CREATIVE) { | |
throw new ConditionFailedException("Must be in Creative Mode"); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment