So to start off, i'll let you know for starters that i'm very new to java, as well as a few programming concepts.
so I'm working on a project, and trying to use player.setAttribute, and player.getAttribute. from what i can tell these can save a value to a hashmap, and pull said value from said hashmap.
i'm having trouble with .getAttribute.
sample code for what i'm doing
so and so odd thing is done, and saves something to a players Attribute.
if(blah == 1){ player.setAttribute(testattribute, 1);
}
this part seems to "work"
however i'm having problems pulling the Attribute with getAttribute
Object test = player.getAttribute(testattribute);
i get the error "testattribute cannot be resolved to a variable"
i'm 95% sure i'm doing something wrong haha. if anyone could help point me in the right direction i'd love it!