#(evilcognac) java.lang.IllegalArgumentException: Trait name null already registered
21 messages · Page 1 of 1 (latest)
(evilcognac) java.lang.IllegalArgumentException: Trait name null already registered
Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.
It works if only one trait is registered
@cold turret post the traits and registration code
private void registerCitizensTraits(TraitInfo... traits) {
for (final TraitInfo trait : traits) {
CitizensAPI.getTraitFactory().registerTrait(trait);
}
}
public BlackjackDealerTrait() {
super("blackjackdealer");
}
public RouletteDealerTrait() {
super("roulettedealer");
}
@thick bear is this a citizens bug or ami doing smth wrong
Missing the traitinfo part
this.registerCitizensTraits(
TraitInfo.create(RouletteDealerTrait.class),
TraitInfo.create(BlackjackDealerTrait.class)
);
Ok now I'm missing the @TraitName annotation on the trait classes
@cold turret please try to give the full code context instead of just snippets
Has your issue been resolved, or your question been answered?
If so, please use the </resolved:1028673926114594866> command to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.
If not yet resolved, please reply below to tell us what you still need.
(Note that if there is no reply for a few days, this thread will eventually close itself.)
@cold turret
tbf i didnt even know u needed that annotation
didnt have it
whats the point of having the annotation and the super
To define the trait name at compile time and runtime
snm