MCPcopy Create free account
hub / github.com/CitizensDev/CitizensAPI / getTrait

Method getTrait

src/main/java/net/citizensnpcs/api/npc/NPC.java:223–223  ·  view source on GitHub ↗

Gets a trait from the given class. If the NPC does not currently have the trait then it will be created and attached using #addTrait(Class) . @param trait Trait class @return Trait with the given class @deprecated for intransparent naming. Use #getOrAddTrait(Class) for t

(Class<T> trait)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 3

addTraitMethod · 0.65
getOrAddTraitMethod · 0.65
loadTraitFromKeyMethod · 0.65

Implementers 1

AbstractNPCsrc/main/java/net/citizensnpcs/api/npc

Calls

no outgoing calls

Tested by

no test coverage detected