SteamWar/MissileWars
Archiviert
13
0

Fix Missle Info

Dieser Commit ist enthalten in:
jojo 2020-09-18 18:56:46 +02:00
Ursprung ee2d6464b8
Commit d73d2cf9ab

Datei anzeigen

@ -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<BaseBlock> 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());
}
}