GithubHelp home page GithubHelp logo

turikhay / mapmodcompanion Goto Github PK

View Code? Open in Web Editor NEW
29.0 2.0 3.0 609 KB

Map mod support. Plugin that fixes Multi-world detection. Xaero's Minimap, VoxelMap and JourneyMap will be able to identify worlds on BungeeCord/Velocity servers.

License: MIT License

Java 72.28% Dockerfile 0.46% JavaScript 8.59% Shell 0.13% Kotlin 5.21% Python 13.34%
bukkit-plugin bungeecord-plugin minecraft minecraft-plugin paper-plugin spigot-plugin velocity-plugin xaeros-minimap folia-supported folia-plugin

mapmodcompanion's People

Contributors

dependabot[bot] avatar github-actions[bot] avatar gradle-update-robot avatar srbedrock avatar turikhay avatar turikhay-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

mapmodcompanion's Issues

broken with Paper with CB packge relocation

https://forums.papermc.io/threads/important-dev-psa-cb-package-relocation-will-be-removed.1106/
Here is the error

[19:55:30 ERROR]: [EntrypointUtil] Encountered exception remapping plugins
java.lang.RuntimeException: Encountered exception remapping plugins
        at io.papermc.paper.pluginremap.PluginRemapper.waitForAll(PluginRemapper.java:274) ~[paper-1.20.4.jar:git-Paper-"84a586f"]
        at io.papermc.paper.pluginremap.PluginRemapper.rewritePluginDirectory(PluginRemapper.java:163) ~[paper-1.20.4.jar:git-Paper-"84a586f"]
        at io.papermc.paper.plugin.provider.source.DirectoryProviderSource.prepareContext(DirectoryProviderSource.java:42) ~[paper-1.20.4.jar:git-Paper-"84a586f"]
        at io.papermc.paper.plugin.provider.source.DirectoryProviderSource.prepareContext(DirectoryProviderSource.java:17) ~[paper-1.20.4.jar:git-Paper-"84a586f"]
        at io.papermc.paper.plugin.util.EntrypointUtil.registerProvidersFromSource(EntrypointUtil.java:14) ~[paper-1.20.4.jar:git-Paper-"84a586f"]
        at io.papermc.paper.plugin.PluginInitializerManager.load(PluginInitializerManager.java:105) ~[paper-1.20.4.jar:git-Paper-"84a586f"]
        at net.minecraft.server.Main.main(Main.java:131) ~[paper-1.20.4.jar:git-Paper-"84a586f"]
        at org.bukkit.craftbukkit.Main.main(Main.java:326) ~[paper-1.20.4.jar:git-Paper-"84a586f"]
        at io.papermc.paperclip.Paperclip.lambda$main$0(Paperclip.java:42) ~[app:?]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.util.concurrent.CompletionException: java.lang.RuntimeException: Failed to remap plugin jar 'plugins\MapModCompanion.jar'
        at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315) ~[?:?]
        at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320) ~[?:?]
        at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:649) ~[?:?]
        at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        ... 1 more
Caused by: java.lang.RuntimeException: Failed to remap plugin jar 'plugins\MapModCompanion.jar'
        at io.papermc.paper.pluginremap.PluginRemapper.lambda$remapPlugin$0(PluginRemapper.java:226) ~[paper-1.20.4.jar:git-Paper-"84a586f"]
        at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646) ~[?:?]
        at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        ... 1 more
Caused by: java.lang.IllegalStateException: Duplicate entries detected: com/turikhay/mc/mapmodcompanion/shade/org/bstats/MetricsBase.class, com/turikhay/mc/mapmodcompanion/shade/org/bstats/charts/AdvancedBarChart.class, com/turikhay/mc/mapmodcompanion/shade/org/bstats/charts/AdvancedPie.class, com/turikhay/mc/mapmodcompanion/shade/org/bstats/charts/CustomChart.class, com/turikhay/mc/mapmodcompanion/shade/org/bstats/charts/DrilldownPie.class, com/turikhay/mc/mapmodcompanion/shade/org/bstats/charts/MultiLineChart.class, com/turikhay/mc/mapmodcompanion/shade/org/bstats/charts/SimpleBarChart.class, com/turikhay/mc/mapmodcompanion/shade/org/bstats/charts/SimplePie.class, com/turikhay/mc/mapmodcompanion/shade/org/bstats/charts/SingleLineChart.class, com/turikhay/mc/mapmodcompanion/shade/org/bstats/config/MetricsConfig.class, com/turikhay/mc/mapmodcompanion/shade/org/bstats/json/JsonObjectBuilder$1.class, com/turikhay/mc/mapmodcompanion/shade/org/bstats/json/JsonObjectBuilder$JsonObject.class, com/turikhay/mc/mapmodcompanion/shade/org/bstats/json/JsonObjectBuilder.class
        at net.minecraftforge.fart.internal.RenamerImpl.run(RenamerImpl.java:203) ~[paper-1.20.4.jar:?]
        at net.minecraftforge.fart.internal.RenamerImpl.run(RenamerImpl.java:94) ~[paper-1.20.4.jar:?]
        at io.papermc.paper.pluginremap.PluginRemapper.lambda$remapPlugin$0(PluginRemapper.java:223) ~[paper-1.20.4.jar:git-Paper-"84a586f"]
        at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646) ~[?:?]
        at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        ... 1 more

Xaero's WorldMap 1.37.x ignores LevelMapProperties packet

Jasper @r3ps4J reported this issue in our Discord.

I've asked Xaero on his Discord server for Patreon members about this bug and he said:

You can work around this by sending the level properties packet before the game sends the world spawn packet

Unfortunately, as far as I know it is not possible with the standard Bukkit API. This has worked before, and Xaero kindly agreed to restore this functionality.

Confirmed to be working:

  • WorldMap 1.36.0 (1.20.1)
  • WorldMap 1.37.8 (1.20.4) (fixed)

Confirmed not to be working:

  • WorldMap 1.37.0+ (1.20.x+)
  • WorldMap 1.37.7 (1.20.4)

Expanded Radar Support for journy map.

Currently jm forge/fabric server-side mod can let the players see other players on the map outside of render range, anywhere in their current dimension. I'm wondering whether this feature can be supported by MapModComanion as well since jm currently has no time to develop this feature for Bukkit server.

Forge VoxelMap (1.13.2 - 1.16.3) doesn't recognize worlds

Explanation and fix

VoxelMap on Forge 1.13.2 - 1.16.4 sends ambiguous request packet.
By default, we send a standard response, which is supported by later versions of VoxelMap, but in this case the mod expects different response.
If you use older VoxelMap versions, please install ProtocolLib alongside MapModCompanion in your Bukkit/Spigot/Paper server.

Original issue

Fabric versions work fine

Confirmed Minecraft versions:

  • 1.13.2
  • 1.14.4
  • 1.15.2
  • 1.16.1
  • 1.16.2
  • 1.16.3
Client
[19:11:06.835] [Client thread/INFO] [STDERR/]: [com.mamiyaotaru.voxelmap.forgemod.WorldIDPacket:decode:45]: Failed to read message: java.lang.IndexOutOfBoundsException: readerIndex(2) + length(42) exceeds writerIndex(7): PooledUnsafeDirectByteBuf(ridx: 2, widx: 7, cap: 7)
Server
tests_e2e-proxy-1          | [19:11:06 INFO] [MapModCompanion - worldinfo:world_id]: [worldinfo:world_id] Data sent from turikhay to net.md_5.bungee.ServerConnection@3fb9ef3b (channel worldinfo:world_id):
tests_e2e-proxy-1          | [19:11:06 INFO] [MapModCompanion - worldinfo:world_id]: [worldinfo:world_id] Data (0): [0, 42, 0]
tests_e2e-server-1         | [19:11:06 INFO]: [MapModCompanion - worldinfo:world_id] Sending world_id packet to turikhay: [0, 42, 4, 49, 51, 51, 55]
tests_e2e-proxy-1          | [19:11:06 INFO] [MapModCompanion - worldinfo:world_id]: [worldinfo:world_id] Data sent from net.md_5.bungee.ServerConnection@3fb9ef3b to turikhay (channel worldinfo:world_id):
tests_e2e-proxy-1          | [19:11:06 INFO] [MapModCompanion - worldinfo:world_id]: [worldinfo:world_id] Data (0): [0, 42, 4, 49, 51, 51, 55]
tests_e2e-proxy-1          | [19:11:06 INFO] [MapModCompanion - worldinfo:world_id]: [worldinfo:world_id] Intercepting world_id packet sent to turikhay (channel worldinfo:world_id): PrefixedId{prefixLength=1, id=1337} -> PrefixedId{prefixLength=1, id=1337}

[Question] 1.7.10 Minimaps?

Hello :)
I saw that most minimaps are only supported for version 1.8 and later, is this caused by the minimaps itself or could support be added?

Greetings,
@UeberallGebannt

Duplicate world detection

In rare cases, different worlds may not have unique identifiers within the server network. To rule out the possibility of this, the BungeeCord/Velocity plugin "combine" the world ID from the downstream server with the name of same server. That's why I recommend installing the plugin on both proxy and the server.

Most of the time servers send completely unique IDs that can be sent to players as-is.

We may try to implement the solution that wouldn't change the world ID if it's already unique.

What do you think?

Configuration reloading is broken in Folia

[18:53:38 ERROR]: [MapModCompanion - FileChangeWatchdog] File change callback error
java.lang.UnsupportedOperationException: null
        at org.bukkit.craftbukkit.scheduler.CraftScheduler.handle(CraftScheduler.java:533) ~[main/:?]
        at org.bukkit.craftbukkit.scheduler.CraftScheduler.runTaskTimer(CraftScheduler.java:233) ~[main/:?]
        at org.bukkit.craftbukkit.scheduler.CraftScheduler.runTaskTimer(CraftScheduler.java:209) ~[main/:?]
        at org.bukkit.craftbukkit.scheduler.CraftScheduler.scheduleSyncRepeatingTask(CraftScheduler.java:204) ~[main/:?]
        at org.bukkit.craftbukkit.scheduler.CraftScheduler.scheduleSyncDelayedTask(CraftScheduler.java:168) ~[main/:?]
        at org.bukkit.craftbukkit.scheduler.CraftScheduler.scheduleSyncDelayedTask(CraftScheduler.java:137) ~[main/:?]
        at com.turikhay.mc.mapmodcompanion.spigot.MapModCompanion.lambda$load$0(MapModCompanion.java:93) ~[MapModCompanion.jar:?]
        at com.turikhay.mc.mapmodcompanion.FileChangeWatchdog.tick(FileChangeWatchdog.java:55) ~[MapModCompanion.jar:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[?:?]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) ~[?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:840) ~[?:?]

Forge VoxelMap 1.12.2 disconnects on join

image

LiteLoader VoxelMap 1.12.2 is not affected

Server 1.12.2
tests_e2e-proxy-1          | [17:09:48 INFO] [MapModCompanion - world_id]: [world_id] Data sent from turikhay to net.md_5.bungee.ServerConnection@b94ed9d (channel world_id):
tests_e2e-proxy-1          | [17:09:48 INFO] [MapModCompanion - world_id]: [world_id] Data (0): [0, 0]
tests_e2e-server-1         | [17:09:48 INFO]: [MapModCompanion - world_id] Sending world_id packet to turikhay: [42, 4, 49, 51, 51, 55]
tests_e2e-proxy-1          | [17:09:48 INFO] [MapModCompanion - world_id]: [world_id] Data sent from net.md_5.bungee.ServerConnection@b94ed9d to turikhay (channel world_id):
tests_e2e-proxy-1          | [17:09:48 INFO] [MapModCompanion - world_id]: [world_id] Data (0): [42, 4, 49, 51, 51, 55]
tests_e2e-proxy-1          | [17:09:48 INFO] [MapModCompanion - world_id]: [world_id] Intercepting world_id packet sent to turikhay (channel world_id): PrefixedId{prefixLength=0, id=1337} -> PrefixedId{prefixLength=0, id=1337}
tests_e2e-proxy-1          | [17:09:48 INFO]: [/xxx:55172|turikhay] -> UpstreamBridge has disconnected
tests_e2e-proxy-1          | [17:09:48 INFO]: [/xxx:55172|turikhay] <-> DownstreamBridge <-> [lobby] has disconnected
tests_e2e-server-1         | [17:09:48 INFO]: turikhay lost connection: Disconnected
tests_e2e-server-1         | [17:09:48 INFO]: turikhay left the game
Client 1.12.2
[Netty Client IO #0/ERROR] [FML]: FMLIndexedMessageCodec exception caught
io.netty.handler.codec.DecoderException: java.lang.NullPointerException: Undefined message for discriminator 42 in channel world_id
	at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:98) ~[MessageToMessageDecoder.class:4.1.9.Final]
	at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111)

...

Caused by: java.lang.NullPointerException: Undefined message for discriminator 42 in channel world_id
	at net.minecraftforge.fml.common.network.FMLIndexedMessageToMessageCodec.decode(FMLIndexedMessageToMessageCodec.java:107) ~[FMLIndexedMessageToMessageCodec.class:?]
	at net.minecraftforge.fml.common.network.FMLIndexedMessageToMessageCodec.decode(FMLIndexedMessageToMessageCodec.java:41) ~[FMLIndexedMessageToMessageCodec.class:?]
	at io.netty.handler.codec.MessageToMessageCodec$2.decode(MessageToMessageCodec.java:81) ~[MessageToMessageCodec$2.class:4.1.9.Final]
	at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:88) ~[MessageToMessageDecoder.class:4.1.9.Final]
	... 53 more

Configuration file support

Currently, in order to fine-tune the plugin, the user have to set system properties in Java (e.g. by having an access to the command that is used to start the server).

Folia support

Folia is a new fork of Paper that adds regionized multithreading to the server.

only plugins that have been explicitly marked by the author(s) to work with Folia will be loaded. By placing "folia-supported: true" into the plugin's plugin.yml, plugin authors can mark their plugin as compatible with regionised multithreading.

[1] (from "The new rules" section)

Fabric support

๐Ÿ‘ or ๐Ÿ‘Ž ?

As an alternative, install JourneyMap and Xaero's Minimap on the server side. This will enable all their features natively.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.