So I'm running a task which checks if a player is wearing certain armour, and I am trying to slim down my code and make it more efficient in doing this, so I tried making an Enum to check if the player is wearing said armour, however I'm running into an error. Error (Move your mouse to reveal the content) Error (open) Error (close) Code: *snip* Apparently it's not initialized but since I'm unfamiliar with Enum's I don't know how I would go about doing this. I figured everything was going to run smoothly considering there's no errors. Here's the Enum and method I'm using to check if the player is wearing said armour: Clicky (Move your mouse to reveal the content) Clicky (open) Clicky (close) Code: *snip* I'd appreciate any help, even if it's just a step on the way to fixing this error.
That's not a good idea, as the class is huge, here's line 75: Code: *snip* That's why I pasted the boolean that I used. Since it's a task timer it just runs through every kit, so every error are just the following lines: Code: *snip* So on and so fourth.
@Artellet We can't help you with just this. As i said, you have to show th whole method, including the scheduler you use
Scheduler used is just the Bukkit one. Called like this: Code: *snip* Code: *snip* The rest of the method is irrelevant in terms of this error, I showed you where I call my boolean, which is where my Enum's come into play, they are not referenced anywhere else in the code. As the error says: Code: *snip* My Enum is not being initialized... How would I go about initializing it when it's used in this way? /Solved Turned out I was reading the wrong error, it was printing in my console so fast I never saw it. EDIT by Moderator: merged posts, please use the edit button instead of double posting.