Hooking up my methods to a command

Discussion in 'Plugin Development' started by grasshopperMatt123, Mar 23, 2014.

Thread Status:
Not open for further replies.
  1. Hello, I am wondering if someone can provide an example of how to hook up the methods below to commands I need to commands

    1:
    /start : starts the game and takes in the first 2 players at the top of the queue and teleports them

    2:
    /join : joins the que

    Methods:
    public static List<String>queue = new ArrayList<>();

    public static void addToQueue(String s){ queue.add(s); }
    public void removeFromQueue(String s){ queue.remove(s); }

    public static String getNextInQueue(){ return queue.get( 0 ); }
    public static String getNextNextInQueue(){ return queue.get(1); }
     
  2. Offline

    2MBKindiegames

    Hi there,

    I'm guessing you're a novice programmer. If that's the case: "Welcome To Bukkit!"

    Anyway, calling commands is a very vital & basic (yet not quite too simple) action. You'll find everything you need to know here: http://wiki.bukkit.org/Plugin_Tutorial#Commands

    Read it all 'cause it requires some steps!

    Good luck!
     
Thread Status:
Not open for further replies.

Share This Page