use of org.spongepowered.test.myhomes.data.home.impl.HomeBuilder in project SpongeCommon by SpongePowered.
the class MyHomes method onDataRegistration.
@Listener
public void onDataRegistration(GameRegistryEvent.Register<DataRegistration<?, ?>> event) {
this.logger.info("onDataRegistration");
final DataManager dataManager = Sponge.getDataManager();
// Home stuff
dataManager.registerBuilder(Home.class, new HomeBuilder());
dataManager.registerContentUpdater(Home.class, new HomeBuilder.NameUpdater());
dataManager.registerContentUpdater(HomeData.class, new HomeDataBuilder.HomesUpdater());
this.homeDataRegistration = DataRegistration.builder().dataClass(HomeData.class).immutableClass(ImmutableHomeData.class).dataImplementation(HomeDataImpl.class).immutableImplementation(ImmutableHomeDataImpl.class).builder(new HomeDataBuilder()).dataName("Home Data").manipulatorId("home").buildAndRegister(this.container);
// Friends stuff
this.friendsDataRegistration = DataRegistration.builder().dataClass(FriendsData.class).immutableClass(ImmutableFriendsData.class).dataImplementation(FriendsDataImpl.class).immutableImplementation(ImmutableFriendsDataImpl.class).builder(new FriendsDataBuilder()).dataName("Friends Data").manipulatorId("friends").buildAndRegister(this.container);
}
Aggregations