Package org.bukkit.craftbukkit.v1_6_R3

Examples of org.bukkit.craftbukkit.v1_6_R3.CraftServer


    }
    return false;
  }

  public static boolean updatePlayerConnection(Player player) {
    CraftPlayer cp = (CraftPlayer) player;
    CraftServer server = (CraftServer) Bukkit.getServer();
    if (!(cp.getHandle().playerConnection instanceof SpoutPlayerConnection)) {
      PlayerConnection oldHandler = cp.getHandle().playerConnection;
      Location loc = player.getLocation();
      SpoutPlayerConnection handler = new SpoutPlayerConnection(MinecraftServer.getServer(), cp.getHandle().playerConnection.networkManager, cp.getHandle());
      /*for (Object o : cp.getHandle().playerChunkCoordIntPairs) {
      ChunkCoordIntPair c = (ChunkCoordIntPair) o;
      handler.addActiveChunk(c);
      }*/
      handler.a(loc.getX(), loc.getY(), loc.getZ(), loc.getYaw(), loc.getPitch());
      cp.getHandle().playerConnection = handler;
      INetworkManager nm = cp.getHandle().playerConnection.networkManager;
      setPlayerConnection(nm, cp.getHandle().playerConnection);
      Field handlerList = null;
      try {
        handlerList = ServerConnection.class.getDeclaredField("c");
        handlerList.setAccessible(true);
        ServerConnection sc = ((DedicatedServer) MinecraftServer.getServer()).ag();
View Full Code Here


    return false;
  }

  public static boolean updateBukkitEntity(Player player) {
    if (!(player instanceof SpoutCraftPlayer)) {
      CraftPlayer cp = (CraftPlayer) player;
      EntityPlayer ep = cp.getHandle();
      return updateBukkitEntity(ep);
    }
    return false;
  }
View Full Code Here

  public SpoutCraftPlayer(CraftServer server, EntityPlayer entity) {
    super(server, entity);
    createInventory(null);
    if (entity.playerConnection != null) {
      CraftPlayer player = entity.playerConnection.getPlayer();
      perm = new SpoutPermissibleBase(player.addAttachment(Bukkit.getServer().getPluginManager().getPlugin("Spout")).getPermissible());
      perm.recalculatePermissions();

      hasPlayed = player.hasPlayedBefore();
      lastPlayed = player.getLastPlayed();
      firstPlayed = player.getFirstPlayed();
    } else {
      perm = new SpoutPermissibleBase(new PermissibleBase(this));
      perm.recalculatePermissions();
    }
    mainScreen = new InGameScreen(this.getEntityId());
View Full Code Here

                    }

                }
            }
        }
        PlayerInventory inv = new CraftInventoryPlayer(new net.minecraft.server.v1_6_R3.PlayerInventory(null));
        ItemStack[] stacks = inv.getContents();
        inv.setContents(array.toArray(stacks));
        return inv;
    }
View Full Code Here

TOP

Related Classes of org.bukkit.craftbukkit.v1_6_R3.CraftServer

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.