From 443a3ca3291153b03d99be81efbc945cf6c74ba1 Mon Sep 17 00:00:00 2001 From: Mochaccino Date: Mon, 18 Mar 2013 20:14:31 +0100 Subject: [PATCH] getPumpkin Methode --- .../java/de/craftinc/replicator/Replicator.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/main/java/de/craftinc/replicator/Replicator.java b/src/main/java/de/craftinc/replicator/Replicator.java index 0f1d80b..eeaadd2 100644 --- a/src/main/java/de/craftinc/replicator/Replicator.java +++ b/src/main/java/de/craftinc/replicator/Replicator.java @@ -19,6 +19,7 @@ package de.craftinc.replicator; import org.bukkit.Location; import org.bukkit.block.BlockFace; +import org.bukkit.Material; import org.bukkit.entity.Player; import java.util.ArrayList; @@ -79,4 +80,20 @@ public class Replicator { return false; } + + private ArrayList getPumpkin(Location currentBlock){ + ArrayList pumpkins = new ArrayList(); + Location nextBlock; + for(int x=-1;x<=1;x++){ + for(int y=-1;y<=1;y++){ + for(int z=-1;z<=1;z++){ + nextBlock = currentBlock.getBlock().getRelative(x,y,z).getLocation(); + if(nextBlock.getBlock().getType().equals(Material.JACK_O_LANTERN)) pumpkins.add(nextBlock); + } + } + } + return pumpkins; + } + + }