Solved Dont know what to do!!!???

Discussion in 'Plugin Development' started by Neriesta, Dec 17, 2013.

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

    Neriesta

    Hey guys im developing a plugin and i dont know what to typ at this place

    ?????.getPlayer().addPotionEffect(PotionEffectType.FAST_DIGGING);


    This is the whole script

    package me.Neriesta.testplugin;
    import org.bukkit.command.Command;
    import org.bukkit.command.CommandExecutor;
    import org.bukkit.command.CommandSender;
    import org.bukkit.entity.Player;
    import org.bukkit.event.player.PlayerInteractEntityEvent;
    import org.bukkit.potion.PotionEffectType;
    public class DwergCommandExecutor implements CommandExecutor {

    @Override
    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] arg3) {
    if (sender instanceof Player) {
    Player player = (Player) sender;
    ?????.getPlayer().addPotionEffect(PotionEffectType.FAST_DIGGING);

    } else {
    sender.sendMessage("You must be a player!");
    return false;
    }

    return false;
    }
    }

    i want to make it so that when somewhan had used the command /dwerg
    they get FAST DIGGING like forever....
    but i dont know what to typ ad the ???? place
     
  2. Offline

    The_Doctor_123

    I'm not sure what to say here..

    Actually, yes I do. Do you know Java?
     
    spoljo666 likes this.
  3. Offline

    tommycake50

    player.addPotionEffect(PotionEffectType.FAST_DIGGING.createEffect(Integer.MAX_VALUE, 4));
    Copy that exact code.
     
  4. Offline

    The_Doctor_123

    tommycake50
    Nice.. Now we'll have to wait until the next thread he makes in about 5 minutes to tell him he needs to learn Java. Oops, did my thoughts slip into the forums?
     
    Rocoty, tommycake50 and Garris0n like this.
  5. Offline

    Neriesta

    im sorry tommycake but im just started and dont know anything rightnow -,-
     
  6. Offline

    tommycake50

    Heres a word of advice.
    Don't just start learning Bukkit, learn Java first, At least a quarter-half of the language.
    It will save a lot of headaches.
     
    Max_The_Link_Fan and Garris0n like this.
  7. Offline

    malandrix_bunny

  8. Offline

    The_Doctor_123

    tommycake50
    Looks like I jumped to a conclusion too soon..

    Neriesta
    Please learn Java before attempting to learn a 3rd party API like Bukkit.
     
    Garris0n likes this.
  9. Offline

    Neriesta

    yes i know i am reading a java book right now
    but i just was testing some things
     
  10. Offline

    The_Doctor_123

    Neriesta
    Great! Practice is a key to success. But until you become comfortable enough, you should work with console applications.
     
  11. Offline

    Neriesta

    console applications?
     
  12. Offline

    The_Doctor_123

    Neriesta
    Yeah, like printing to the console in a program.
     
  13. Offline

    HyrulesLegend

    Such as the ever famous, "Hello World!"
     
  14. Offline

    doubleboss00

    Code:java
    1. System.out.println("Hello Bukkit Forums!");
     
  15. Offline

    Neriesta

    ooooh but you guys did not see the main class
    in the main class i have that
     
  16. Offline

    HyrulesLegend


    *
    Code:java
    1. System.out.println("Hello World!");
     
Thread Status:
Not open for further replies.

Share This Page