How to get default breaking time of block

Discussion in 'Plugin Development' started by Lolmewn, Feb 28, 2012.

Thread Status:
Not open for further replies.
  1. Offline

    Lolmewn

    Hi!
    I have a question. How do I get the default breaking time of a block?
    If possible with the item it's holding. Is it in one of the net.minecraft classes? (I know, I shouldn't be using those, but if Bukkit doesn't have something for this built-in then I'm forced to use this).

    Thanks.
     
  2. Offline

    Neodork

    Now I'm not going to work this out but:

    BlockBreakEvent +

    PHP:
    public String getDate() {
            
    //DO NOT TOUCH
            
    Calendar calendar Calendar.getInstance();
     
            
    DateFormat dateFormat = new SimpleDateFormat("MM/dd/yyyy hh:mm a");
     
       
     
            
    String time dateFormat.format(calendar.getTime());
     
       
     
            return 
    time;
     
        }
    + Player.getItemInHand?
     
  3. Offline

    Lolmewn

    Neodork
    First of all, thanks for replying to my question. This however, was not quite what I was looking for..
    Is there any bukkit method (or net.minecraft) which is something like block.getBreakingTime()?
    If there's no such thing, is there maby a hardness sent with Packets that I can use?

    How does Minecraft itself do it?
     
  4. Offline

    Neodork

    Not that I know of maybe some others might...
     
  5. Offline

    dead4y

    may be with a lot of coding...Whatever i don't know how i can't help.
     
Thread Status:
Not open for further replies.

Share This Page