Uploaded image for project: 'SpigotPlugins'
  1. SpigotPlugins
  2. PLUG-260

On the cmd when I run my server it crashes. Please help.

XMLWordPrintable

    • A custom one

      When I run my server it says:

      [17:09:11 ERROR]: Encountered an unexpected exception
      java.lang.RuntimeException: java.util.zip.ZipException: incorrect header check
      at org.bukkit.craftbukkit.v1_12_R1.chunkio.ChunkIOProvider.callStage1(ChunkIOProvider.java:30) ~[Spigot.jar:git-Spigot-5695bca-53fccdf]
      at org.bukkit.craftbukkit.v1_12_R1.chunkio.ChunkIOProvider.callStage1(ChunkIOProvider.java:1) ~[Spigot.jar:git-Spigot-5695bca-53fccdf]
      at org.bukkit.craftbukkit.v1_12_R1.util.AsynchronousExecutor.skipQueue(AsynchronousExecutor.java:336) ~[Spigot.jar:git-Spigot-5695bca-53fccdf]
      at org.bukkit.craftbukkit.v1_12_R1.util.AsynchronousExecutor.getSkipQueue(AsynchronousExecutor.java:295) ~[Spigot.jar:git-Spigot-5695bca-53fccdf]
      at org.bukkit.craftbukkit.v1_12_R1.chunkio.ChunkIOExecutor.syncChunkLoad(ChunkIOExecutor.java:16) ~[Spigot.jar:git-Spigot-5695bca-53fccdf]
      at net.minecraft.server.v1_12_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:137) ~[Spigot.jar:git-Spigot-5695bca-53fccdf]
      at net.minecraft.server.v1_12_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:120) ~[Spigot.jar:git-Spigot-5695bca-53fccdf]
      at net.minecraft.server.v1_12_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:116) ~[Spigot.jar:git-Spigot-5695bca-53fccdf]
      at net.minecraft.server.v1_12_R1.MinecraftServer.l(MinecraftServer.java:374) ~[Spigot.jar:git-Spigot-5695bca-53fccdf]
      at net.minecraft.server.v1_12_R1.MinecraftServer.a(MinecraftServer.java:338) ~[Spigot.jar:git-Spigot-5695bca-53fccdf]
      at net.minecraft.server.v1_12_R1.DedicatedServer.init(DedicatedServer.java:272) ~[Spigot.jar:git-Spigot-5695bca-53fccdf]
      at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:545) [Spigot.jar:git-Spigot-5695bca-53fccdf]
      at java.lang.Thread.run(Unknown Source) [?:1.8.0_121]
      Caused by: java.util.zip.ZipException: incorrect header check
      at java.util.zip.InflaterInputStream.read(Unknown Source) ~[?:1.8.0_121]
      at java.io.BufferedInputStream.fill(Unknown Source) ~[?:1.8.0_121]
      at java.io.BufferedInputStream.read(Unknown Source) ~[?:1.8.0_121]
      at java.io.DataInputStream.readByte(Unknown Source) ~[?:1.8.0_121]
      at net.minecraft.server.v1_12_R1.NBTCompressedStreamTools.a(NBTCompressedStreamTools.java:75) ~[Spigot.jar:git-Spigot-5695bca-53fccdf]
      at net.minecraft.server.v1_12_R1.NBTCompressedStreamTools.a(NBTCompressedStreamTools.java:53) ~[Spigot.jar:git-Spigot-5695bca-53fccdf]
      at net.minecraft.server.v1_12_R1.NBTCompressedStreamTools.a(NBTCompressedStreamTools.java:43) ~[Spigot.jar:git-Spigot-5695bca-53fccdf]
      at net.minecraft.server.v1_12_R1.RegionFileCache.d(RegionFileCache.java:87) ~[Spigot.jar:git-Spigot-5695bca-53fccdf]
      at net.minecraft.server.v1_12_R1.ChunkRegionLoader.loadChunk(ChunkRegionLoader.java:62) ~[Spigot.jar:git-Spigot-5695bca-53fccdf]
      at org.bukkit.craftbukkit.v1_12_R1.chunkio.ChunkIOProvider.callStage1(ChunkIOProvider.java:21) ~[Spigot.jar:git-Spigot-5695bca-53fccdf]
      ... 12 more
      [17:09:11 ERROR]: Cause of unexpected exception was
      java.util.zip.ZipException: incorrect header check
      at java.util.zip.InflaterInputStream.read(Unknown Source) ~[?:1.8.0_121]
      at java.io.BufferedInputStream.fill(Unknown Source) ~[?:1.8.0_121]
      at java.io.BufferedInputStream.read(Unknown Source) ~[?:1.8.0_121]
      at java.io.DataInputStream.readByte(Unknown Source) ~[?:1.8.0_121]
      at net.minecraft.server.v1_12_R1.NBTCompressedStreamTools.a(NBTCompressedStreamTools.java:75) ~[Spigot.jar:git-Spigot-5695bca-53fccdf]
      at net.minecraft.server.v1_12_R1.NBTCompressedStreamTools.a(NBTCompressedStreamTools.java:53) ~[Spigot.jar:git-Spigot-5695bca-53fccdf]
      at net.minecraft.server.v1_12_R1.NBTCompressedStreamTools.a(NBTCompressedStreamTools.java:43) ~[Spigot.jar:git-Spigot-5695bca-53fccdf]
      at net.minecraft.server.v1_12_R1.RegionFileCache.d(RegionFileCache.java:87) ~[Spigot.jar:git-Spigot-5695bca-53fccdf]
      at net.minecraft.server.v1_12_R1.ChunkRegionLoader.loadChunk(ChunkRegionLoader.java:62) ~[Spigot.jar:git-Spigot-5695bca-53fccdf]
      at org.bukkit.craftbukkit.v1_12_R1.chunkio.ChunkIOProvider.callStage1(ChunkIOProvider.java:21) ~[Spigot.jar:git-Spigot-5695bca-53fccdf]
      at org.bukkit.craftbukkit.v1_12_R1.chunkio.ChunkIOProvider.callStage1(ChunkIOProvider.java:1) ~[Spigot.jar:git-Spigot-5695bca-53fccdf]
      at org.bukkit.craftbukkit.v1_12_R1.util.AsynchronousExecutor.skipQueue(AsynchronousExecutor.java:336) ~[Spigot.jar:git-Spigot-5695bca-53fccdf]
      at org.bukkit.craftbukkit.v1_12_R1.util.AsynchronousExecutor.getSkipQueue(AsynchronousExecutor.java:295) ~[Spigot.jar:git-Spigot-5695bca-53fccdf]
      at org.bukkit.craftbukkit.v1_12_R1.chunkio.ChunkIOExecutor.syncChunkLoad(ChunkIOExecutor.java:16) ~[Spigot.jar:git-Spigot-5695bca-53fccdf]
      at net.minecraft.server.v1_12_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:137) ~[Spigot.jar:git-Spigot-5695bca-53fccdf]
      at net.minecraft.server.v1_12_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:120) ~[Spigot.jar:git-Spigot-5695bca-53fccdf]
      at net.minecraft.server.v1_12_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:116) ~[Spigot.jar:git-Spigot-5695bca-53fccdf]
      at net.minecraft.server.v1_12_R1.MinecraftServer.l(MinecraftServer.java:374) ~[Spigot.jar:git-Spigot-5695bca-53fccdf]
      at net.minecraft.server.v1_12_R1.MinecraftServer.a(MinecraftServer.java:338) ~[Spigot.jar:git-Spigot-5695bca-53fccdf]
      at net.minecraft.server.v1_12_R1.DedicatedServer.init(DedicatedServer.java:272) ~[Spigot.jar:git-Spigot-5695bca-53fccdf]
      at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:545) [Spigot.jar:git-Spigot-5695bca-53fccdf]
      at java.lang.Thread.run(Unknown Source)[?:1.8.0_121]

      This is the code for my plugin:

      main.java:

      package com.RedstoneSurvivor.SpigotPlugin;import org.bukkit.Bukkit;
      import org.bukkit.Location;
      import org.bukkit.Material;
      import org.bukkit.World;
      import org.bukkit.block.Block;
      import org.bukkit.command.Command;
      import org.bukkit.command.CommandSender;
      import org.bukkit.entity.Player;
      import org.bukkit.inventory.Inventory;
      import org.bukkit.inventory.ItemStack;
      import org.bukkit.plugin.PluginManager;
      import org.bukkit.plugin.java.JavaPlugin;public class Main extends JavaPlugin {@Override
      {{ public void onEnable() {}}

      {{ getLogger().info("Custom plugin has been enabled");}}
      {{ PluginManager pm = getServer().getPluginManager();}}
      {{ Listener listener = new Listener(this);}}
      {{ pm.registerEvents(listener, this);}}

      {{ }}}

      {{ @Override}}
      {{ public void onDisable() {}}

      {{ getLogger().info("Custom plugin has been disabled");}}

      {{ }}}

      {{ @SuppressWarnings("deprecation")}}
      {{ public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {}}

      {{ ItemStack item = new ItemSmith().buildWeapon1(1);}}
      {{ Player player =(Player) sender;}}

      {{ if (sender instanceof Player) {}}Inventory inv = player.getInventory();

      {{ String lowerCmd = cmd.getName().toLowerCase();}}

      {{ switch (lowerCmd) {}}

      {{ case "glow":}}

      {{ Location blockLoc1 = player.getLocation().add(0, 2, 0);}}

      {{ if (blockLoc1.getBlock().getType().equals(Material.AIR)) {}}

      {{ blockLoc1.getBlock().setType(Material.GLOWSTONE);}}
      {{ return true;}}

      {{ } else {}}

      {{ player.sendMessage("You must have air above you to use this command!");}}
      {{ return true;}}

      {{ }}}

      {{ case "jungle":}}

      {{ Location blockLoc2 = player.getLocation().add(2, 0, 0);}}

      {{ if (blockLoc2.getBlock().getType().equals(Material.AIR)) {}}

      {{ Block jungleBlock = blockLoc2.getBlock();}}
      {{ jungleBlock.setType(Material.LOG);}}
      {{ jungleBlock.setData((byte) 3);}}
      {{ return true;}}

      {{ } else {}}

      {{ player.sendMessage("You must have air to your side to use this command!");}}
      {{ return true;}}

      {{ }}}

      {{ case "netherport":}}

      {{ World nether = Bukkit.getServer().getWorld("world_nether");}}
      {{ Location loc1 = new Location(nether, -29, 52, -29);}}

      {{ player.teleport(loc1);}}
      {{ return true;}}

      {{ case "worldport":}}

      {{ World world = Bukkit.getServer().getWorld("world");}}
      {{ Location loc2 = new Location(world, -249, 68, 261);}}

      {{ player.teleport(loc2);}}
      {{ return true;}}

      {{ case "givesword":}}

      {{ int length = args.length;}}

      {{ switch (length) {}}

      {{ case 1:}}
      {{ if ( args[0].equalsIgnoreCase("2") ) {}}
      {{ new ItemSmith().buildWeapon1(1);}}
      {{ inv.addItem(item);}}
      {{ inv.addItem(item);}}
      {{ return true;}}
      {{ }}}
      {{ case 0:}}
      {{ new ItemSmith().buildWeapon1(1);}}
      {{ inv.addItem(item);}}
      {{ player.sendMessage("Your command was recognized");}}
      {{ default:}}
      {{ player.sendMessage("Your command was not recognized");}}
      {{ return true;}}

      {{ }}}

      {{ }}}

      {{ }}}

      {{ player.sendMessage("Your command was not recognized");}}
      {{ return true;}}

      {{ }}}

      }

      Listener.java:

      package com.RedstoneSurvivor.SpigotPlugin;import org.bukkit.Location;
      import org.bukkit.entity.Entity;
      import org.bukkit.entity.Player;
      import org.bukkit.event.EventHandler;
      import org.bukkit.event.entity.EntityDamageByEntityEvent;
      import org.bukkit.event.player.PlayerJoinEvent;
      import org.bukkit.inventory.ItemStack;public class Listener implements org.bukkit.event.Listener {//Constructor
      {{ public Listener(Main plugin) {}}

      {{ }}}

      {{ //EventHandler}}
      {{ @EventHandler}}
      {{ public void onPlayerJoin(PlayerJoinEvent event) {}}

      {{ Player player =(Player) event.getPlayer();}}

      {{ event.getPlayer().sendMessage("Welcome to RedstoneFace");}}

      {{ ItemStack item2 = new ItemSmith().buildWeapon2(1);}}

      {{ player.getInventory().addItem(item2);}}

      {{ }}}

      {{ @EventHandler}}
      {{ public void onPlayerDamage(EntityDamageByEntityEvent event) {}}

      {{ Entity entity =event.getEntity();}}

      {{ if ( entity instanceof Player) {}}

      {{ Player player = (Player) entity;}}
      {{ Location playerLoc = player.getLocation();}}
      {{ int min = -10;}}
      {{ int max = 10;}}
      {{ int range = max - min;}}
      {{ Location loc = playerLoc.add((int)(Math.random()*range)+min, 10, (int)(Math.random()*range)+min);}}

      {{ player.teleport(loc);}}

      {{ }}}

      {{ }}}

      }

      ItemSmith.java:

      package com.RedstoneSurvivor.SpigotPlugin;import java.util.ArrayList;import org.bukkit.ChatColor;
      import org.bukkit.Material;
      import org.bukkit.inventory.ItemFlag;
      import org.bukkit.inventory.ItemStack;
      import org.bukkit.inventory.meta.ItemMeta;public class ItemSmith {public ItemStack makeItem1(Material m, String name, String desc, int amount) {

      {{ ItemStack item = new ItemStack (m, 1);}}

      {{ //Creates the item's meta data (name, lore/description text, etc.)}}
      {{ ItemMeta im = item.getItemMeta();}}
      {{ im.setDisplayName(name);}}
      {{ //Creates the lore}}
      {{ ArrayList<String> lore =new ArrayList<String>(); }}
      {{ lore.add(desc);}}
      {{ im.setLore(lore);}}
      {{ //Hides the vanilla Minecraft tooltip text}}
      {{ im.addItemFlags(ItemFlag.HIDE_ENCHANTS);}}
      {{ im.addItemFlags(ItemFlag.HIDE_ATTRIBUTES);}}
      {{ //Sets theitem's meta data to the custom "im" meta data}}
      {{ item.setItemMeta(im);}}

      {{ return item;}}

      {{ }}}
      {{ public ItemStack buildWeapon1(int amount) {}}

      {{ Material m = Material.GOLD_SWORD;}}
      {{ String name = (ChatColor.GOLD + "" + ChatColor.BOLD + "Sword of King Midas");}}
      {{ String desc = (ChatColor.DARK_GRAY + "" + ChatColor.ITALIC + "The golden sword of King Midas!");}}

      {{ return makeItem1(m, name, desc, amount);}}

      {{ }}}
      {{ public ItemStack buildWeapon2(int amount) {}}

      {{ Material m = Material.PAPER;}}
      {{ String name = (ChatColor.GOLD + "Welcome to RedstoneFACE");}}
      {{ String desc = (ChatColor.DARK_GRAY + "Don't forget to read the rules in the House of Rules!");}}

      {{ return makeItem1(m, name, desc, amount);}}

      {{ }}}

      }

      Please help.

            Unassigned Unassigned
            RedstoneSurvivor Jacob Szczepanski
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: