Skip to content

Instantly share code, notes, and snippets.

@Romain-P
Created March 21, 2015 15:00
Show Gist options
  • Select an option

  • Save Romain-P/47fc87616f5c197cd8aa to your computer and use it in GitHub Desktop.

Select an option

Save Romain-P/47fc87616f5c197cd8aa to your computer and use it in GitHub Desktop.
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