Stargate Rewritten

Stargate Rewritten

241 Downloads

[TMS TMP007] Interserver / Custom Conflicts

Pheotis opened this issue · 5 comments

commented

image
image

Portals on interserver networks are not accessible to portals on custom networks of the same name (and vice-versa).
If this is intended, identical custom and interserver network names should be treated as conflicts.
If this is not intended, portals on custom network "a" should show up for portals on interserver network "a", provided they are on the same server instance; and portals on interserver network "a" should be accessible to portals on custom network "a", provided they are on the same server instance.

commented

Is there any way to make this more clear, also could we merge the message with the portal creation message?

Hmm, or what do you mean should be inside the %interserverNetworkName% and %netName%. Like will that not be the same string?

commented

This only prints on the "Min" instance of the "continuum" test (Spigot 1.15 connected to mysql w/ usessl false).
An identical problem nonetheless occurs on the "max" instance (Up to date purpur).

[16:50:53] [Server thread/INFO]:
[16:50:53] [Server thread/WARN]: org.sgrewritten.stargate.exception.name.NameConflictException: network of id '<@default@>' already exists
[16:50:53] [Server thread/WARN]:        at org.sgrewritten.stargate.network.StargateRegistry.createNetwork(StargateRegistry.java:106)
[16:50:53] [Server thread/WARN]:        at org.sgrewritten.stargate.network.StargateRegistry.createNetwork(StargateRegistry.java:118)
[16:50:53] [Server thread/WARN]:        at org.sgrewritten.stargate.listener.StargateBungeePluginMessageListener.updateNetwork(StargateBungeePluginMessageListener.java:162)
[16:50:53] [Server thread/WARN]:        at org.sgrewritten.stargate.listener.StargateBungeePluginMessageListener.onPluginMessageReceived(StargateBungeePluginMessageListener.java:123)
[16:50:53] [Server thread/WARN]:        at org.bukkit.plugin.messaging.StandardMessenger.dispatchIncomingMessage(StandardMessenger.java:455)
[16:50:53] [Server thread/WARN]:        at net.minecraft.server.v1_15_R1.PlayerConnection.a(PlayerConnection.java:2472)
[16:50:53] [Server thread/WARN]:        at net.minecraft.server.v1_15_R1.PacketPlayInCustomPayload.a(SourceFile:44)
[16:50:53] [Server thread/WARN]:        at net.minecraft.server.v1_15_R1.PacketPlayInCustomPayload.a(SourceFile:9)
[16:50:53] [Server thread/WARN]:        at net.minecraft.server.v1_15_R1.PlayerConnectionUtils.lambda$0(PlayerConnectionUtils.java:19)
[16:50:53] [Server thread/WARN]:        at net.minecraft.server.v1_15_R1.TickTask.run(SourceFile:18)
[16:50:53] [Server thread/WARN]:        at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeTask(SourceFile:144)
[16:50:53] [Server thread/WARN]:        at net.minecraft.server.v1_15_R1.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23)
[16:50:53] [Server thread/WARN]:        at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeNext(SourceFile:118)
[16:50:53] [Server thread/WARN]:        at net.minecraft.server.v1_15_R1.MinecraftServer.aZ(MinecraftServer.java:917)
[16:50:53] [Server thread/WARN]:        at net.minecraft.server.v1_15_R1.MinecraftServer.executeNext(MinecraftServer.java:910)
[16:50:53] [Server thread/WARN]:        at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeAll(SourceFile:103)
[16:50:53] [Server thread/WARN]:        at net.minecraft.server.v1_15_R1.MinecraftServer.sleepForTick(MinecraftServer.java:893)
[16:50:53] [Server thread/WARN]:        at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:827)
[16:50:53] [Server thread/WARN]:        at java.base/java.lang.Thread.run(Thread.java:829)
[16:57:52] [Server thread/WARN]: org.sgrewritten.stargate.exception.name.NameConflictException: network of id 'intsrvnet' already exists
[16:57:52] [Server thread/WARN]:        at org.sgrewritten.stargate.network.StargateRegistry.createNetwork(StargateRegistry.java:106)
[16:57:52] [Server thread/WARN]:        at org.sgrewritten.stargate.network.StargateRegistry.createNetwork(StargateRegistry.java:118)
[16:57:52] [Server thread/WARN]:        at org.sgrewritten.stargate.listener.StargateBungeePluginMessageListener.updateNetwork(StargateBungeePluginMessageListener.java:162)
[16:57:52] [Server thread/WARN]:        at org.sgrewritten.stargate.listener.StargateBungeePluginMessageListener.onPluginMessageReceived(StargateBungeePluginMessageListener.java:123)
[16:57:52] [Server thread/WARN]:        at org.bukkit.plugin.messaging.StandardMessenger.dispatchIncomingMessage(StandardMessenger.java:455)
[16:57:52] [Server thread/WARN]:        at net.minecraft.server.v1_15_R1.PlayerConnection.a(PlayerConnection.java:2472)
[16:57:52] [Server thread/WARN]:        at net.minecraft.server.v1_15_R1.PacketPlayInCustomPayload.a(SourceFile:44)
[16:57:52] [Server thread/WARN]:        at net.minecraft.server.v1_15_R1.PacketPlayInCustomPayload.a(SourceFile:9)
[16:57:52] [Server thread/WARN]:        at net.minecraft.server.v1_15_R1.PlayerConnectionUtils.lambda$0(PlayerConnectionUtils.java:19)
[16:57:52] [Server thread/WARN]:        at net.minecraft.server.v1_15_R1.TickTask.run(SourceFile:18)
[16:57:52] [Server thread/WARN]:        at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeTask(SourceFile:144)
[16:57:52] [Server thread/WARN]:        at net.minecraft.server.v1_15_R1.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23)
[16:57:52] [Server thread/WARN]:        at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeNext(SourceFile:118)
[16:57:52] [Server thread/WARN]:        at net.minecraft.server.v1_15_R1.MinecraftServer.aZ(MinecraftServer.java:917)
[16:57:52] [Server thread/WARN]:        at net.minecraft.server.v1_15_R1.MinecraftServer.executeNext(MinecraftServer.java:910)
[16:57:52] [Server thread/WARN]:        at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeAll(SourceFile:103)
[16:57:52] [Server thread/WARN]:        at net.minecraft.server.v1_15_R1.MinecraftServer.sleepForTick(MinecraftServer.java:893)
[16:57:52] [Server thread/WARN]:        at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:827)
[16:57:52] [Server thread/WARN]:        at java.base/java.lang.Thread.run(Thread.java:829)
commented

I believe that #261 is the long term solution to this.
In the interim, some strict conflict management is probably the easiest temporary fix.
If we treat interserver networks as their own type, when we implement network integration, we can simply convert them all to custom networks.

It's far from ideal, but it's hopefully simple enough to speed up the parity release.
As such, I think the new conflict behaviour should look something like this:

image

commented

This will still be as hard to implement, as doing it properly. Also this is confusing as we should technically remove interserver networks completely as of issue #261 and only have interserver portals instead.

The hard part is really not to implement the conflict management itself, but rather to implement a infrastructure to be able to do any conflict management at all

commented

This is unfortunate; to recap our recent discussions:

  • The long-term fix for this is #261, and will involve removing interserver portals as a network type and adding the protocol needed for the I flag to work on normal portals (effectively propagating networks cross-servers)
  • The long-term fix is too daunting for the 1.0.1.0 timelines; as such, it will now be the key feature of 1.1.0.0
  • In the interim, although this fix is far from ideal, we will allow duplicate interserver networks to exist (since it is too difficult to block the creation of such networks within our current time constraints).
  • Interserver networks will need to be clearly differentiated from their local counterparts; for the time being, this will probably just be done with very clear brackets: &l⦓&rThis&l⦔.
  • When we get around to the proper solution for #261 , we can migrate all interserver networks to their closest logical custom network.

Note that this issue will now also involve solving this problem.

Probably also best to add a temporary message (I can add it to the localisations):

If we detect a conflict within our current technical capabilities (which are partial, although not complete):

[Stargate] Interserver gates are still in active development and have only partially been implemented.
[Stargate] The %interserverNetName% has been temporarily separated from the %netName% network, but will soon be merged.

If not:

[Stargate] Interserver gates are still in active development and have only partially been implemented.
[Stargate] The %interserverNetName% network will be migrated to the %netName% network in the near future.