Citizens2 Trait support
prozhong opened this issue · 15 comments
Could you please add a new way to create blacksmith:
I add a trait 'bsmith_all' to a citizens2 npc, then he can repair and enchant item
just like plugin Morefish does:
https://github.com/elsiff/MoreFish/blob/master/src/main/java/me/elsiff/morefish/hooker/FishShopTrait.java
https://github.com/elsiff/MoreFish/blob/master/src/main/java/me/elsiff/morefish/hooker/CitizensHooker.java
This, as well as other plugins integrations, are certainly on the roadmap.
I would think your server is of an RPG theme. Would you suggest any other plugins you’d like to see integration with?
@prozhong so, do you want to use Citizens' npcs with skins and stuff with Griswold' features, right? If that's right - sounds good, not a big deal. We'll work on it after the holidays.
@Haarolean Yes and Citizens's npc won't be pushed by players and won't be affected by worldguard's 'mob-spawning=deny' limit
@toxuin It works fine... I can repair
However everytime I rightclick the npc, the console prints 2 lines like this
[14:03:48] [Server thread/ERROR]: [Citizens] Cannot register a null trait. Was it registered properly?
[14:03:48] [Server thread/ERROR]: [Citizens] Cannot register a null trait. Was it registered properly?
seems Citizens doesn't think the trait is registered, so weird
More info
I can add trait "griswold_tools" but can not remove it
Which version of Citizens are you on? Which version of Bukkit/Spigot? I cannot reproduce this on my setup.
This server is running Paper version git-Paper-1104 (MC: 1.11.2) (Implementing API version 1.11.2-R0.1-SNAPSHOT)
Citizens version 2.0.22-SNAPSHOT (build 1487)
I still cannot reproduce this problem. I've used following versions:
- Spigot-Essentials build #25
- Vault 1.5.6-b61
- Citizens v2.0.22 build 1487
- Paper build 1104
- Griswold latest from PR#19
All the plugins had empty configs. I've successfully created a citizens NPC, added a griswold_tools trait to it, right-clicked it (worked) and removed the trait successfully, too.
I have tested this branch with your exact versions and I still cannot observe same errors. The only thing I could see being different is locale.
If you would like to try out my build – meet me on Griswold's Gitter channel.
@prozhong Try to avoid hieroglyphs in the names for testing purposes
Citizens v2.0.22.jar
Essentials-2.x-SNAPSHOT.jar
Griswold-5a033b8.jar
Vault.jar
I tested with only this 4 plugins
and found that if only there are essentials & vault together,
the 'Cannot register a null trait' error will occur
weird
I used the same plugins & paper#1104
added a griswold_both trait to it,
right-clicked it (worked but there were 2 error in console)
and removed the trait successfully
this is my jars
https://www.dropbox.com/s/u4auuhalf788ul9/lite.zip?dl=0
@prozhong I've just pushed some changes to PR that should fix null-trait message. Please test.
@toxuin The 'Cannot register a null trait' error disappeared