PolarDocs Client Area

FakePlayer Annotation

Introduction#

The @FakePlayer annotation (top.polar.api.user.annotation.FakePlayer) marks a class as representing a fake player, such as an NPC implementation. It is retained at runtime so that Polar can recognise these entities and avoid treating them as real players.

java
@Retention(RetentionPolicy.RUNTIME)
public @interface FakePlayer {
}

Usage#

Annotate the class that implements the fake player:

java
@FakePlayer
public class NpcPlayer extends CraftPlayer {
    // ...
}