MCPcopy Create free account
hub / github.com/PCGen/pcgen / apply

Method apply

code/src/java/pcgen/core/kit/KitBio.java:81–96  ·  view source on GitHub ↗

This method actually applies any changes that can be made by the kit to the specified PlayerCharacter. @param aPC The character to apply the kit to.

(PlayerCharacter aPC)

Source from the content-addressed store, hash-verified

79 * @param aPC The character to apply the kit to.
80 */
81 @Override
82 public void apply(PlayerCharacter aPC)
83 {
84 if (theCharacterName != null)
85 {
86 aPC.setPCAttribute(PCStringKey.NAME, theCharacterName);
87 }
88 if (theCharacterAge != null)
89 {
90 ChannelUtilities.setControlledChannel(aPC.getCharID(), CControl.AGEINPUT, theCharacterAge);
91 }
92 if (selectedGender != null)
93 {
94 aPC.setGender(selectedGender);
95 }
96 }
97
98 /**
99 * The display name to represent what this kit item represents.

Callers 1

testApplyMethod · 0.95

Calls 4

setControlledChannelMethod · 0.95
setPCAttributeMethod · 0.80
getCharIDMethod · 0.65
setGenderMethod · 0.65

Tested by

no test coverage detected