Need help... Big Time!

Discussion in 'Plugin Development' started by DerpyMan, Feb 23, 2014.

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

    DerpyMan

    Code:java
    1. package me.AceAwesome13.Basketball;
    2.  
    3. import java.awt.Desktop.Action;
    4.  
    5. import net.minecraft.server.v1_7_R1.Item;
    6. import net.minecraft.server.v1_7_R1.ItemStack;
    7. import net.minecraft.server.v1_7_R1.World;
    8.  
    9. import org.bukkit.Material;
    10. import org.bukkit.entity.Entity;
    11. import org.bukkit.entity.Player;
    12. import org.bukkit.event.EventHandler;
    13. import org.bukkit.event.player.PlayerInteractEvent;
    14. import org.bukkit.plugin.java.JavaPluginLoader;
    15. import org.bukkit.scheduler.BukkitRunnable;
    16.  
    17. public class Main extends JavaPluginLoader
    18.  
    19. @EventHandler
    20. public void clayballBasketball(PlayerInteractEvent event) {
    21. Player player = event.getPlayer();
    22. org.bukkit.World world = player.getWorld();
    23. if (player.getItemInHand().getType() == Material.CLAY_BALL) {
    24. if (event.getAction() == Action.LEFT_CLICK_AIR || event.getAction() == Action.RIGHT_CLICK_AIR) {
    25. final Item basketball = world.dropItem(player.getEyeLocation(), new ItemStack());
    26. Entity clayball;
    27. clayball.setVelocity(player.getEyeLocation().getDirection());
    28. new BukkitRunnable(){
    29. public void run(){
    30. );
    31. }
    32. }.runTaskLater(plugin, 100L);
    33. }
    34. }
    35. }
    36. }

    I was a trying to make a plugin that you can simply throw a clayball but there are many errors and I don't know how to fix. I got some coding from a post that want to throw something but it was a slime ball. Please Help me!
     
  2. Offline

    1Rogue

    badboystee likes this.
  3. Offline

    DerpyMan

    Alright, Can you delete this fourm or lock it. Thank you
     
  4. Offline

    badboystee

    Yea diffently learn Java first otherwise you don't have a clue when it comes fo Arrays and Strings Loops and everything so Once you've learned Java gettin Craftbukkit and making plugins will be easy :)
     
Thread Status:
Not open for further replies.

Share This Page