Examples of MinecraftServer


Examples of com.atlauncher.data.MinecraftServer

                            JOptionPane.ERROR_MESSAGE);
                } else {
                    App.TOASTER.pop(Language.INSTANCE.localize((this.serverEditing == null ? "tools" + "" +
                            ".serverchecker.serveradded" : "tools.serverchecker.serveredited")));
                    if (this.serverEditing == null) {
                        App.settings.addCheckingServer(new MinecraftServer(name, host, port, qv));
                    } else {
                        this.serverEditing.setName(name);
                        this.serverEditing.setHost(host);
                        this.serverEditing.setPort(port);
                        this.serverEditing.setQueryVersion(qv);
View Full Code Here

Examples of com.atlauncher.data.MinecraftServer

        }
    }

    public void deleteSelectedElement() {
        if (serverList.getSelectedIndex() != -1) {
            MinecraftServer selectedValue = ((MinecraftServer) serverList.getSelectedValue());
            App.settings.removeCheckingServer(selectedValue);
            listModel.removeElement(selectedValue);
            reloadServers();
        }
    }
View Full Code Here

Examples of net.minecraft.server.MinecraftServer

  }

  @EventHandler
  public void serverStart(FMLServerStartingEvent event) {
    MinecraftServer server = MinecraftServer.getServer();
    ICommandManager command = server.getCommandManager();
    ServerCommandManager manager = (ServerCommandManager) command;
        manager.registerCommand(new SetTendencyCommand());
        manager.registerCommand(new MaxResearchCommand());
    manager.registerCommand(new KamiUnlockedCommand());
  }
View Full Code Here

Examples of net.minecraft.server.MinecraftServer

    this.z = tile.zCoord;
    this.dim = tile.getWorldObj().provider.dimensionId;
  }

  public IMessage onMessage(PacketTile message, MessageContext ctx) {
    MinecraftServer server = MiscHelper.server();
    if (ctx.side.isClient())
      message.player = TTClientProxy.getPlayer();
    else {
      message.player = ctx.getServerHandler().playerEntity;
    }
    if (server != null) {
      World world = server.worldServerForDimension(message.dim);

      if (world == null) {
        MiscHelper.printCurrentStackTrace("No world found for dimension " + message.dim + "!");
        return null;
      }
View Full Code Here

Examples of net.minecraft.server.MinecraftServer

  }

  public void travelToDimension(int par1, Entity e) {
    if (!e.worldObj.isRemote && !e.isDead) {
      e.worldObj.theProfiler.startSection("changeDimension");
      MinecraftServer minecraftserver = MinecraftServer.getServer();
      int j = e.dimension;
      WorldServer worldserver = minecraftserver.worldServerForDimension(j);
      WorldServer worldserver1 = minecraftserver.worldServerForDimension(par1);
      e.dimension = par1;

      if (j == 1 && par1 == 1) {
        worldserver1 = minecraftserver.worldServerForDimension(0);
        e.dimension = 0;
      }

      e.worldObj.removeEntity(e);
      e.isDead = false;
      e.worldObj.theProfiler.startSection("reposition");
      minecraftserver.getConfigurationManager().transferEntityToWorld(e, j, worldserver, worldserver1, new TeleporterBedrock(worldserver));
      e.worldObj.theProfiler.endStartSection("reloading");
      Entity entity = EntityList.createEntityByName(EntityList.getEntityString(e), worldserver1);

      if (entity != null) {
        entity.copyDataFrom(e, true);
View Full Code Here

Examples of net.minecraft.server.MinecraftServer

    int toDimension = reciever.getWorldObj().provider.dimensionId;
    int toX = reciever.xCoord;
    int toY = reciever.yCoord + 1;
    int toZ = reciever.zCoord;

    MinecraftServer minecraftserver = MinecraftServer.getServer();
    WorldServer worldserver1 = minecraftserver.worldServerForDimension(toDimension);
    EntityMinecart newCart = (EntityMinecart) EntityList.createEntityByName(EntityList.getEntityString(cart), worldserver1);
    if(newCart == null) {
      return null;
    }
View Full Code Here

Examples of net.minecraft.server.MinecraftServer

      for (int i = 0; i < cont.getSizeInventory(); i++) {
        cont.setInventorySlotContents(i, null);
      }
    }

    MinecraftServer minecraftserver = MinecraftServer.getServer();
    WorldServer worldserver = minecraftserver.worldServerForDimension(world.provider.dimensionId);

    Entity passenger = cart.riddenByEntity;
    if(passenger != null && !(passenger instanceof EntityPlayer)) {
      worldserver.removeEntity(passenger);
      passenger.isDead = true;
View Full Code Here

Examples of net.minecraft.server.MinecraftServer

  }

  public static void spawn(World world, Entity entity) {
    if(entity != null) {
      MinecraftServer minecraftserver = MinecraftServer.getServer();
      WorldServer worldserver = minecraftserver.worldServerForDimension(world.provider.dimensionId);
      worldserver.spawnEntityInWorld(entity);
    }
  }
View Full Code Here

Examples of net.minecraft.server.MinecraftServer

      return;
    }
    double oX = entity.posX;
    double oZ = entity.posZ;
    World world = transciever.getWorldObj();
    MinecraftServer minecraftserver = MinecraftServer.getServer();
    WorldServer worldserver = minecraftserver.worldServerForDimension(world.provider.dimensionId);
    for (int i = 0; i < 4; i++) {
      int x = transciever.xCoord + randOffset(2);
      int y = transciever.yCoord + 1;
      int z = transciever.zCoord + randOffset(2);
      Block b = world.getBlock(x, y, z);
View Full Code Here

Examples of net.minecraft.server.MinecraftServer

   * @param username
   * @author King_Lemming
   */
  public boolean isOp(String username)
  {
    MinecraftServer theServer = FMLCommonHandler.instance().getMinecraftServerInstance();

    if (theServer != null)
    {
      return theServer.getConfigurationManager().getOps().contains(username.trim().toLowerCase());
    }

    return false;
  }
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.