Package net.wiskr.simplefreeforall.commands

Source Code of net.wiskr.simplefreeforall.commands.Help

package net.wiskr.simplefreeforall.commands;

import net.wiskr.simplefreeforall.CommandManager;

import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;

public class Help
{
  public static void getHelp()
  {
    formatHelp("join <name>", "Join the arena with the name specified", "join");
    formatHelp("game help create", "Shows a help page on how to create an arena", "edit");
    formatHelp("game help admin", "Shows a help page on admin commands", "admin");
  }
 
  public static void getSelect()
  {
    formatHelp("game region hpos1", "Creates a reference point 1 at the block you are looking at", "");
    formatHelp("game region hpos2", "Creates a reference point 2 at the block you are looking at", "");
    Util.sendMessage(" Your field of view is limited to 100 blocks");
    formatHelp("game region pos1", "Creates a reference point 1 at your immediate location", "");
    formatHelp("game region pos2", "Creates a reference point 2 at your immediate location", "");
    //Util.sendMessage(" You can also select a region with your normal World Edit tool");
  }
 
  public static void getCreate()
  {
    formatHelp("game <name> create", "Creates a new arena with the name specified", "");
    formatHelp("game <name> region <pos1/pos2>", "Sets an arena region reference point", "");
    formatHelp("game <name> add lobby", "Adds a lobby spawn point to the arena", "");
    formatHelp("game <name> add <id>", "Adds an arena spawn point", "");
    formatHelp("game <name> edit", "Toggles the arena building protection on and off", "");
    formatHelp("game <name> name <display>", "Adds a display name to the mine", "");
    formatHelp("game <name> delete", "Deletes the arena", "");
  }
 
  public static void getAdmin()
  {
    formatHelp("game <name> forcestart", "Forces the arena to start", "");
    formatHelp("game <name> forcestop", "Forces the arena to stop", "");
  }
 
  private static void formatHelp(String command, String description, String node)
  {
    CommandSender sender = CommandManager.getSender();
    if(Util.senderHasPermission(node))
      sender.sendMessage(ChatColor.GREEN + "/" + command + ChatColor.WHITE + " " + description);
   
    return;
  }
}
TOP

Related Classes of net.wiskr.simplefreeforall.commands.Help

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.