Posted October 7, 20213 yr comment_63192 Hey guys.. Had the need to re-write SlayerTasks.java for someone, figured I'd share it. It includes a kill requirement - if your server doesn't have that, just set the KC requirement to 0 or properly remove it if you know what you're doing This is the hidden content, please Sign In or Sign Up Adapted Slayer.java assignTask() Method to use the new data.. This is lazy work since I just changed where it gets the info from This is the hidden content, please Sign In or Sign Up
September 17, 20222 yr comment_80752 Ahh this really isn't great enumerations are a strong way to give constants a bit more flavor context but that is really where it should end your packing so much stuff in your enum class is defeating the purpose of objective based programing. The point is to make things clean and simple without over engineering it, Java is already verbose enough think lazy when you create things it truly is the best practice. You have multiple methods doing the exact same check it can be condensed into one. This is the hidden content, please Sign In or Sign Up If data already exists don't duplicate it also this method and its call isn't needed to populate static collections you can simply call a static block This is the hidden content, please Sign In or Sign Up This is the hidden content, please Sign In or Sign Up Here you are using a while loop creating an imposed recursive iteration check, we have had Streams since java 8 should check into them you can filter out your data sets so they only contain what is currently usable. This is the hidden content, please Sign In or Sign Up This is opening up a chance for a null pointer exception look into Optionals also don't use ordinal() it value is exclusively order specific and any changes to the constants stack will break what is returned. This is the hidden content, please Sign In or Sign Up
Create an account or sign in to comment