Skip to content

Commit

Permalink
GH-445 Rename LiteFabricFactory#create() to `LiteFabricFactory#buil…
Browse files Browse the repository at this point in the history
…der()` (#445)
  • Loading branch information
SfenKer authored Oct 13, 2024
1 parent e4e9cac commit 5b38ea3
Showing 1 changed file with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,16 @@ public final class LiteFabricFactory {
private LiteFabricFactory() {
}

@SuppressWarnings("unchecked")
/**
* @deprecated Use {@link LiteFabricFactory#builder()} instead
*/
@Deprecated
public static <B extends LiteCommandsBuilder<ServerCommandSource, PlatformSettings, B>> B create() {
return builder();
}

@SuppressWarnings("unchecked")
public static <B extends LiteCommandsBuilder<ServerCommandSource, PlatformSettings, B>> B builder() {
return (B) LiteCommandsFactory.builder(ServerCommandSource.class, new FabricPlatform(new LiteFabricSettings()))
.selfProcessor((builder, internal) -> {
MessageRegistry<ServerCommandSource> messageRegistry = internal.getMessageRegistry();
Expand All @@ -36,8 +44,7 @@ public static <B extends LiteCommandsBuilder<ServerCommandSource, PlatformSettin
.argument(World.class, new WorldArgument<>(messageRegistry))
.argument(ServerWorld.class, new WorldArgument<>(messageRegistry))
;
})
;
});
}

}

0 comments on commit 5b38ea3

Please sign in to comment.