From 5332ec21eb99e1df38c493b12308bf0bc7cd0efb Mon Sep 17 00:00:00 2001 From: Connor Hartley Date: Sat, 6 May 2017 11:04:57 +1200 Subject: [PATCH] Register data with newer methods --- .../foxdenstudio/sponge/foxcore/plugin/FoxCoreMain.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/foxdenstudio/sponge/foxcore/plugin/FoxCoreMain.java b/src/main/java/net/foxdenstudio/sponge/foxcore/plugin/FoxCoreMain.java index a417365..abd57d5 100644 --- a/src/main/java/net/foxdenstudio/sponge/foxcore/plugin/FoxCoreMain.java +++ b/src/main/java/net/foxdenstudio/sponge/foxcore/plugin/FoxCoreMain.java @@ -46,6 +46,7 @@ import org.slf4j.Logger; import org.spongepowered.api.Game; import org.spongepowered.api.config.ConfigDir; +import org.spongepowered.api.data.DataRegistration; import org.spongepowered.api.entity.living.player.Player; import org.spongepowered.api.event.EventManager; import org.spongepowered.api.event.Listener; @@ -153,7 +154,13 @@ public void registerListeners(GameInitializationEvent event) { @Listener public void registerData(GameInitializationEvent event) { logger.info("Registering custom data manipulators"); - game.getDataManager().register(WandData.class, ImmutableWandData.class, new WandDataBuilder()); + DataRegistration.builder() + .dataClass(WandData.class) + .immutableClass(ImmutableWandData.class) + .builder(new WandDataBuilder()) + .manipulatorId("wanddata") + .dataName("FoxCoreWandData") + .buildAndRegister(this.container); } @Listener