Package com.warrows.plugins.TreeSpirit.trees

Examples of com.warrows.plugins.TreeSpirit.trees.GreatTreeCoop


  {
    byte type = heart.getData();
    if ("logs".equals(TreeSpiritPlugin.getConfigInstance().getString(
        "co-op-type")))
    {
      GreatTreeCoop coopTree = CoOpLogsHandler.getTreeByType(type);
      if (coopTree != null)
      {
        // joining a co-op tree
        player.getInventory().clear();
        player.getInventory().addItem(
            new ItemStack(Material.LOG, 3, type));
        player.getInventory().addItem(
            new ItemStack(Material.SAPLING, 1, type));
        coopTree.add(player);
        player.teleport(coopTree.getTop());
        player.sendMessage(Text.getMessage("co-op-log-new-player"));
        return;
      }
    }
    createClassicTree(player, heart, type);
View Full Code Here


    player.getInventory().addItem(new ItemStack(Material.LOG, 5, type));
    player.getInventory().addItem(new ItemStack(Material.SAPLING, 2, type));
    GreatTree tree;
    if ("logs".equals(TreeSpiritPlugin.getConfigInstance().getString(
        "co-op-type")))
      tree = new GreatTreeCoop(heart, player, type);
    else
      tree = new GreatTree(heart, player.getName(), type);
    player.teleport(tree.getTop());
    player.setGameMode(GameMode.SURVIVAL);
    player.setAllowFlight(true);
View Full Code Here

    if ("joining".equals(TreeSpiritPlugin.getConfigInstance().getString(
        "co-op-type"))
        || "logs".equals(TreeSpiritPlugin.getConfigInstance()
            .getString("co-op-type")))
    {
      GreatTreeCoop tree = (GreatTreeCoop) TreesData.getGreatTree(player);
      if (tree == null)
        return false;
      if (tree.getPlayerName().equals(player.getName()))
        return false;
      tree.remove(player);
      return true;
    }
    return false;
  }
View Full Code Here

TOP

Related Classes of com.warrows.plugins.TreeSpirit.trees.GreatTreeCoop

Copyright © 2018 www.massapicom. 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.