Coding help (Noob)

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

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

    andrewginn

    Hello does anyone know how to turn this into coding as i am a noob at this and ive only just started learning, thanks it will help alot.

    What you do is you create an itemstack with a tripwire hook called with the name ChatColor.RED+"Vote Key"

    then with the player interact event if he right clicks an enderchest then check if the item in his hand is a tripwire hook AND if the itemmeta display name is equal to ChatColor.RED+"Vote Key" and then you create a Random + the stuff you want them to receive
     
  2. Offline

    CraftCreeper6

    andrewginn
    The Bukkit API is your favourite place. By the way, no one is going to spoonfeed you :)
     
    FerusGrim likes this.
  3. Offline

    FerusGrim

    We like to see some sort of effort put forth, before helping someone out.

    If you want us to write that code for you, take it to Plugin Requests. If you want us to HELP you, program what you can, and we'll try to help fill in the gaps.

    But, really, if you're new to programming Java, or programming in general, do NOT start with the Bukkit API. Learn the language using standard use-cases. Write your own programs, make a scrolling game. Anything. But don't start by relying on an API.
     
  4. Offline

    andrewginn

    FerusGrim if your not gonna say something helpful dont say anything at all...
     
  5. Offline

    CraftCreeper6

    es359 likes this.
  6. Offline

    FerusGrim


    I was being helpful. It's, for most, a mistake to learning to program with an API. Imagine trying to learn Spanish, by watching Mexican soap operas.
     
  7. andrewginn Lookup on youtube Triiz MC, he's doing updated tutorials and just started the series :) But I reccomend learning a little Java tooooooo :p
     
  8. Offline

    CraftCreeper6

    TheGamesHawk2001
    YouTube. Stop. Now. You will gain bad habits from YouTube, like using getLogger _._. Just... Read the Bukkit API if you want to learn Bukkit. I highly recommend andrewginn to learn Java first...
     
  9. Offline

    FerusGrim

    CraftCreeper6
    Code:java
    1. Logger logger = Logger.getLogger("Minecraft");
    y am i in hell pls?
     
    es359 likes this.
  10. Offline

    CraftCreeper6

    es359 likes this.
  11. 'But I reccomend learning a little Java tooooooo' and what would you do if a Bukkit admin etc started started doing Bukkit tutorials, 'ey, would you be complaining then? Learning from the creators of bukkit. No. So stop being so stereotypical about YouTube.
     
  12. Offline

    FerusGrim

    CraftCreeper6
    Code:java
    1. public void onEnable() {
    2. PluginDescriptionFile pdf = getDescription();
    3. Logger.getLogger("Minecraft").log(Level.SEVERE, "Mai plugin is active version" + pdf.getVersion());
    4. }

    no pls stahp
     
  13. Offline

    CraftCreeper6

    TheGamesHawk2001
    Sorry, what? The Bukkit admins can also be wrong, not saying there is anything wrong with it. I just recommend Java before Bukkit. I saw your post. Although, in your post you also added: "Lookup on youtube Triiz MC," in which I replied: "I highly recommend @andrewginn to learn Java first...", what is your issue with my reply?
     
  14. Offline

    mythbusterma

    TheGamesHawk2001

    "Stereotypical," I haven't laughed that hard in days, thanks for the laugh. Never once have a seen a halfway decent YouTube tutorial, and learning Java first is imperative to trying to use the Bukkit API, try again with your half-baked argument.
     
    es359 and FerusGrim like this.
  15. Offline

    CraftCreeper6

    FerusGrim
    pls, i ned this codes for my minigame i dnt know hw to codes pls give me it. I gt to ere:
    Code:java
    1. public class main implements Listener {
    2. public void onenable(){
    3. Logger l = Logger.getLogger("MC");
    4. l.log("my plugin wrks");
    5. }
    6. }


    That it tnx

    EDIT: Notice my errors?? Them YouTube habits :)
     
    korikisulda, es359 and FerusGrim like this.
  16. Offline

    FerusGrim


    No, we wouldn't. YouTube where it concerns Bukkit development, especially tutorials, tends to draw in people who don't know the reasons behind certain things. Mostly just people who learned how to program a simple plugin, and say, "Hey, I should show everyone else!" And they do.

    But they don't understand. They know the Bukkit API (kind of), but don't know Java. The reason we're so against this is because it spreads bad habits. And as people who stick around this forum and help people, it makes our jobs (albeit, completely volunteer, but a task nonetheless) harder.

    We're here because we enjoy helping people. But it's such a pain in the ass to have to tell people over and over and over and fucking over not to do shit that they wouldn't have learned if not from some YouTube video by someone who supposedly knows what the hell they're talking about!
     
    97WaterPolo and CraftCreeper6 like this.
  17. Offline

    andrewginn

    CraftCreeper6 i have learnt java: methods, variables all that stuff and how to use them. I have made this from a tutorial and it still wont load?!? I think it might be something which im missing, or there is an error, if there is can you help me to solve it?
    FerusGrim
     
  18. Offline

    CraftCreeper6

  19. mythbusterma I have only seen 1 youtuber use logger etc for onEnable and that's BCBroz and it's like 2 1/2 years old.
     
  20. Offline

    FerusGrim

    -eye twitch-
     
    es359 and CraftCreeper6 like this.
  21. Offline

    CraftCreeper6

    TheGamesHawk2001
    Any other habits you spot in every YouTube video? E.G: Overuse of Static?
     
  22. Logger isn't wrong, just people prefers to use something different.

    Isn't static when you use multiple classes...

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

    FerusGrim

    I'm restraining myself from overriding my point by insulting you. Suffice it to say, you're entirely, irrevocably wrong.

    Using the static method to get the Minecraft logger is wrong. Mostly because it's a System logger, instead of the logger for your specific plugin. But also because it's bad practice, and there's a method to get your plugin logger already in the class that you're extending.

    JavaPlugin#getLogger returns the logger for your plugin.

    Server#getLogger returns the logger for Bukkit.
     
  24. Offline

    andrewginn

  25. Offline

    CraftCreeper6

    TheGamesHawk2001
    No. You would use a constructor of some sort. If you are always using static in your plugins. Delete them.
    Read this

    andrewginn
    Stop using it
    http://prntscr.com/509zk4
    Uncapitalised Main class...

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

    FerusGrim

  27. I dont use static yet, since I haven't got into that yet. Furthermore, I have neither used getLogger due to the fact I have never come accross a circumstance I would want to use it and a tutorial / documentation that has used it.
     
  28. Offline

    FerusGrim

    TheGamesHawk2001
    You realize how silly you sound, right? Why are you here defending someone from us telling him to teach himself Java, when you obviously don't understand Java, either?
     
  29. Offline

    andrewginn

    TheGamesHawk2001 this is my thread not yours so stop asking for help and post a thread yourself, FerusGrim i have added the override above the public void, CraftCreeper6 I do not understand what you are trying to say in the picture, are you telling me to get rid of the 'JavaPlugin' Part?
     
  30. Offline

    CraftCreeper6

    Sorry, thought you had never come across it in a tutorial.

    andrewginn
    No, don't remove the extends JavaPlugin. Simply rename the class to "Main" rather than "main".

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 14, 2016
Thread Status:
Not open for further replies.

Share This Page