MCPcopy Create free account
hub / github.com/PaperMC/Paper / init

Method init

paper-server/src/test/java/org/bukkit/EffectTest.java:31–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

29 private static final IntSet LEVEL_EVENTS = new IntArraySet(); // internal
30
31 @BeforeAll
32 public static void init() throws ReflectiveOperationException {
33 for (final Effect effect : Effect.values()) {
34 if (isNotDeprecated(effect)) {
35 final Effect put = ID_TO_EFFECT.put(effect.getId(), effect);
36 assertNull(put, "Duplicate API effect: " + put);
37 }
38 }
39
40 for (final Field field : LevelEvent.class.getFields()) {
41 if (Modifier.isStatic(field.getModifiers()) && Modifier.isFinal(field.getModifiers()) && field.getType() == int.class) {
42 LEVEL_EVENTS.add((int) field.get(null));
43 }
44 }
45 }
46
47 @Test
48 public void checkAllApiExists() {

Callers

nothing calls this directly

Calls 9

isNotDeprecatedMethod · 0.95
getFieldsMethod · 0.80
valuesMethod · 0.65
putMethod · 0.65
getIdMethod · 0.65
getModifiersMethod · 0.65
getTypeMethod · 0.65
addMethod · 0.65
getMethod · 0.65

Tested by

no test coverage detected