Find old reason of rejection

Discussion in 'Spigot Discussion' started by rasm945i, May 25, 2018.

  1. Heio there

    A while back (like half a year or so), I submitted a Premium Resource, which got rejected.
    Now I'm considering starting to work on the plugin again, but I can't find the reason of rejection from back when it got rejected. I tried checking my email but found nothing.

    Where can I find the reason, so I can fix it and improve it correctly?

    - rasm945i :)
     
  2. You probably can't. That isn't being saved, it's only a alert that dissapears after a certain amount of time.
     
  3. That's what I thought. Dang it :confused:
     
  4. Strahan

    Benefactor

    Simple. Make it as good as you can, then resubmit it. If it's insufficient, you'll get a brand new notice :)

    Just try to avoid beginner mistakes. I.E. making all sorts of shit static that don't need to be, casting things without verifying, putting it all in one big class, etc etc.
     
  5. As far as I'm aware, I am avoiding beginner mistakes.
    If I recall correctly, it may have been a lack of features, so I guess I need to get creative and get myself a new rejection, or approval :p
     
  6. Strahan

    Benefactor

    I looked at the code to your latest public resource. Hostile Chickens, that's funny :) Looks fine, though you have a bunch of unused imports and variables you never use either. Also your reload should ideally cancel and restart the task, because the delay change would never be seen otherwise. Is there any way to make the arrows appear to be coming from the chicken instead? When I tried it, the arrows looked like they were coming from me. It'd also be cool if you could make the chickens come after the player, and have a physical attack. Like cause the player to incur 1 damage every 2 or 3 seconds if the entity is within a 1 block range of the player. That'd be cool.
     
    #6 Strahan, May 25, 2018
    Last edited: May 25, 2018
  7. I kinda like your idea as well.
    I haven't messed much with custom pathfinders, which it sounds like you are suggesting since they use NMS and I do everything to avoid that mess xD

    I don't see any unused imports when in IntelliJ, all of them are used.
    Also, I can only spot 1 unused variable and ~3 that could be local instead of private.
    Which imports did you find unused? :eek:
     
  8. Strahan

    Benefactor

    Ohh yea, if it gets into NMS I'd probably say screw that too lol.

    The imports it had declared but were unused in Main were:

    Code (Text):
    import java.util.logging.Logger;
    import org.bukkit.command.PluginCommand;
    import org.bukkit.configuration.file.FileConfigurationOptions;
    import org.bukkit.entity.LightningStrike;
    and Main also had the following unused vars:

    Code (Text):
    private final String pRadius = "range-radius";
    private final String pLevel = "hostile-level";
    private final String pDelay = "delay-in-ticks";
    private final String pWorld = "world";
    private final int defaultRadius = 8;
    private final int defaultLevel = 1;
    private final int defaultDelay = 6;
    private final String defaultWorld = "world";
    ChickensCommand had these unused imports:

    Code (Text):
    import java.util.List;
    import org.bukkit.entity.EntityType;
    import org.bukkit.plugin.PluginDescriptionFile;
    Of course, it could just be decompiler weirdness. I saw you had default ints for the values and noticed in your config loading you use ternary operators in case the config isn't set. The .get functions from config have a cool feature where you can tell it what to use if it fails, so you can just do like this.radius = this.config.getInt("range-radius", defaultRadius); Also in my decompiled copy you had an unused defaultRadius var of 8 but were setting 6 as a default in the load.

    On an unrelated note, I saw you close your cases in switch with braces. That's cool, I didn't even know you could do that lol. I always thought break; was the only way you close a case. Learn something every day :)
     
  9. Oh.. I think that version is from before I decided to rewrite some code and tidy it up. The code I just looked at contains an extra feature as well :p
    Ill remove the ternary operator and use the .get method instead, thanks :)

    What do you mean "closing a switch with braces"? Like, return?
     
  10. Braces don't end switch statements, break and return are the only way. Braces just make it so you can have same named variables in different values of the statement, as they are unable to see each other, you can do the same out of switch statements.

    Eg:

    switch(i){
    case 1:
    int a = 0;
    case 2:
    int a = 2;
    }

    Doesn't work, but if you put braces on them it does. Also without breaking it will continue down the switch statement until the switch ends or it breaks/returns, eg the example above if i = 1 it would do both 1 and 2
     
  11. Strahan

    Benefactor

    I've been dicking around with your chicken plugin, it's oddly amusing. I made a few tweaks:



    :LOL:

    Oh, so it was just an error then heh. I assumed it was just something I wasn't aware of as I've always used break to terminate my cases.
     
  12. Choco

    Moderator

    I checked back at the report for your resource being rejected. Hope you don't mind it being public in this thread, but hey... you asked publicly :p

    "Really basic plugin with not a lot of functionality- ... -Some of the code is even written in a way that makes it extremely inefficient or even broken. (E.g. trying to set blocks in unloaded chunks)"

    So yea. There's the reason (or at least the more detailed version left in the comments of the report). May not have been the exact notice you got, but that's the best description you'll get. Make sure to keep beginner programming mistakes out of your code. I recommend my guide on the topic
     
  13. I don't mind it being public, thank you a lot for telling me, thank you! I guess I need to research block manipulation further :p

    Some of the ideas in the video are actually quite good. I hope I can remember them when I'm sober, or remember that you posted it :D
     
    • Funny Funny x 2