restoring exp on respawn

Discussion in 'Plugin Development' started by RuthlessRage, Apr 21, 2015.

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

    timtower Moderator Moderator

  2. Offline

    1Rogue Retired Staff

     
    RuthlessRage likes this.
  3. Offline

    RuthlessRage

    @1Rogue

    I'm sorry to inform you that that is not an issue with the Bukki API

    THIS IS THE ISSUE
    player.setlevel(25) should of worked but because of the bukkit api it doesnt.
     
  4. Offline

    SuperOriginal

    Wat
     
  5. Offline

    1Rogue Retired Staff

    Bukkit API is working exactly as intended, you're simply refusing to share the code with a problem so no one can help you. Don't you find it strange how the API works for everyone but you?
     
    teej107 likes this.
  6. Offline

    mythbusterma

    @RuthlessRage

    Excuse you but you don't know what you're talking about at all. Python is hardly used in the real world, it is used to write quick scripts that accomplish simple tasks, and for highly specific data analysis programs. I implied C is the basis for most languages today, as it is, in fact, the basis for most languages, including Java.

    Maybe if you actually learned how to write a C-style language like Java, instead of some script kiddie language like Python, you would actually know where the put the code, because it's a simple functional programming concept.

    We all know a lot more about programming and it's history than you do, so if you'd kindly learn your place, that'd be much appreciated.

    Oh, and just so this post doesn't get flagged, how about someone who actually knows what they're doing write the code for you, so you'll stop carrying on this thread and asking more and more banal questions.

    Code:
    public class ExpFixer extends Listener {
    
          @EventHandler
          public void onPlayerDeath(PlayerDeathEvent event) {
               event.setKeepLevel(true);
          }
    }
    And if you have a degree, it's not from an accredited university, because any respectable university would've taught someone at least one C like language, instead of "hurr durr Python is the future!!!!!!"
     
    Last edited: Apr 25, 2015
  7. Offline

    Aqua

    Ruby*
     
  8. Offline

    Konato_K

    @RuthlessRage The API works as intended, if you can't set the level at respawn is an issue with Minecraft itself, not Bukkit, Bukkit solves it by adding it's methods to manipulate experience on death.


    @mythbusterma You missed "event." D:
     
  9. Offline

    timtower Moderator Moderator

    To all, stop the degree stuff.
    Keep it on topic!
    @RuthlessRage We can only help if you share your code, unless your issue is gone.
     
  10. Offline

    1Rogue Retired Staff

    Erm, a good amount of google's backend server development is done with python.

    To be honest if someone wants to blatantly lie about themselves on the internet then they should be able to handle the backlash from people figuring out about it. Though the main thing here is that a degree doesn't mean anything; it's brought up irrelevantly as some form of "proof" of being capable when in reality having a degree doesn't make you better or worse.

    EDIT By Timtower as I don't want to make a new post about this: never said it did, that is why the OP has to stop with it as well.
     
    Last edited by a moderator: Apr 25, 2015
    RuthlessRage and Gater12 like this.
  11. Offline

    mythbusterma

    Touché, but it is by no means a majority, nor the general direction of the market.


    @Konato_K

    Fx'd.
     
  12. Offline

    codename_B

    I’ll have you know I graduated top of my class in the Navy Seals.
     
    KingFaris11, Protophite, Aqua and 3 others like this.
  13. Offline

    1Rogue Retired Staff

    [​IMG]

    I didn't bother reading the rest of your message, because I already know it's just full of bull. People on these forums attempt to help you and then you try to lash out and prove that you're better.

    I say a degree doesn't matter because I've been at that point, beyond your first job it's essentially worthless for a computer science / software engineering field, around half the field doesn't even have a degree.

    If you want help, then take that bit of humility like an adult and ask for it, what you're doing now is the equivalent of

    It's hilariously obvious, which is why you're meeting with so many people reacting the way they are. If you stopped making the problem about yourself and more about the code you might actually make progress.
     
    Last edited: Apr 25, 2015
  14. Offline

    Aqua

    Well, if it works I guess this problem is solved, and you should ask Mojang why it isn't working.
     
  15. Offline

    ZeldoKavira Administrator Curse


    Continuing to lash out at the users trying to help you isn't going to get you very far. You need to step back and see that they are trying to help or seek help elsewhere.
     
    Msrules123 likes this.
  16. Offline

    RuthlessRage

    *My intention is not to lash out only to help others not recieve false information*
    @1Rogue im not proving im better because there are a lot of people without degrees that know more then me. I dont know what you're talking about but nowadays getting hired requires a degree even for 1 time side jobs. Companies are serious and they will always want to hire those with most knowledge and those are the people who went to college for it in their eyes. I dont have 1 job i do several gigs sometimes with the same companies, im currently working for multiple minecraft servers and im getting paid for it otherwise id have no business here; i do this for the money i dont even know how to craft a craftbench....

    @Aqua i have the code working but only with a scheduler i dont want to do it any other way then player.setLevel(25), that being without a scheduler or konatos method, i just want to put player.setLevel(25) in the respawn class and call it a day but it never actually gives the levels...why???

    @mythbusterma that chart is outdated... your information is irrelevant if you worked in the field you would know that chart is wrong
     
  17. Offline

    mythbusterma

    Well, I'm just gonna leave this here....

    [​IMG]
    Source: http://langpop.com/

    Solution is still here....
     
    KingFaris11 and MCJoshua345 like this.
  18. Offline

    Konato_K

    @RuthlessRage As I said before, you can't set the experience at respawn, that's how Minecraft works and if you have a problem with that go blame Mojang.
     
  19. Offline

    Aqua

    This is the order minecraft handles respawn (roughly):
    Death -> drop exp -> call respawn event -> set respawn settings -> make player alive.
    You can't set levels for dead people. The scheduler waits until the player is alive. Hence why it won't work in the event itself and does work via schedulers. There is no (easy) bypass for this, best you could do is use nms to wait for the respawn and restore levels (I can't help with the nsm though).
     
  20. Offline

    RuthlessRage

    @Konato_K Alright then ill just use the scheduler... how do i mark this thread solved

    SO EVERYONE HAS THE CORRECT INFORMATION AND KNOWS WHAT THEY ARE TALKING ABOUT IN THE FUTURE

    @mythbusterma [​IMG]
     
    Last edited: Apr 25, 2015
  21. Offline

    Konato_K

  22. Offline

    RuthlessRage

    @Konato_K Because i dont want the player to have the same exp levels when he died i want to set his exp levels in the respawn event cause i like things orgainzed not only that i have it in a way that not all people in this server are going to respawn with the same level as theres factors contributing to that
     
  23. Offline

    Konato_K

  24. Offline

    1Rogue Retired Staff

    So then how am I already on my 3rd software engineering job without having a degree. And no, that's not just "minecraft servers".

    Job 1: iD Tech Programming Instructor
    Job 2: Phanatic LLC backend server development
    Job 3: Hypixel Developer

    I also founded my own business for independant contracting jobs, which if you want to reference is signed under a partnership (Codelanx) with my name on it (Spencer Alderman) in Monroe Country, NY, USA.

    So far all of your claims are unbased and unproven, so forgive me if I haven't taken a single thing you've said to heart. (Additionally, your table has literally no source)
     
    Last edited: Apr 25, 2015
  25. Offline

    RuthlessRage

    @Konato_K I'm loading specific file integers for each players which are all different, those integers are what the players exp level should be set to...

    @1Rogue Your 3rd software job? you work 3 jobs to make a living?? that sucks, or did you quit your first 2 because they didnt pay enough? or did the first 2 fire you? When you have a degree finding work is easy so if you dont like a job or get fired you just get a new one. And with a degree you make money to the point where you dont need muliple jobs to make a pleasant living. Also most people i know dont even work fulltime as there's always side jobs to do that make ends meet gracefully.Anyways... Your"jobs" are obviously not high end companies such as autodesk or yoyogames or unity or gamesalad etc which I collaberatwith all require degrees also im sure what you get paid in a month is nothing compared to what i get payed in a week. Big companies only hire those with degrees anyone can say they have experience and may be they do but having a degree proves that you know a lot of crap. Not only that the big companies want bachs when i had my associates i rarely got hired because they wanted the best which in their eyes are the bachs... Think about it your an entrepreneur with lots of valuable customers would you rather hire someone with a degree or without? Not even that technology is evolving so freakin fast theres now robots that build autocad schematics.. basically a house drawn on a computer in autocad and made with a couple robots in quarter the time it would take for actually people to build. The world is based of technology and its only getting bigger the big companies wont hire those without degrees as in their eyes those with degrees have more knowledge. Think about it cars were only able to run on gas now we have hybirds technology is evolving and having a degree is gets you chump money even with the smaller projects.
     
    Last edited: Apr 25, 2015
  26. Offline

    Konato_K

    @RuthlessRage I don't know what you mean, you can perfectly set the experience from there

    Anyway, if this is solved just mark it as solved, no need to stay flaming other users for no good reason.
     
  27. Offline

    1Rogue Retired Staff

    Note that I'm 20, was never fired, and have good relationships with previous employers. I work 1 job at a time. I didn't include any side jobs because they aren't really worth listing. Through freelancing I can't even summarize the amount of work I've done, and as for part-time jobs I've worked at Adobe. I don't bother posting about "how great I am" because it's nothing but ego-stroking which is a waste of time and just makes a person out to look like an ass.

    As far as I'm concerned you're a child with no degree, job, or money. Feel free to prove me wrong (btw trying to insult me doesn't prove anything, how about something actually referencable).

    On a personal note, when you rage-type everything in a giant paragraph it's a pain to read.

    Edit: Thanks to someone who sent me a message, I've been notified that the table you used as a comparison was simply googled and taken from a blog: http://blog.codeeval.com/codeevalblog/2015#.VTw4HCFVhBc=

    As for your actual problem, I have no idea why you're using files for something that requires a single method call, which was already specified earlier in this thread.

    But it's fun to watch
     
    Last edited: Apr 25, 2015
    KingFaris11 and SuperOriginal like this.
  28. Offline

    Msrules123

    In every programming language that I've encountered, the language will always throw an error when you try to create a function inside of a function. If you want to tell lies on the internet, go ahead. It isn't my business to know why you would do such a thing. But please, if you are going to lie, don't tell people they are wrong when they are obviously right.

    EDIT:
    Because quite obviously he does not know what he is doing...
     
  29. Offline

    1Rogue Retired Staff

    Off the top of my head GNU C and javascript allow for it (if I remember correctly)
     
  30. Offline

    Protophite

    @RuthlessRage
    You literally need to find a new profession if you can't solve simple problems on your own.
     
    KingFaris11 and Msrules123 like this.
Thread Status:
Not open for further replies.

Share This Page