} else { help

Discussion in 'Plugin Development' started by iiHeroo, Sep 19, 2013.

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

    JPG2000

    iiHeroo You honostly don't know java if you need help with body statements. Also, why do you even have the mine craft global logger variable at the top? You don't use it once (my guess is that you copied from a tutorial, maybe TheBcBroz, and you just copy the code then you put yours in the center).

    What you did, is long, but its repeating the same thing a million times. The only thing you used in code is if statements, strings and variables(nothing advanced).

    Also, I could probally redo that code in 80 or less lines. You did it in a very bulky way. Also, if your using the variable only once, that why do you even make it then?

    The things being said above, concludes that you don't know java (completely).

    That being said, the fourms isn't a place to argue weather people know java or not. Im doing it because I have a competitive nature and I like being right :D. Were going to try to help you with bukkit troubles and issues. With what I said above, people are telling you you don't know java (you don't :D) because it makes people angry, how stupid your mistakes are, and how easy there are to fix (google!).


    Now, with all that said, does your code have any errors that you need help with?
     
    The_Doctor_123 likes this.
  2. Offline

    DrTURTLE2

    iiHeroo

    Wait, so you were asking for what was wrong when you never even made a command to send you the message, yet you make a plugin with commands in it?
     
  3. Offline

    iiHeroo



    Thanks for the kind responses, and no, it's not from the TheBcBroz, yes, I watched their one video once for their config, but I didn't use it, and like I said, I coded this within 2 weeks of programming, and I've redone the code since then, completely, here's my new code, kinda like what I did above, repeats the same thing over and over, but thats the thing with the plugin, it's just a basic plugin, do you guys expect me to know a lot about Java and the Bukkit code since late August ? If so, I don't. I know I did kind of took it offensive and all, or in the wrong way, and I'm sorry for that, and I know I need to know more, and I do know Java, but not everything, not a lot of it, just some of it, but you guys don't need to keep saying that over & over, when you already said it, yes, I know I should know a little more, and like you said, you usually post a link, and it'd be kind if you posted a link so I can learn more, like you said, you want to help me improve, show that you will, prove yourselves, and I know I should've apologized longer ago, but I dunno. Before commenting, I really should stop scanning and start fully reading, with what JPG2000 said "you don't know Java (completely)". But like, I want to learn it a different way, than other people, yes, when I have an issue, I try fixing it myself, but when I get fully confused, I usually go looking around for threads if I made an error, or google, if someone had a similar issue. Else I come looking here, yes, I know I could know more, but some of you might have this issue as well, none of my friends code, or even find anything interesting in computers, besides my cousin who builds computers, but it's not like he know's Java.

    And no, I have no issues with my current code.
    And yes, I did take it in the wrong way. And I apologize for that. I'm sorry for the issues I've caused.


    Are you talking about that long list of code I just posted ? That worked fine. If you're talking about the first post, by me, asking for help, what happened was, when I didn't have the permission, it just said "No permission , blah blah blah." But when I had permission, it'd send both messages, saying the stuff from the config, and the "No permission, blah, blah"

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

    DrTURTLE2

    iiHeroo

    Ah, I didn't read your post completely.. Sorry :p
     
  5. Offline

    JPG2000

    iiHeroo Okay, thanks for your big response. I appreciate it.

    I think the best thing to do is just to plain agree "I don't know java" because it will make some people shut up.

    I honsotoly think you just need to admit it, and say that you need to learn more. The things that you were having trouble with (else statements, or body statements) are java's backbones, and there super simple. Yet you have an don't understand it enough to create a thread on it?


    You haven't caused any issues, and I like your response. If you need any more help, just ask (we'll try to handle this better if it happens again. Well, i'll try :D)
     
    Rocoty likes this.
  6. Offline

    The_Doctor_123

    iiHeroo
    I'm glad you finally see that we're just trying to help you. :)

    All we're trying to say is is that you would be greatly benefited by properly knowing the syntax of Java(and know OOP, if you don't already). There's just a couple concerns with you learning the Bukkit API alongside Java. You can possibly get what is real Java and Bukkit confused. Secondly, it makes the process much more confusing and stressful. In order for your things to work, you need to understand BOTH Java and Bukkit. It's just not so easy to do.

    I just want you to learn the very basics. Now, when I say very basics, I mean very basics. When I first got into Bukkit, I didn't even know how to make an array, much less any utilities provided in the Java API. I did actually learn most of the fancy things I know just from coding Bukkit plugins. So just fool around with stuff you know you need more understanding in, like maybe if statements, methods, and most importantly, OOP. From my experience, I can tell you that you would learn A LOT from the book Java For Dummies. It's a very good book to buy. It also would benefit you greatly to have a friend on Skype or something that can answer your Java questions, because I know that would've been really nice when I was learning..
     
  7. Offline

    Appljuze

    iiHeroo

    Yay for happy endings :D

    It's very important to at least know the basics of Java, because like I said before, Bukkit is not its own "entity". It's just a vast ocean of methods and classes that has been written to make editing minecraft code easier and more efficient.

    If you want, I'd be happy to answer any questions you have and give you some tutorials through Skype. Add me, my username is Appljuze.

    The_Doctor_123

    So I had this idea, lemme know what you think. I was thinking of doing a YouTube series about Learning Java through Bukkit. I'll basically teach the fundamentals of Java but instead of using the Scanner, PrintWriter, .swing package, etc., I'll use Bukkit. That way people can still learn Java but also make progress in learning how to make plugins, because I know there's a large amount of people who want to do just that.

    Plus I'm going for a degree in Computer Science and possibly education, so it would be good practice :)

    What do you think?
     
    Rocoty likes this.
  8. Offline

    The_Doctor_123

    Appljuze
    Wow! I was thinking just that today! Something funny must be in the air. :p
     
  9. Offline

    iiHeroo


    I have Gomeow's Skype, but he doesn't use Skype anymore, he uses IRC, and I don't know his IRC channel, but I know Double0Negative's skype, (maker of Survival Games) but he doesn't know I have it so I should let him be :p
     
  10. Offline

    afistofirony

    iiHeroo Just a quick pointer about the "unreachable statement" error you were getting earlier:

    Code:
    if (player.hasPermission("hi.hi") {
        player.sendMessage("hi");
        return true;
    } else {
        player.sendMessage("bye");
        return true;
    }
     
    return false;
    The reason there's an error here is because of the way control flow works. If a player has the "hi.hi" permission, they will be sent "hi" and will see no usage message. Otherwise, they will be sent "bye", but will still see no usage message.

    This means that the method exits after sending a player "hi" or "bye" (depending on their permissions), leaving return false to be unaccessible in 100 percent of cases. :p

    PS:
    Show Spoiler
    You should use commas when listing multiple fields of the same type! i.e.
    Code:
    String a = "a", b = "b";
    as opposed to
    Code:
    String a = "a";
    String b = "b";
     
  11. Offline

    The_Doctor_123

    iiHeroo
    If you'd like, you could have my Skype. I'd be happy to answer your questions. :)

    That's a matter of preference. Personally, I like separate them by line when initializing them, and keep them all on one line when declaring them. It's kinda like saying

    Code:
    if {
    
    Is better than

    Code:
    if
    {
    
     
    afistofirony likes this.
  12. Offline

    Appljuze

    Better not steal my idea ;)
     
  13. Offline

    The_Doctor_123

  14. Offline

    Appljuze

    Not joking :mad:
     
  15. Offline

    The_Doctor_123

    Uhuh.. *Clicks Upload*
     
  16. Offline

    Appljuze

    That's okay, I'll just make mine better ;)
     
  17. Offline

    The_Doctor_123

    Ugh.. hardly getting any views.. just hit 100,000..
     
  18. Offline

    JPG2000

    The_Doctor_123 Yeah, with the if { example, I personally don't like the lines, but hey, people are diffirent.

    I once new a kid who developed a bukkit plugin 100% on notepad, I dared him :D.
     
  19. Offline

    The_Doctor_123

    Did he die?
     
  20. Offline

    JPG2000

    The_Doctor_123 Omg almost.

    Well, we had a bet. Who can make a plugin with /godmode on notepad the fastest.

    I had the code done with in 20 minutes, but I was having trouble remembering imports etc. It took me 2 hours of trial and error, untill I gave up. My friend one D:
     
  21. Offline

    The_Doctor_123

  22. org.bukkit.* :D
     
    Rocoty likes this.
  23. Offline

    Rocoty

    I hereby declare this the simplifying post of the day.
     
  24. Offline

    JPG2000

    Assist Oh. My. F****** god.

    Well, Im going to go pull my hair out. Good day!
     
  25. Offline

    iiHeroo


    You can PM me your skype if ya want, if you do, I'll add you.
     
Thread Status:
Not open for further replies.

Share This Page