Griswold – NPCs repair your items

Griswold – NPCs repair your items

25.7k Downloads

Citizens2 Trait support

prozhong opened this issue · 15 comments

commented

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

commented

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?

commented

@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.

commented

@Haarolean Yes and Citizens's npc won't be pushed by players and won't be affected by worldguard's 'mob-spawning=deny' limit

commented

@prozhong There is a PR #19 in place that adds support for citizens. I hope you know how to build this.
As usual, we would like to know if it works – or if it doesn't.

commented

@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
nj8klc6et ap6 qvq 3tgfe

commented

Which version of Citizens are you on? Which version of Bukkit/Spigot? I cannot reproduce this on my setup.

commented

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)

commented

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.

commented

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.

commented

@prozhong Try to avoid hieroglyphs in the names for testing purposes

commented

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

commented

weird
image
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

commented

@prozhong I've just pushed some changes to PR that should fix null-trait message. Please test.

commented

@toxuin The 'Cannot register a null trait' error disappeared

commented

I think we can mark this closed after the PR get merged