Solved set args[0] in method

Discussion in 'Plugin Development' started by kamakarzy, May 7, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    kamakarzy

    as the title says how do i add args[0] to a mothed eg


    Code:
    public void setShopname(Player p, Location loc) {
            String player = p.getName();
            String shopname = args[0]
            getConfig().set(
                    shopname,
                    p.getWorld().getName() + "," + (int) loc.getX() + ","
                            + (int) loc.getY() + "," + (int) loc.getZ());
            saveConfig();
        }
     
  2. Offline

    kreashenz

    Code:java
    1. public void setShopname(Player p, Location loc, String[] args){
    2. // do stuff
    3. }

    I think that's what you're asking for?
     
  3. Offline

    kamakarzy

Thread Status:
Not open for further replies.

Share This Page