• 0

    posted a message on Having a problem with my plugin
    Yea I actually made
    Quote from WingsOfLife

    Though this isn't quite the place for bukkit modding, it appears your armed variable is global therefore causing all chests in the world to become armed and unarmed. (Im no bukkit modder though.)


    Yea I actually made some other adjustments right now so that the each unique chest is an index in an ArrayList as well as a seperate ArrayList to keep track of a counter for the matching index so that when the number is odd it will arm the bomb and when it is even it will disarm it. I just don't know what I am doing wrong.
    Posted in: Modification Development
  • 0

    posted a message on Having a problem with my plugin
    Well I seem to have everything else working pretty well. What this does is it makes a chest that is capable of exploding when opened if it is armed. However, I am having a problem with the arming and disarming part. The first time the chest is placed down, it is already armed when it is not suppose to be. Also, I do not get the message whether or not it is armed or disarmed. Instead, it only records it through the variable. I feel like I have one part of it that is backwards that is throwing everything off or something like that.

    Here is the code:

    package Alexiades.John.ChestBomb;
    import java.util.ArrayList;
    import java.util.logging.Logger;
    import org.bukkit.ChatColor;
    import org.bukkit.Location;
    import org.bukkit.Material;
    import org.bukkit.World;
    import org.bukkit.block.Block;
    import org.bukkit.entity.Player;
    import org.bukkit.event.EventHandler;
    import org.bukkit.event.Listener;
    import org.bukkit.event.block.Action;
    import org.bukkit.event.player.PlayerInteractEvent;
    import org.bukkit.plugin.java.JavaPlugin;
    public class Main extends JavaPlugin implements Listener{
    
    private boolean armed;
    private ArrayList<Location> chestList = new ArrayList<Location>();
    private ArrayList<Integer> countList = new ArrayList<Integer>();
    private int counter = 0;
    private int index;
    
    public final Logger log = Logger.getLogger("Minecraft");
    public void onEnable(){
    log.info(ChatColor.GREEN + "ChestBomb plugin is enabled!");
    getServer().getPluginManager().registerEvents(this, this);
    }
    
    public void onDisable(){
    log.info(ChatColor.RED + "ChestBomb plugin is disabled!");
    }
    
    @EventHandler
    	 public void onPlayerChestOpen(PlayerInteractEvent event)
    	 {
    		 Action action = event.getAction();
    		 Block clicked = event.getClickedBlock();
    		
    		 Location blockLocation = clicked.getLocation();
    	
    		
    		 Player player = event.getPlayer();
    		 World world = player.getWorld();
    		
    						
    		
    	
    		
    		
    		 if (action == Action.LEFT_CLICK_BLOCK)
    		 {
    		
    			 if((clicked.getType() == Material.CHEST) || (clicked.getType() == Material.ENDER_CHEST))
    			 {
    			
    			 chestList.add(blockLocation);
    			
    			 // CHESTLIST CHECKER
    			 for(int i = 0; i < chestList.size(); i++)
    			
    			 if(chestList.get(i) == blockLocation)
    			 index = i;
    			 // else
    			 // index = -1;
    			
    			 // *****************
    			
    			
    			 // COUNTER CHECKER
    			
    			 if(counter % 2 != 0)
    			 armed = true;
    			 else
    			 armed = false;
    			
    			 counter++;
    			
    			 countList.set(index, counter);
    			
    			 // ****************
    			
    			
    			
    				 if(armed == true){
    			 player.sendMessage("This chest is now" + ChatColor.RED + " armed!");			
    				 }
    				 if(armed == false){
    				 player.sendMessage("This chest is now" + ChatColor.GREEN + " disarmed!");
    				 }
    			
    			 }
    			 else{ }
    		 }
    		 else{ }
    		
    		
    		 if(action == Action.RIGHT_CLICK_BLOCK){
    		 if((clicked.getType() == Material.CHEST) || (clicked.getType() == Material.ENDER_CHEST)){
    		 if(armed == true){
    			 world.createExplosion(blockLocation, 4.0F);
    			 chestList.remove(index);
    			 countList.remove(index);
    			
    			
    		 }
    		 }
    		 }
    	 }
    	
    	
    	 }


    Any help is greatly appreciated!
    Posted in: Modification Development
  • 0

    posted a message on Need Additional People for Survival Server
    There is a few of us now but we are like for about three or four more people. If you wan't to be a part in making this survival server you can add joshmathis22 on PSN since he hosts and you can add me my PSN is johngianni.

    Having a microphone and being mature are also pretty important.
    Posted in: MCPS3: Looking For
  • 0

    posted a message on Survival Multiplayer Group
    I just sent in my application.
    Posted in: MCPS3: Looking For
  • 1

    posted a message on PS3 Having to buy Minecraft ALL OVER AGAIN!
    This just seems like a personal problem, not really any support to be given..
    Posted in: MCPS3: Discussion
  • 0

    posted a message on Would you snuggle with the above avatar?
    No.
    Posted in: Forum Games
  • 0

    posted a message on Would you use the above avatar as a pillow?
    A creeper as a pillow. As long as it doesn't explode.
    Posted in: Forum Games
  • 0

    posted a message on Increase amount off mobs spawning in
    Quote from Wormadam

    For Enderman, play on hard and get a diamond sword with looting. Breed animals and make a farm A.S.A.P

    This is the way to go. This is what makes the game challenging. They probably also limit the amount of mobs to make the game more efficient or something. Like they have a set amount of mobs in a certain region.
    Posted in: MCPS3: Suggestions
  • 1

    posted a message on No End portal?
    Quote from J_L_K_64

    just so you know, the ender eye thing, it doesn't lead you directly to the end portal, it leads to the HUGE dungeon area that houses the end portal, it's up to you to find the end portal, if there's a dungeon, there is an end portal, HOWEVER the portal may be seperated from the rest of the dungeon area (mine was seperated by a wall of smooth stone 3 blocks thick, i got lucky and found it though by mining some iron ore)

    Yea basically the dungeon you are referring to is the stronghold. You just need the materials which are the eyes of ender which sum up to 12 total which will allow you to create the portal. :)
    Posted in: MCPS3: Discussion
  • 0

    posted a message on Disappearing map
    That is just a chunk error. Every map I have been in has this it just the way the map loads. They will probably fix it eventually. Just don't jump in it lol cause I thought it would push me back and I suffocated in it after a minute lol.
    Posted in: MCPS3: Discussion
  • 0

    posted a message on Whats disturbing about the above profile pic?
    Whats disturbing is what she is wearing
    Posted in: Forum Games
  • 0

    posted a message on What would you do if you just woke up in a room and saw the above avatar naked?
    Not sure what to think about that. Would probably run away.
    Posted in: Forum Games
  • 0

    posted a message on Looking for players to play Survival! :)
    Hey if you want feel free to add me my psn is johngianni.
    Posted in: MCPS3: Looking For
  • 0

    posted a message on Huge minecraft city being switched to servival to live/play with other players
    Quote from bigd021191

    im going to work not but im going to be on in a few hours. and i will leave it open all night for you guys to come and check it out. thanks for the adds!

    I will probably go on later tonight. Also if you need help adding more stuff to it I can help since I like to build.
    Posted in: MCPS3: Looking For
  • 0

    posted a message on KEYBOARD?
    What kind of keyboard is it? Is it wired or wireless? Also for switching the game modes, just like what Geneo said, you can't switch the game mode directly on the PS3 this works for the PC through a simple command. I am guessing the PS3 version will eventually make this sooner or later.
    Posted in: MCPS3: Discussion
  • To post a comment, please .