Unity - A marriage plugin


#1

This is a discussion topic for the Ore project, Unity. View the full project on Ore for downloads and more information.


Unity

This plugin allows you to marry another player. Once married, your status is shown as a heart in the chat with Nucleus. You can teleport to your partner, gift him/her some items and you both have one single home teleport.

Read the wiki to learn more

This plugin uses bstats.org which helps me to improve the user experience by collecting anonymous data. You can disable this in config/bstats/config.conf.

For quick help join my Discord server.


Marriage Plugin
#2

A new version has been released for Unity, it is available for download here.


Initial release


#3

A new version has been released for Unity, it is available for download here.


Changes:

  • Added kissing your partner(heart particles) with shift-right-clicking

#4

Amazing plugin! Thanks for this!

Just a feature suggestion if you don’t mind: Hovering over the prefix will show marriage status? Like who the person is married to and when they got married.


#5

Nice plugin, could be nice to add even a inventory share feature :wink:


#6

A new version has been released for Unity, it is available for download here.


Changes:

  • Fixed bug with Nucleus chat prefix not being shown
  • Added hover text to chat prefix

#7

Added in v2.2.1.


#8

After updating to spongeforge-1.12.2-2705-7.1.0-BETA-3350
Using unity-2.2

And running unity commands

I get this error:

[11:35:03] [Server thread/ERROR] [Sponge]: Error occurred while executing command 'marry list' for source DedicatedServer: lateinit property config has not been initialized
de.randombyte.unity.shaded.kotlin.UninitializedPropertyAccessException: lateinit property config has not been initialized
        at de.randombyte.unity.Unity.access$getConfig$p(Unity.kt:48) ~[Unity.class:?]
        at de.randombyte.unity.Unity$configAccessor$1.get(Unity.kt:79) ~[Unity$configAccessor$1.class:?]
        at de.randombyte.unity.commands.ListUnitiesCommand.execute(ListUnitiesCommand.kt:16) ~[ListUnitiesCommand.class:?]
        at org.spongepowered.api.command.args.ChildCommandElementExecutor.execute(ChildCommandElementExecutor.java:255) ~[ChildCommandElementExecutor.class:1.12.2-2705-7.1.0-BETA-3350]
        at org.spongepowered.api.command.spec.CommandSpec.process(CommandSpec.java:388) ~[CommandSpec.class:1.12.2-2705-7.1.0-BETA-3350]
        at org.spongepowered.api.command.dispatcher.SimpleDispatcher.process(SimpleDispatcher.java:341) ~[SimpleDispatcher.class:1.12.2-2705-7.1.0-BETA-3350]
        at org.spongepowered.common.command.SpongeCommandManager.process(SpongeCommandManager.java:329) [SpongeCommandManager.class:1.12.2-2705-7.1.0-BETA-3350]
        at net.minecraft.command.ServerCommandManager.func_71556_a(SourceFile:1083) [dh.class:?]
        at net.minecraft.server.dedicated.DedicatedServer.func_71333_ah(DedicatedServer.java:432) [nz.class:?]
        at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:397) [nz.class:?]
        at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:668) [MinecraftServer.class:?]
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526) [MinecraftServer.class:?]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_141]

#9

Please post the whole server log.


#10

That’s the only error that shows up, it appears in the console, everything else is just player commands, and it doesen’t crash just that error


#11

There’s definitly an error before that. Please send the whole server log.


#12

I took a look at the start up log and there this error:

[13:25:49] [Server thread/ERROR] [Sponge]: Could not pass FMLServerStartingEvent to Plugin{id=unity, name=Unity, version=2.2, authors=[RandomByte], source=./mods/unity-2.2.jar}
org.spongepowered.api.data.persistence.InvalidDataException: Could not deserialize something correctly, likely due to bad type data.
	at org.spongepowered.api.data.persistence.AbstractDataBuilder.build(AbstractDataBuilder.java:89) ~[AbstractDataBuilder.class:1.12.2-2705-7.1.0-BETA-3350]
	at org.spongepowered.common.data.SpongeDataManager.lambda$deserialize$1(SpongeDataManager.java:198) ~[SpongeDataManager.class:1.12.2-2705-7.1.0-BETA-3350]
	at java.util.Optional.flatMap(Optional.java:241) ~[?:1.8.0_141]
	at org.spongepowered.common.data.SpongeDataManager.deserialize(SpongeDataManager.java:198) ~[SpongeDataManager.class:1.12.2-2705-7.1.0-BETA-3350]
	at org.spongepowered.common.config.DataSerializableTypeSerializer.deserialize(DataSerializableTypeSerializer.java:50) ~[DataSerializableTypeSerializer.class:1.12.2-2705-7.1.0-BETA-3350]
	at org.spongepowered.common.config.DataSerializableTypeSerializer.deserialize(DataSerializableTypeSerializer.java:41) ~[DataSerializableTypeSerializer.class:1.12.2-2705-7.1.0-BETA-3350]
	at ninja.leaping.configurate.objectmapping.ObjectMapper$FieldData.deserializeFrom(ObjectMapper.java:94) ~[spongeforge-1.12.2-2705-7.1.0-BETA-3350.jar:1.12.2-2705-7.1.0-BETA-3350]
	at ninja.leaping.configurate.objectmapping.ObjectMapper$BoundInstance.populate(ObjectMapper.java:155) ~[spongeforge-1.12.2-2705-7.1.0-BETA-3350.jar:1.12.2-2705-7.1.0-BETA-3350]
	at ninja.leaping.configurate.objectmapping.serialize.TypeSerializers$AnnotatedObjectSerializer.deserialize(TypeSerializers.java:268) ~[spongeforge-1.12.2-2705-7.1.0-BETA-3350.jar:1.12.2-2705-7.1.0-BETA-3350]
	at ninja.leaping.configurate.objectmapping.serialize.TypeSerializers$ListSerializer.deserialize(TypeSerializers.java:235) ~[spongeforge-1.12.2-2705-7.1.0-BETA-3350.jar:1.12.2-2705-7.1.0-BETA-3350]
	at ninja.leaping.configurate.objectmapping.serialize.TypeSerializers$ListSerializer.deserialize(TypeSerializers.java:219) ~[spongeforge-1.12.2-2705-7.1.0-BETA-3350.jar:1.12.2-2705-7.1.0-BETA-3350]
	at ninja.leaping.configurate.objectmapping.ObjectMapper$FieldData.deserializeFrom(ObjectMapper.java:94) ~[spongeforge-1.12.2-2705-7.1.0-BETA-3350.jar:1.12.2-2705-7.1.0-BETA-3350]
	at ninja.leaping.configurate.objectmapping.ObjectMapper$BoundInstance.populate(ObjectMapper.java:155) ~[spongeforge-1.12.2-2705-7.1.0-BETA-3350.jar:1.12.2-2705-7.1.0-BETA-3350]
	at ninja.leaping.configurate.objectmapping.serialize.TypeSerializers$AnnotatedObjectSerializer.deserialize(TypeSerializers.java:268) ~[spongeforge-1.12.2-2705-7.1.0-BETA-3350.jar:1.12.2-2705-7.1.0-BETA-3350]
	at ninja.leaping.configurate.SimpleConfigurationNode.getValue(SimpleConfigurationNode.java:211) ~[spongeforge-1.12.2-2705-7.1.0-BETA-3350.jar:1.12.2-2705-7.1.0-BETA-3350]
	at ninja.leaping.configurate.ConfigurationNode.getValue(ConfigurationNode.java:491) ~[spongeforge-1.12.2-2705-7.1.0-BETA-3350.jar:1.12.2-2705-7.1.0-BETA-3350]
	at de.randombyte.unity.shaded.kosp.config.ConfigManager.get(ConfigManager.kt:48) ~[ConfigManager.class:?]
	at de.randombyte.unity.Unity.loadConfig(Unity.kt:213) ~[Unity.class:?]
	at de.randombyte.unity.Unity.onWorldsLoaded(Unity.kt:108) ~[Unity.class:?]
	at org.spongepowered.common.event.listener.GameStartingServerEventListener_Unity_onWorldsLoaded109.handle(Unknown Source) ~[?:?]
	at org.spongepowered.common.event.RegisteredListener.handle(RegisteredListener.java:95) ~[RegisteredListener.class:1.12.2-2705-7.1.0-BETA-3350]
	at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:383) [SpongeModEventManager.class:1.12.2-2705-7.1.0-BETA-3350]
	at org.spongepowered.mod.event.SpongeModEventManager.extendedPost(SpongeModEventManager.java:443) [SpongeModEventManager.class:1.12.2-2705-7.1.0-BETA-3350]
	at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:404) [SpongeModEventManager.class:1.12.2-2705-7.1.0-BETA-3350]
	at org.spongepowered.common.SpongeImpl.postEvent(SpongeImpl.java:231) [SpongeImpl.class:1.12.2-2705-7.1.0-BETA-3350]
	at org.spongepowered.mod.SpongeMod.onStateEvent(SpongeMod.java:271) [SpongeMod.class:1.12.2-2705-7.1.0-BETA-3350]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_141]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_141]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_141]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_141]
	at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91) [minecraft_server.1.12.2.jar:?]
	at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150) [minecraft_server.1.12.2.jar:?]
	at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76) [minecraft_server.1.12.2.jar:?]
	at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399) [minecraft_server.1.12.2.jar:?]
	at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71) [minecraft_server.1.12.2.jar:?]
	at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116) [minecraft_server.1.12.2.jar:?]
	at com.google.common.eventbus.EventBus.post(EventBus.java:217) [minecraft_server.1.12.2.jar:?]
	at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:218) [LoadController.class:?]
	at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:196) [LoadController.class:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_141]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_141]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_141]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_141]
	at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91) [minecraft_server.1.12.2.jar:?]
	at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150) [minecraft_server.1.12.2.jar:?]
	at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76) [minecraft_server.1.12.2.jar:?]
	at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399) [minecraft_server.1.12.2.jar:?]
	at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71) [minecraft_server.1.12.2.jar:?]
	at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116) [minecraft_server.1.12.2.jar:?]
	at com.google.common.eventbus.EventBus.post(EventBus.java:217) [minecraft_server.1.12.2.jar:?]
	at net.minecraftforge.fml.common.LoadController.redirect$onPost$zza000(LoadController.java:560) [LoadController.class:?]
	at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:135) [LoadController.class:?]
	at net.minecraftforge.fml.common.Loader.serverStarting(Loader.java:794) [Loader.class:?]
	at net.minecraftforge.fml.common.FMLCommonHandler.handleServerStarting(FMLCommonHandler.java:296) [FMLCommonHandler.class:?]
	at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:306) [nz.class:?]
	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:486) [MinecraftServer.class:?]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_141]
Caused by: org.spongepowered.api.data.persistence.InvalidDataException: Could not find world by UUID: dc4ccaf2-06ef-49e7-bda6-9d09ff2200f1
	at org.spongepowered.common.data.builder.world.LocationBuilder.buildContent(LocationBuilder.java:57) ~[LocationBuilder.class:1.12.2-2705-7.1.0-BETA-3350]
	at org.spongepowered.api.data.persistence.AbstractDataBuilder.build(AbstractDataBuilder.java:87) ~[AbstractDataBuilder.class:1.12.2-2705-7.1.0-BETA-3350]
	... 56 more

I don’t want to share the latest.log because it has alot of peoples personal information and data, but I did look at it’s just that error on startup and the error above that happens every time you run a unity command


#13
Caused by: org.spongepowered.api.data.persistence.InvalidDataException: Could not find world by UUID: dc4ccaf2-06ef-49e7-bda6-9d09ff2200f1

Did you remove that world?


#14

Yeah we got rid of an unused world, since we didn’t need it anymore


#15

I fixed that here because another user had this problem. He never responded if it works.

Retry with this pre release version: https://drive.google.com/file/d/1VKM83t7Ds_37wmjIWqJ-OAgxdAf7xhq8/view?usp=drivesdk


#16

Thank you so much, I just updated and it worked again, and the commands are working again. I will report anymore issues if I see any.


#17

A new version has been released for Unity, it is available for download here.


Changes:

  • Fixed a crash when a world referenced in the config isn’t loaded, a useful error is now shown instead

#18

A new version has been released for Unity, it is available for download here.


Changes:

  • Empty messages won’t be sent anymore

#19

can you make it so /marry tp has its own permission node?


#20

For now you could use a small script made for KtSkript to retrofit a new permission node:

Untested

registerListener<SendCommandEvent> {
  val cmd = "$command $arguments".trim()
  if (causedByPlayer && " " in cmd) {
    val splits = cmd.split(" ")
    if ((splits[0] == "unity" || splits[0] == "marry") && (splits[1] == "tp" || splits[1] == "teleport")) {
      if (!causingPlayer.hasPermission("my.very.custom.permission.node")) {
        cancelEvent()
      }
    }
  }
}