Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minestom platform Support #3259

Open
NicklasMatzulla opened this issue Oct 12, 2023 · 9 comments
Open

Minestom platform Support #3259

NicklasMatzulla opened this issue Oct 12, 2023 · 9 comments
Labels
Help Wanted Issues that could use some help New Platform Tickets that require adding support for new runtime environment

Comments

@NicklasMatzulla
Copy link

I would like to be able to..

Minestom is a Minecraft server implementation which allows to host resource-pairing Minecraft servers. Minestom, unlike Paper and other Spigot forks, is not based on the Minecraft source code and implements only the most necessary Minecraft features.

Minestom is especially well suited for lobby servers, as well as minigames like BedWars or similar. Since Minestom is getting bigger and many servers use it, I think Plan for Minestom should be supported as well.

Is your feature request related to a problem? Please describe.

Since the Minestom API is not based on that of Spigot, and has its own full-featured API, Plan cannot run on Minestom servers. Due to the good programming of Plan, it should be easy (compared to other plugins) to support this platform. I think it is worth the time to offer a new platform, this would only make Plan more popular than it already is.

@AuroraLS3 AuroraLS3 added the New Platform Tickets that require adding support for new runtime environment label Oct 13, 2023
@AuroraLS3
Copy link
Collaborator

AuroraLS3 commented Oct 13, 2023

It may be difficult to support since it does not come with a built-in plugin loading support (at least from a quick look)

Never mind they do have some sort of support https://wiki.minestom.net/expansion/extensions

@ajh123
Copy link

ajh123 commented Jun 23, 2024

That extension system has now been removed. Minestom is meant to be used as an API anyway so if someone wants to use a plugin then they need to include it with Gradle / Maven then activate the plugin. See https://github.com/TogAr2/MinestomPvP for an example.

@AuroraLS3
Copy link
Collaborator

What a weird system, it's not really a plug-in if you need to recompile the source with added libraries 🤔

@ajh123
Copy link

ajh123 commented Jun 23, 2024

I agree, however it is up to the Minestom user to enable plugin support by adding https://github.com/hollow-cube/minestom-ce-extensions as a dependency, but I'm not sure if it will get constantly updated.

@AuroraLS3
Copy link
Collaborator

AuroraLS3 commented Jun 23, 2024

Events, data or APIs expected by Plan - availability in Minestorm

Event/data Availability
Player UUID Someone implementing the server needs to provide this ⚠️ https://minestom.net/docs/feature/player-uuid
Player join AsyncPlayerConfigurationEvent
Player register date No implementation, use System.currentTimeMillis similar to Proxy servers
Player nickname getDisplayName()
Player leave PlayerDisconnectEvent
Player world change AddEntityToInstanceEvent
Player kick No event, would need to parse kickMessage() and figure things out. Kick data is so minor that I'd just leave it out entirely.
Death PlayerDeathEvent
Entity Death EntityDeathEvent
Player gamemode change https://javadoc.minestom.net/net/minestom/server/event/player/PlayerGameModeChangeEvent.html
Chat message event PlayerChatEvent
Player movement PlayerMoveEvent
Player online count Instance#getPlayers()
TPS Game ticks are executed per instance as far as I'm aware so it may be difficult to calculate this. This thing is undocumented https://javadoc.minestom.net/net/minestom/server/event/server/ServerTickMonitorEvent.html
Chunk count InstanceRegisterEvent and InstanceUnregisterEvent in addition to Instance#getChunks
Entity count AddEntityToInstanceEvent and RemoveEntityFromInstanceEvent
Player ping getLatency()
Java performance metrics
Join address (Minecraft hello packet) getServerAddress()
Player #hasPermission https://minestom.net/docs/feature/permissions
Player #sendMessage Adventure based api, could reuse fabric parts
Commands Brigadier based api, could reuse fabric parts
Allowlist No implementation
Plugin lifecycle No implementation - Extra implementation work on top of platform abstractions to allow reloads if Plan fails to enable.
Server shutdown Unknown, may need to use JVM shutdown hook to finish transactions
Task system https://minestom.net/docs/feature/schedulers https://javadoc.minestom.net/net/minestom/server/timer/Scheduler.html, can use same task system implementation as fabric for async events
Plugin version history No concept of plugin versions
Logging SLF4J, can use same logging implementation for Platform layer as Sponge

@AuroraLS3
Copy link
Collaborator

If anyone (or many people) want to take a wack at this feel free to. Fabric implementation was added to Plan by work of 3 developers so you don't even need to implement all of it, just some of it. I'd appreciate if it built into a separate jar similar to how fabric module does it - that way it would be possible to just publish it through jitpack and call it a day.

It's a bit concerning to hear about removed apis though. I probably won't take on mainenance burden of Minestorm support if it is implemented (So if anyone is using it at that point and it breaks I will expect them to fix it and PR a fix.)

@AuroraLS3 AuroraLS3 added the Help Wanted Issues that could use some help label Jun 23, 2024
@ajh123
Copy link

ajh123 commented Jun 23, 2024

For logging Minstom uses SLF4J

For Player online count you can use Instance#getPlayers() which returns a Collection of all the players on that instance (world). To get the entire player count you need to iterate through all the instances (use InstanceManager#getInstances()), access to the InstanceManager is granted with MinecraftServer#getInstanceManager()

@AuroraLS3
Copy link
Collaborator

Added those to the table.

@ajh123
Copy link

ajh123 commented Jun 23, 2024

Those API (extension system) removals were done by a community driven "maintenance" of Minestom known as Minestom CE (which came to life due to Minestom development slowing down). Then Minestom CE was merged back into Minestom.

Minestom CE redesigned Minestom to be an API rather than a runnable server so they refactored it a lot. Now that's done, hopefully they will stay the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help Wanted Issues that could use some help New Platform Tickets that require adding support for new runtime environment
Projects
Status: Refined & Actionable
Development

No branches or pull requests

3 participants