Can someone help me with my plugin

Discussion in 'Spigot Plugin Development' started by FalconSeeker, Oct 3, 2018.

  1. #1 FalconSeeker, Oct 3, 2018
    Last edited: Oct 8, 2018
  2. It says right there in the message... it was too low effort and had improper usage of words.
     
    • Agree Agree x 1
  3. oh I thought that was the standard message. What do you mean improper usage of words?

    Also I used the static method here for the main class instead of dependency injection... (in resource I submitted, not the one on spigot now)
     
  4. Make sure you research Java conventions aswell.
     
  5. What they basically want is clean and proper code. A premium resource should be worth the price and shouldn't contain beginner code. If you are a beginner start making your plugins public to get feedback from others. Maby after 1.5 or 2 years you will be able to code premium resources :)
     
  6. Strahan

    Benefactor

    Well, it would help if we had the code lol. Instead of making us decompile it, post the URL to your github or throw the code into a PasteBin and post it.
     
  7. Umm... source code? Or do we have to decompile....
     
  8. You can decompile, it doesn't state on his overview tab anything about it being against his license terms or whatever.
     
  9. Strahan

    Benefactor

    Is the Pit plugin the one you want to be premium? If so, holy shit. I'm not surprised they rejected it. No offense, but did you even do any testing before releasing it? I went ahead and decompiled it as I don't trust running random plugins without looking at them first. I'm no Java expert, but even I see tons of issues.

    • You should ensure your spelling is correct. It looks very amateurish to have so many spelling errors in a plugin.
    • What the hell is up with the fake percentage loading thing? lol that's so cheesy.
    • You aren't checking hand usage on your interact so when you right click with the gold axe, you get the position 1 set message twice.
    • Speaking of the gold axe protection thing, I set it on a small area like 8x8. Did /protect got the "POSITION spawn area set" (which btw is weird, why are you prefixing position on the spawn set msg?). However, immediately players nowhere even near that position are being affected by being able to place any blocks.
    • I did /thepit setgold and got absolutely no confirmation message at all.
    • Assumed whatever it is supposed to do, it did so I did /thepit goldstart and got "LOCATION NULL". In your resource page you said the debug msgs would be removed, guess you didn't get around to that. Not to mention it's even more terribly amateurish to not make the effort to make proper screenshots without that crap for a resource page entry
    • Tried /thepit kills. That works, but why is "Falcon" on there? Nobody has played so it should be empty
    • The resource page says /thepit blood opens the gui, but only the alt /blood does
    • Tried /thepit perks. Does nothing, "unknown command" just like /thepit blood. /perks works. It has an option "aaaa" which if you choose says "PERK NOT FOUND ERROR". Actually, it does that for every option.
    • /thepit levelup - It isn't translating the placeholder, I see "%old_level%"
    • /thepit shop - unknown command. I tried /shop out of curiosity. I didn't get unknown command, but all it did was echo "/shop" back at me
    • /thepit giveitem - Holy shit, this one actually works. At this point, I'm surprised about that lol
    • /thepit enchant - unknown command. Dunno if /enchant works as Essentials is overriding it if it does
    • Using bedrock works for removing holograms, but only removes one line at a time. As the top scores were placed as a single command, it would be more convenient if the whole top scores were removed with one bedrock click rather than a shitload of required clicks
    • Your page says placing an enderchest makes a "mystic well". I've no idea what that is, and your page doesn't explain it. It seems like a normal echest to me. *shrug*
    If this is seriously what you turned in for premium status, you really should not be surprised they rejected it. You have a LOT of work to do. Before you post a resource, you should be trying each option to ensure it works as required. Sure, sometimes you may miss something but the majority of the features of this plugin are broken for me so it's pretty obvious unit testing is not something you are aware of. That's pretty bad. I won't even start on the awkward coding. Of course, I wouldn't be to harsh about that anyway until I saw a non-decompiled version as who knows what the decompiler is altering.

    PS: I'm not saying this to be mean. I'm certainly not perfect either, far from it. Just trying to illustrate mistakes that may precipitate the type of response you got.
     
    #10 Strahan, Oct 3, 2018
    Last edited: Oct 3, 2018
    • Like Like x 4
    • Informative Informative x 4
    • Agree Agree x 1
    • Optimistic Optimistic x 1
    • You have 2 different packages.
      - One is called "falconseeker". Should be a valid FQDN in reverse.
      - One is called "me.falconseeker". This is a FQDN, however you should own the domain falconseeker.me
    • Unorganised classes, you have an event listener in your commands package
    • Commands are very messy, everything is in 1 class. Make use of a command manager.
    • Found a couple of empty classes
    • Code is mostly okay at best, however, not robust / clean, for example, this:
      [​IMG]
    • Then there's this cancer:
      [​IMG]
      and this:
      [​IMG]
     
    • Winner Winner x 2
    • Informative Informative x 2
  10. Bloody hell. No wonder it got rejected.
     
  11. To be fair, still doing a better job than me HAHA :)
     
    • Funny Funny x 4
  12. Thank you so much guys! I really appreciate the feedback. But @Strahan can you point out some of the coding mistakes I made as well? Or the worst ones you think that should be fixed
     
    #14 FalconSeeker, Oct 3, 2018
    Last edited: Oct 4, 2018
    • Like Like x 1
  13. wat?

    open source your code
     
  14. start with store e.getEntity() and the killer as variable in your PlayerDeathEvent, so you dont have to call e.getEntity().getKiller() every time


    Code (Java):

    Entity entity = e.getEntity();
    Entity killer = entity.getKiller();
     
    instead of add setItem in inventory in your switch case you can just change material variable there.
    or just store an array of material
    Code (Java):

    Material m;
    switch(tick){
       case 1:
           m = XMaterial.LIME_DYE.parseMaterial();
           break;
       case 2:
           m = XMaterial.RED_DYE.parseMaterial();
           break;
    }

    // or

    Material[] animations = new Material[]{XMaterial.LIME_DYE.parseMaterial(),XMaterial.RED_DYE.parseMaterial()};
    Material m = animations[tick]

    // and then set the inventory
    inv.setItem(20,m);

     
     
  15. Strahan

    Benefactor

    Ehh.. I'll leave that to the more experienced people. I know enough to know when something is funky, but not enough to be sure I am not passing other bad habits along in my inexperienced advice heh.
     
  16. The amount of errors your plugin has it substantial - nobody will spend their free time looking over it to fix errors for you, you're lucky someone even tested the plugin as extensively as @Strahan did in their free time. I suggest learning Java properly then going over your code.
     
    • Agree Agree x 4
  17. only so much can be depicted from the decompiled source, so i suggest open sourcing the code so we can see what we're actually working with. but, besides the obvious rookie mistakes and optimizations pointed out, there is something greater that i see lacking(why you were mainly rejected). this is abstraction and following OOP.

    go watch a couple videos of OOP, reading some guides, and look into what inheritance is and abstraction. once you understand parent and child classes and how to work with your ideas as objects, then reconsider re-creating your entire project with these concepts in mind. although you could refactor it, it would be messy to do so.
     
  18. bump. I understand OOP, abstraction and inheritance but I don't see where I can apply abstraction. Can someone point out just 1 example?
     

Share This Page