Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

Add more Object-oriented programming API. #119

Open
Rollczi opened this issue Jan 21, 2024 · 3 comments · May be fixed by #125
Open

Add more Object-oriented programming API. #119

Rollczi opened this issue Jan 21, 2024 · 3 comments · May be fixed by #125

Comments

@Rollczi
Copy link

Rollczi commented Jan 21, 2024

Static API is a poor solution if someone wants to run two server instances.
I want to be able to get an object of a started process with all services.

for example:

MinecraftServer minecraftServer = MinecraftServer.init();
InstanceManager instanceManager = minecraftServer.getInstanceManager();
Server server = minecraftServer.getServer();
CommandManager commandManager = minecraftServer.getCommandManager();
GlobalEventHandler eventHandler = minecraftServer.getGlobalEventHandler();
@Rollczi
Copy link
Author

Rollczi commented Jan 21, 2024

Related: #70

@Rollczi
Copy link
Author

Rollczi commented Jan 21, 2024

In my case:
Recently, when I started extending support to LiteCommands, I noticed that more and more parameters were needed in the builder method.

image
if it continues like this, I will have to get all the services/managers etc.

I want LiteCommands users to be able to use the framework conveniently, but I also don't want to use Minestom statics :/

Also, I use minestom community edition in my project

@mworzala
Copy link

I think you should just use the static MinecraftServer for now, although I am not opposed to this change in the future.

@MelonHell MelonHell linked a pull request Jan 28, 2024 that will close this issue
@mworzala mworzala linked a pull request Jan 29, 2024 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants