#(machitor) I cand find right configuration for personalized sign (hologram)

11 messages · Page 1 of 1 (latest)

grand citrus
#
 public NPC spawnPersonalSign(Player player){
        NPC npc = CitizensAPI.getNPCRegistry().createNPC(EntityType.ARMOR_STAND, player.getName()+"sign" );
        npc.getOrAddTrait(PlayerFilter.class).setPlayerFilter(player1 -> {
            return !player1.getName().equals(player.getName());
        });
        npc.spawn(location.clone().add(0,0.4,0));
        npc.data().set(NPC.Metadata.SHOULD_SAVE, false);
        npc.getOrAddTrait(ArmorStandTrait.class).setVisible(false);
        npc.getOrAddTrait(Gravity.class).gravitate(false);
        npc.getOrAddTrait(Gravity.class).toggle();
        return npc;
    }

i want only that player was able to see this sign
I need something like that but working
I tried many thing but something always goes wrong

burnt sphinxBOT
#

(machitor) I cand find right configuration for personalized sign

burnt sphinxBOT
#

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.

grand citrus
#

(machitor) I cand find right configuration for personalized sign (hologram)

lunar slate
#

return player1.getName().equals(player.getName());

#

should be like that

grand citrus
# lunar slate `return player1.getName().equals(player.getName());`

it reverses effect that i need, but even if i keep that "!" it workd like that:
(i added my code)
if player just joined he only sees his own hologram
but than if someone joins new armor stand will be spawned for both players (also armor stand invisibility gone for armor stand of new player that will be spaned for old player)(that shoudnt logicaly be spawned)

lunar slate
#

still a problem?

summer bloomBOT
#
Thread Closing Reminder

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

#

@grand citrus