Adding location of sign to the config

Discussion in 'Plugin Development' started by mouz_, Dec 14, 2015.

Thread Status:
Not open for further replies.
  1. @timtower What about getting locations from strings when enabling?
     
  2. Offline

    timtower Administrator Administrator Moderator

    @mouz_ You make a similar loop. You parse what is in the string to ints and floats and a world. Then you create a Location out of that.
     
  3. I have no idea how to do it.
     
  4. Offline

    Mrs. bwfctower

    @mouz_
    1. Get the string list from the config
    2. Iterate it
    3. Split it by "/"
    4. Construct a new Location object from the split
    5. Add each Location to a List
     
  5. Offline

    mcdorli

    What part you don't understand of what @Mrs. bwfctower said?
    1. Get the string list from the config - You have this, I'm sure
    2. Iterate it - You probably can do this, if you know foreach loops or iterators
    3. Split it by "/" - Simple split
    4. Construct a new Location object from the split - location.x = strings[0], location.y = strings[1]...
    5. Add each Location to a List - I'm pretty sure you know this one too
     
  6. What part you don't understand in "HOW to do it?"?

    I don't know what "iterate it" is.
     
    Last edited: Dec 16, 2015
  7. Offline

    mcdorli

  8. @mcdorli You don't need to be offensive.

    So how to use it? I don't know english very much to understand this document.
     
  9. Offline

    Zombie_Striker

  10. Offline

    mcdorli

    I never was offensive. I asked something because I wanted to give you a in-depth explanation of it.
     
  11. Was I offensive?
    I don't know how to do it, so explanations won't help.
     
  12. Offline

    mcdorli

    Then I'm basically done here.
     
    Zombie_Striker likes this.
  13. Offline

    Zombie_Striker

    timtower likes this.
  14. Offline

    mcdorli

    One question here: I never understood, what iterators are good for (Don't misunderstand me, I use them), you can use a foreach loop, to go trough all elements of an arrayList, aren't you?
     
  15. Offline

    Xerox262

    "Iterator enables you to cycle through a collection, obtaining or removing elements."
    It's s a nice easy way to loop through a collection and offers the ability to modify while looping. While a foreach loop would through a CME if you tried to remove/add an element with it.

    "ListIterator extends Iterator to allow bidirectional traversal of a list"
    It also allows you to travel both directions, you can do Iterator#previous() to get the previous element rather than just going forward.
     
  16. Can you tell me how to do it exactly?
     
  17. Offline

    timtower Administrator Administrator Moderator

    @mouz_ If you don't understand how then you are doing something out of your reach.
    Scale down your plugins, take a step back, get into basic serialization / deserialization before you continue, doesn't even has to be on Bukkit, plain java would do.
     
  18. Offline

    Mrs. bwfctower

    @mouz_ And while you're at it, just learn Java from the start, and don't jump into Bukkit. Trust me, you'll have a much, much, much better time making plugins if you truly know Java.
     
  19. I'm curious why you just can't help me, when I'm asking for help.
     
  20. Offline

    Mrs. bwfctower

    We have helped you. In fact, we've created over 10 pages of help for you, just look at all of your other 6 threads about this.
     
    Gorbit99, Zombie_Striker and timtower like this.
  21. Offline

    timtower Administrator Administrator Moderator

    That is because you are asking help for pretty basic things, things that you should have done already. Outside Bukkit.
    You don't understand most instructions that we give you.

    In other words: you are trying to so more than you can.
    If you really want this plugin: try the plugin requests section, ask for the plugin there.
    If you want to learn to make Bukkit plugins: please get your basic java knowledge up to a higher level, then start with a smaller and simpler plugin.
     
  22. Offline

    Zombie_Striker

    Mrs. bwfctower likes this.
  23. @Zombie_Striker I don't know why my post "@Zombie_Striker please don't write in my threads." was not accepted.

    Why you can't tell me this if this is so simple and basic?
     
  24. Offline

    timtower Administrator Administrator Moderator

    @mouz_ Because this is a free forum, he can respond if he wants to.
    And because you should be able to do it yourself. Read the links that we posted.
    Do what we told you many times before.

    There is a border between helping somebody and writing the code for him. You crossed from asking for help to asking for code.
     
    Gorbit99 and Zombie_Striker like this.
  25. Why can't you write couple lines of plugin to help me?
     
  26. Offline

    mcdorli

    Because we gave you over 1000+ lines to read, that solve these problems.
     
    timtower likes this.
  27. Offline

    Zombie_Striker

    @mouz_
    Because the only reason to write the code for you is that you just don't want to do it. We have told you again and again what you have to do. We provided links that tell you why you have to do those things. If you read those links and what we posted, you should understand what you need to do and how to do it.

    We try not to spoonfeed on this forum because it serves no purpose but create more problems down the line.
    • Spoonfeeding may teach bad practices.
    • Spoonfeeding does not guarantee that the person receiving the code will Completely understand why it works.
    • Spoonfeeding does not guarantee that the person will use the code correctly.
    • Spoonfeeding does not always work/fix the problem.
    • If used incorrectly, Spoonfeeding can create more problems, and as such, more threads.
    This may be my last post here, (I will be the fourth member that has stopped helping you) so keep in mind the main reason why any of us are here is because we want to help, it only up to you if you will accept it.
     
    Mrs. bwfctower and timtower like this.
  28. What part you don't understand in "@Zombie_Striker please, don't write in my threads"?

    I am trying, if you can't see this you are blind. Look at the beginning of my thread. I did almost anything, and I'm asking just for code for 1 thing.
     
  29. Offline

    timtower Administrator Administrator Moderator

    @mouz_ You asked a lot of times for the same thing. You got plenty of answers yet you aren't able to split a string.
    Make a plugin that is easier, step away from this idea for now.
    Locked.
     
    Mrs. bwfctower likes this.
Thread Status:
Not open for further replies.

Share This Page