diff --git a/src/de/steamwar/misslewars/items/Missile.java b/src/de/steamwar/misslewars/items/Missile.java index 38cbf5f..a0e428a 100644 --- a/src/de/steamwar/misslewars/items/Missile.java +++ b/src/de/steamwar/misslewars/items/Missile.java @@ -22,7 +22,6 @@ package de.steamwar.misslewars.items; import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.WorldEdit; import com.sk89q.worldedit.bukkit.BukkitWorld; -import com.sk89q.worldedit.extension.input.ParserContext; import com.sk89q.worldedit.extent.clipboard.Clipboard; import com.sk89q.worldedit.extent.clipboard.io.ClipboardFormat; import com.sk89q.worldedit.extent.clipboard.io.ClipboardFormats; @@ -32,6 +31,8 @@ import com.sk89q.worldedit.math.transform.AffineTransform; import com.sk89q.worldedit.session.ClipboardHolder; import com.sk89q.worldedit.world.World; import com.sk89q.worldedit.world.block.BaseBlock; +import com.sk89q.worldedit.world.block.BlockState; +import com.sk89q.worldedit.world.block.BlockTypes; import de.steamwar.misslewars.MissileWars; import org.bukkit.Bukkit; import org.bukkit.Location; @@ -44,7 +45,6 @@ import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.util.*; -import java.util.logging.Level; public class Missile extends SpecialItem { @@ -53,10 +53,9 @@ public class Missile extends SpecialItem { private static Set tnt = new HashSet<>(); static { - try { - tnt = WorldEdit.getInstance().getBlockFactory().parseFromListInput("49", new ParserContext()); - } catch (Exception e) { - Bukkit.getLogger().log(Level.SEVERE, e.getMessage(), e.getCause()); + BlockState blockState = BlockTypes.TNT.getDefaultState(); + if (blockState != null) { + tnt.add(blockState.toBaseBlock()); } }