Skip to content

Instantly share code, notes, and snippets.

@tyhdefu
Created June 5, 2020 14:19
Show Gist options
  • Save tyhdefu/84384fdfea455ec9ceebbabff09f1c0d to your computer and use it in GitHub Desktop.
Save tyhdefu/84384fdfea455ec9ceebbabff09f1c0d to your computer and use it in GitHub Desktop.
@Listener
public void onPreInit(GamePreInitializationEvent e) {
try (CauseStackManager.StackFrame frame = Sponge.getCauseStackManager().pushCauseFrame()) {
frame.pushCause(container);
DataRegistration.builder()
.name(DISGUISED.getName())
.id(DISGUISED.getId()) // prefix is added for you and you can't add it yourself
.dataClass(DisguisedData.class)
.immutableClass(DisguisedData.Immutable.class)
.builder(new DisguisedDataImpl.Builder())
.build();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment