Examples of MinecraftServer


Examples of net.minecraft.server.MinecraftServer

    }
  }
 
  public void sendToReceivers(IMessage message, Range4D range)
  {
    MinecraftServer server = MinecraftServer.getServer();

    if(server != null)
    {
      for(EntityPlayerMP player : (List<EntityPlayerMP>)server.getConfigurationManager().playerEntityList)
      {
        if(player.dimension == range.dimensionId && Range4D.getChunkRange(player).intersects(range))
        {
          sendTo(message, player);
        }
View Full Code Here

Examples of net.minecraft.server.MinecraftServer

            }
            break;
        case C_UPDATE_GEAR_SLOT:
            int subtype = (Integer) this.data.get(2);
            EntityPlayer gearDataPlayer = null;
            MinecraftServer server = MinecraftServer.getServer();

            if (server != null)
            {
                gearDataPlayer = PlayerUtil.getPlayerForUsernameVanilla(server, (String) this.data.get(0));
            }
View Full Code Here

Examples of net.minecraft.server.MinecraftServer

    }

    public static WorldProvider getProviderForDimension(int id)
    {
      WorldProvider provider = null;
      MinecraftServer theServer = FMLCommonHandler.instance().getMinecraftServerInstance();
      if (theServer != null)
      {
        WorldServer ws = theServer.worldServerForDimension(id);
        if (ws != null)
          provider = ws.provider;
      }
      if (provider == null) provider = WorldProvider.getProviderForDimension(id);
      return provider;
View Full Code Here

Examples of net.minecraft.server.MinecraftServer

    }

    public static void registerSpaceStations(File spaceStationList)
    {
        WorldUtil.registeredSpaceStations = WorldUtil.getExistingSpaceStationList(spaceStationList);
      MinecraftServer theServer = FMLCommonHandler.instance().getMinecraftServerInstance();

        for (Integer registeredID : WorldUtil.registeredSpaceStations)
        {
            int id = Arrays.binarySearch(ConfigManagerCore.staticLoadDimensions, registeredID);

            if (!DimensionManager.isDimensionRegistered(registeredID))
            {
              if (id >= 0)
              {
                  DimensionManager.registerDimension(registeredID, ConfigManagerCore.idDimensionOverworldOrbitStatic);
                  theServer.worldServerForDimension(registeredID);
                }
              else
              {
                  DimensionManager.registerDimension(registeredID, ConfigManagerCore.idDimensionOverworldOrbit);
              }
View Full Code Here

Examples of net.minecraft.server.MinecraftServer

    {
        if (!world.isRemote)
        {
            //GalacticraftCore.packetPipeline.sendToAll(new PacketSimple(EnumSimplePacket.C_UPDATE_PLANETS_LIST, WorldUtil.getPlanetList()));

            MinecraftServer mcServer = FMLCommonHandler.instance().getMinecraftServerInstance();

            if (mcServer != null)
            {
                final WorldServer var6 = mcServer.worldServerForDimension(dimensionID);

                if (var6 == null)
                {
                    System.err.println("Cannot Transfer Entity to Dimension: Could not get World for Dimension " + dimensionID);
                    return null;
View Full Code Here

Examples of net.minecraft.server.MinecraftServer

        return VersionUtil.getPlayerForUsername(server, username);
    }

    public static EntityPlayerMP getPlayerBaseServerFromPlayerUsername(String username, boolean ignoreCase)
    {
        MinecraftServer server = MinecraftServer.getServer();

        if (server != null)
        {
            if (ignoreCase)
            {
                return getPlayerForUsernameVanilla(server, username);
            }
            else
            {
                Iterator iterator = server.getConfigurationManager().playerEntityList.iterator();
                EntityPlayerMP entityplayermp;

                do
                {
                    if (!iterator.hasNext())
View Full Code Here

Examples of net.minecraft.server.MinecraftServer

        GalacticraftCore.packetPipeline.sendTo(new PacketSimple(EnumSimplePacket.C_UPDATE_THERMAL_LEVEL, new Object[] { playerStats.thermalLevel }), player);
    }

    public static void sendGearUpdatePacket(EntityPlayerMP player, EnumModelPacket gearType)
    {
      MinecraftServer theServer = FMLCommonHandler.instance().getMinecraftServerInstance();
      if (theServer != null && PlayerUtil.getPlayerForUsernameVanilla(theServer, player.getGameProfile().getName()) != null)
        {
            GalacticraftCore.packetPipeline.sendToAllAround(new PacketSimple(EnumSimplePacket.C_UPDATE_GEAR_SLOT, new Object[] { player.getGameProfile().getName(), gearType.ordinal(), -1 }), new TargetPoint(player.worldObj.provider.dimensionId, player.posX, player.posY, player.posZ, 50.0D));
        }
    }
View Full Code Here

Examples of net.minecraft.server.MinecraftServer

        }
    }

    public static void sendGearUpdatePacket(EntityPlayerMP player, EnumModelPacket gearType, int subtype)
    {
      MinecraftServer theServer = FMLCommonHandler.instance().getMinecraftServerInstance();
      if (theServer != null && PlayerUtil.getPlayerForUsernameVanilla(theServer, player.getGameProfile().getName()) != null)
        {
            GalacticraftCore.packetPipeline.sendToAllAround(new PacketSimple(EnumSimplePacket.C_UPDATE_GEAR_SLOT, new Object[] { player.getGameProfile().getName(), gearType.ordinal(), subtype }), new TargetPoint(player.worldObj.provider.dimensionId, player.posX, player.posY, player.posZ, 50.0D));
        }
    }
View Full Code Here

Examples of net.minecraft.server.MinecraftServer

  @Mod.EventHandler
  public void serverStart(FMLServerStartingEvent event) {
    if (GeneralSettings.consoleCommandsDisabled)
      return;

    MinecraftServer server = MinecraftServer.getServer(); // Gets current server
    ICommandManager command = server.getCommandManager(); // Gets the command
                                                          // manager to use for
                                                          // server
    ServerCommandManager serverCommand = ((ServerCommandManager) command); // Turns
                                                                           // it
                                                                           // into
View Full Code Here

Examples of net.minecraft.server.MinecraftServer

    private boolean isMCPC;
   
    @EventHandler
    public void postInit(FMLPostInitializationEvent event)
    {
        MinecraftServer ms = MinecraftServer.getServer();
        isMCPC = (ms != null) && (ms.getServerModName().contains("mcpc"));
        if (isMCPC) {
            DynmapCommonAPIListener.register(new APICallback());
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.