From 1b21eb2af14ca1a087f831e48414913edeabd036 Mon Sep 17 00:00:00 2001 From: jojo Date: Fri, 18 Sep 2020 21:29:10 +0200 Subject: [PATCH] Fix Missle Info --- src/de/steamwar/misslewars/items/Missile.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/de/steamwar/misslewars/items/Missile.java b/src/de/steamwar/misslewars/items/Missile.java index d8664ce..e721375 100644 --- a/src/de/steamwar/misslewars/items/Missile.java +++ b/src/de/steamwar/misslewars/items/Missile.java @@ -22,6 +22,7 @@ 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.extent.clipboard.BlockArrayClipboard; import com.sk89q.worldedit.extent.clipboard.Clipboard; import com.sk89q.worldedit.extent.clipboard.io.ClipboardFormat; import com.sk89q.worldedit.extent.clipboard.io.ClipboardFormats; @@ -131,12 +132,13 @@ public class Missile extends SpecialItem { private int count() { int tntCount = 0; - BlockVector3 dimensions = clipboard.getDimensions(); - Bukkit.getLogger().log(Level.SEVERE, clipboard.getBlock(BlockVector3.at(0, 0, 0)).getBlockType().toString()); + BlockArrayClipboard arrayClipboard = (BlockArrayClipboard)clipboard; + BlockVector3 dimensions = arrayClipboard.getDimensions(); + Bukkit.getLogger().log(Level.SEVERE, arrayClipboard.getBlock(BlockVector3.at(0, 0, 0)).getBlockType().toString()); for (int x = 0; x < dimensions.getX(); x++) { for (int y = 0; y < dimensions.getY(); y++) { for (int z = 0; z < dimensions.getZ(); z++) { - if (clipboard.getBlock(BlockVector3.at(x, y, z)).getBlockType() == TNT) { + if (arrayClipboard.getBlock(BlockVector3.at(x, y, z)).getBlockType() == TNT) { tntCount++; } }