Package org.bukkit.craftbukkit.v1_6_R1

Examples of org.bukkit.craftbukkit.v1_6_R1.CraftWorld


public class BukkitCommandUtil
{
  public static SimpleCommandMap getBukkitCommandMap()
  {
    CraftServer craftServer = (CraftServer)Bukkit.getServer();
    return craftServer.getCommandMap();
  }
View Full Code Here


  }
 
  public static RemoteConsoleCommandSender getRcon()
  {
    Server server = Bukkit.getServer();
    CraftServer craftServer = (CraftServer)server;
    MinecraftServer minecraftServer = craftServer.getServer();
    return minecraftServer.remoteConsole;
  }
View Full Code Here

  // -------------------------------------------- //
  // A way of getting the player directory even when the server just started
 
  public static File getPlayerDirectory()
  {
    CraftServer cserver = (CraftServer)Bukkit.getServer();
    DedicatedServer dserver = (DedicatedServer)cserver.getServer();
    String levelName = dserver.propertyManager.getString("level-name", "world");
    return new File(Bukkit.getWorldContainer(), new File(levelName, "players").getPath());
  }
View Full Code Here

    return ret;
 
 
  public static Entry<Integer, String> getBiomeIdAndNameAt(World world, int x, int z)
  {
    CraftWorld craftWorld = (CraftWorld)world;
    WorldServer worldServer = craftWorld.getHandle();
   
    BiomeBase biomeBase = worldServer.getBiome(x, z);
   
    Integer id = biomeBase.id;
    String name = biomeBase.y;
View Full Code Here

    return new SimpleEntry<Integer, String>(id, name);
  }
 
  public static void setBiomeIdAt(World world, int x, int z, int id)
  {
    CraftWorld craftWorld = (CraftWorld)world;
    WorldServer worldServer = craftWorld.getHandle();
   
    BiomeBase bb = BiomeBase.biomes[id];
    if (craftWorld.loadChunk(x >> 4, z >> 4, false)) {
      Chunk chunk = worldServer.getChunkAtWorldCoords(x, z);

      if (chunk != null) {
        byte[] biomevals = chunk.m();
        biomevals[((z & 0xF) << 4) | (x & 0xF)] = (byte)bb.id;
View Full Code Here

    recalcLightLevelAt(block.getWorld(), block.getX(), block.getY(), block.getZ());
  }
 
  public static void recalcLightLevelAt(World world, int x, int y, int z)
  {
    CraftWorld cworld = (CraftWorld)world;
    WorldServer worldServer = cworld.getHandle();
    worldServer.A(x, y, z);
  }
View Full Code Here

  /**
   * Updates the players food and health information.
   */
  public static void sendHealthFoodUpdatePacket(Player player)
  {
    CraftPlayer cplayer = (CraftPlayer)player;
    EntityPlayer eplayer = cplayer.getHandle();
    eplayer.playerConnection.sendPacket(new Packet8UpdateHealth(eplayer.getHealth(), eplayer.getFoodData().a(), eplayer.getFoodData().e()));
  }
View Full Code Here

      pret.setLeggings(pinventory.getLeggings() == null ? null : new ItemStack(pinventory.getLeggings()));
      pret.setBoots(pinventory.getBoots() == null ? null : new ItemStack(pinventory.getBoots()));
    }
    else
    {
      ret = new CraftInventoryCustom(holder, size, title);
    }
   
    ItemStack[] contents = cloneItemStacks(inventory.getContents());
    ret.setContents(contents);
   
View Full Code Here

    {
      // A custom size were specified
      size = jsonSize.getAsInt();
     
      // This is a "Custom" Inventory (content only).
      ret = new CraftInventoryCustom(null, size);
    }
   
    // Now process content
    ItemStack[] itemStacks = new ItemStack[size];
    for (int i = 0; i < size; i++)
View Full Code Here

  // CREATE PLAYER INVENTORY
  // -------------------------------------------- //
 
  public static PlayerInventory createPlayerInventory()
  {
    return new CraftInventoryPlayer(new MCorePlayerInventory());
  }
View Full Code Here

TOP

Related Classes of org.bukkit.craftbukkit.v1_6_R1.CraftWorld

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.