mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-12-23 09:37:35 +01:00
ClickRedirectTrait should also check for PlayerFilter on init
This commit is contained in:
parent
952c18efde
commit
eb1af71429
@ -26,6 +26,9 @@ public class ClickRedirectTrait extends Trait {
|
||||
public ClickRedirectTrait(NPC npc) {
|
||||
this();
|
||||
this.redirectNPC = npc;
|
||||
if (redirectNPC != null && redirectNPC.hasTrait(PlayerFilter.class)) {
|
||||
redirectNPC.getOrAddTrait(PlayerFilter.class).addChildNPC(npc);
|
||||
}
|
||||
}
|
||||
|
||||
public NPC getRedirectNPC() {
|
||||
|
Loading…
Reference in New Issue
Block a user