Coding help (Noob)

Discussion in 'Plugin Development' started by andrewginn, Oct 27, 2014.

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

    CraftCreeper6

    andrewginn
    It will tell you how to make an item stack, check the item stack and remove items.
     
  2. Offline

    andrewginn

    CraftCreeper6 I already know how to make a itemstack its just i dont know how to do playerinteractions and how to check if the specific item is in his hand, also how do i make the crates? These are all things i need to know

    CraftCreeper6 can you helpp? (Last message)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 14, 2016
  3. Offline

    mythbusterma

    andrewginn

    What is a crate? And you can do Player#getItemInHand() to find the ItemStack they're holding.
     
  4. Offline

    CraftCreeper6

    andrewginn
    Stop bumping, look at my Profile Picture. I am not.
     
  5. Offline

    andrewginn

    mythbusterma A crate is a chest which has a chance to give you something random and i dont know how to make one with a random chance to get certain types of things. If you can help that would be great
     
  6. Offline

    mythbusterma

    andrewginn

    You can use Math.Random to get random numbers to use in generation, and random floats are good for percentages.
     
  7. Offline

    andrewginn

    Sweet mythbusterma can i add you on skype since i need help?

    mythbusterma im good with math.random but not with random flloats, the floats sound like the things i need

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 14, 2016
  8. Offline

    es359


    It's like an Event.

    //Example.

    Code:java
    1. @EventHandler
    2. public void onPlayerVote(VotifierEvent event){
    3.  
    4. Vote v = event.getVote();
    5. Player p = Bukkit.getServer().getPlayer(v.getUsername());
    6.  
    7. }
     
  9. Offline

    CraftCreeper6

    es359
    Ah, awesome! Thanks :)
     
  10. Offline

    andrewginn

    @es459 we are speaking about the random floats atm
     
  11. Offline

    mythbusterma

  12. Offline

    es359

    I was correcting something that CraftCreeper said.
     
  13. Offline

    andrewginn

  14. Offline

    mythbusterma

Thread Status:
Not open for further replies.

Share This Page