Fix Missle Info
Dieser Commit ist enthalten in:
Ursprung
349948dfda
Commit
d6e6a6f3fe
@ -69,6 +69,14 @@ public class Missile extends SpecialItem {
|
|||||||
if (!material.endsWith("_SPAWN_EGG")) material += "_SPAWN_EGG";
|
if (!material.endsWith("_SPAWN_EGG")) material += "_SPAWN_EGG";
|
||||||
Material itemType = Material.valueOf(material);
|
Material itemType = Material.valueOf(material);
|
||||||
|
|
||||||
|
ClipboardFormat format = ClipboardFormats.findByFile(missileFile);
|
||||||
|
try {
|
||||||
|
assert format != null;
|
||||||
|
clipboard = format.getReader(new FileInputStream(missileFile)).read();
|
||||||
|
} catch (IOException e) {
|
||||||
|
throw new SecurityException("Corrupt missile");
|
||||||
|
}
|
||||||
|
|
||||||
List<String> lore = new ArrayList<>();
|
List<String> lore = new ArrayList<>();
|
||||||
if (strings.length > 2) {
|
if (strings.length > 2) {
|
||||||
try {
|
try {
|
||||||
@ -95,14 +103,6 @@ public class Missile extends SpecialItem {
|
|||||||
lore.add("§7TNT §8: §e?");
|
lore.add("§7TNT §8: §e?");
|
||||||
}
|
}
|
||||||
|
|
||||||
ClipboardFormat format = ClipboardFormats.findByFile(missileFile);
|
|
||||||
try {
|
|
||||||
assert format != null;
|
|
||||||
clipboard = format.getReader(new FileInputStream(missileFile)).read();
|
|
||||||
} catch (IOException e) {
|
|
||||||
throw new SecurityException("Corrupt missile");
|
|
||||||
}
|
|
||||||
|
|
||||||
item = new ItemStack(itemType, 1);
|
item = new ItemStack(itemType, 1);
|
||||||
ItemMeta meta = item.getItemMeta();
|
ItemMeta meta = item.getItemMeta();
|
||||||
assert meta != null;
|
assert meta != null;
|
||||||
@ -137,15 +137,6 @@ public class Missile extends SpecialItem {
|
|||||||
|
|
||||||
private int count() {
|
private int count() {
|
||||||
int tntCount = 0;
|
int tntCount = 0;
|
||||||
if (!logged) {
|
|
||||||
Bukkit.getLogger().log(Level.SEVERE, clipboard.toString());
|
|
||||||
Bukkit.getLogger().log(Level.SEVERE, clipboard.getDimensions().toString());
|
|
||||||
Bukkit.getLogger().log(Level.SEVERE, clipboard.getRegion().toString());
|
|
||||||
Bukkit.getLogger().log(Level.SEVERE, clipboard.getMinimumPoint().toString());
|
|
||||||
Bukkit.getLogger().log(Level.SEVERE, clipboard.getMaximumPoint().toString());
|
|
||||||
Bukkit.getLogger().log(Level.SEVERE, clipboard.getBlock(BlockVector3.at(0, 0, 0)).toString());
|
|
||||||
}
|
|
||||||
logged = true;
|
|
||||||
BlockArrayClipboard arrayClipboard = (BlockArrayClipboard)clipboard;
|
BlockArrayClipboard arrayClipboard = (BlockArrayClipboard)clipboard;
|
||||||
BlockVector3 dimensions = arrayClipboard.getDimensions();
|
BlockVector3 dimensions = arrayClipboard.getDimensions();
|
||||||
for (int x = 0; x < dimensions.getX(); x++) {
|
for (int x = 0; x < dimensions.getX(); x++) {
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren