Created
March 21, 2015 15:00
-
-
Save Romain-P/47fc87616f5c197cd8aa to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| package org.heat.world; | |
| import org.heat.world.commands.impl.actions.AnnounceAction; | |
| import org.heat.world.commands.impl.actions.HelpAction; | |
| import org.heat.world.commands.impl.conditions.AnnouncerAccess; | |
| /** | |
| * Managed by romain on 08/03/2015. | |
| */ | |
| public class StdFrontendCommandsModule extends StdCommandsModule { | |
| @Override | |
| protected void createCommands() { | |
| createNewCommand("help", (x) -> x | |
| .describe("liste et décrit les commandes disponibles. Donne aussi des détails sur une commande: " + | |
| "!help [#commande].") | |
| .to(HelpAction.class) | |
| .withArg("command")); | |
| createNewCommand("announce", (x) -> x | |
| .describe("annonce à tous les joueurs un message.") | |
| .to(AnnounceAction.class) | |
| .withRequiredArg("message") | |
| .iff(AnnouncerAccess.class)); | |
| } | |
| @Override | |
| protected void loadConditions() { | |
| loadNewCondition(AnnouncerAccess.class); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment