MCPcopy Index your code
hub / github.com/PaperMC/Paper / register

Method register

paper-api/src/main/java/org/bukkit/StructureType.java:235–241  ·  view source on GitHub ↗
(@NotNull T type)

Source from the content-addressed store, hash-verified

233 }
234
235 @NotNull
236 private static <T extends StructureType> T register(@NotNull T type) {
237 Preconditions.checkNotNull(type, "Cannot register null StructureType.");
238 Preconditions.checkArgument(!structureTypeMap.containsKey(type.getName()), "Cannot register same StructureType twice. %s", type.getName());
239 StructureType.structureTypeMap.put(type.getName(), type);
240 return type;
241 }
242
243 /**
244 * Get all registered {@link StructureType}s.

Callers 1

StructureTypeClass · 0.95

Calls 3

getNameMethod · 0.65
putMethod · 0.65
containsKeyMethod · 0.45

Tested by

no test coverage detected