MCPcopy Create free account
hub / github.com/Teneted/Tenet / register

Method register

src/main/java/org/bukkit/StructureType.java:230–236  ·  view source on GitHub ↗
(@NotNull T type)

Source from the content-addressed store, hash-verified

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

Callers 1

StructureTypeClass · 0.95

Calls 3

containsKeyMethod · 0.65
getNameMethod · 0.65
putMethod · 0.65

Tested by

no test coverage detected