Plugin Code - Working or Broken? -

Discussion in 'Plugin Development' started by Aeromcdoom, Dec 19, 2011.

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


            public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args){
                    File confFile = new File(plugin.getDataFolder(), "config"".yml");
                    FileConfiguration conf = YamlConfiguration.loadConfiguration(configFIle);
                    // etc.
                    return true;
                } //If this has happened the function will break and return true. if this hasn't happened the a value of false will be returned.
                return false;
    Would this work? To save the location of a player to configAeroMcDoom.yml
  2. Offline


    You need an if statement to check if sender is a player.

    1. if(sender instanceof Player) { Player player = sender;}
Thread Status:
Not open for further replies.

Share This Page