You are browsing as a guest. Sign up (or log in) to start making projects!

Ministom

  • 10 Devlogs
  • 71 Total hours

I need to write a Java exam in a few weeks and therefore I now programm a Minecraft minigame server with Minestom (a library to make your own Minecraft servers from Scratch).

Open comments for this post

8h 26m 40s logged

I totally not know what title i should write down

Context
I am trieng to create a mini game server for Minecraft with the help of Minestom which is a java library toolkit to create servers from scratch

I only have minor changes to tell you because I am working on a BIG thing right now but i don’t know if it is going to work.

But this is what i have added/changed

  • Added teleport command to throw my friend around while testing because they are non technical and somehow don’t get used to the commands i made :(
  • Made banned players get kicked while in the login phase instead of when they are already logged in
  • Added a line shape to my in game world editor
  • Now the world editor takes care of worlds itself instead of having to work with messy code working with the default games manager thing i created
  • Created a rank. Players can now have ranks like idk “admin” or “dev” & so on. They are only visual in the tab list and everywhere else their names are.

and i had fun with redo/undo feature of the in game editor as you can see in the pictures

0
0
11
Open comments for this post

5h 13m 10s logged

I like snow

Context
I am creating a mini game server for Minecraft with a java library named Minestom which allows you to create a server from scratch for Minecraft

Today i continued programming my in world editor. Now you can copy &
paste structures. You also can now create a sphere if you want.


The snow thing in the title is about the newest game. A snow ball fight game where
you have to throw others from the map by throwing snow balls.

Did you know that snow balls are not real projectiles because they can’t hit players. It is a bit hard to make them hit players.


I also made the map for the spleef game & already created a map for
the snow ball fight game.
Both were now made with my own in game editor without additional tools.

0
0
16
Open comments for this post

2h 17m 19s logged

CTRL+Z would be useful i think

Context
I am creating my own mini game server for Minecraft withe Minestom,
a java library to create your own server for Minecraft from scratch.

I managed to get the build tool to a moderate level of usability.

You can now:

  • select an area
    • over wooden axe
    • over pos1 and pos2 command
  • fill selected area
  • setblock at specific position
  • replace blocks in selected area
  • undo & redo actions you did
  • give yourself an item you need and don’t find in creative menu like a
    light block or a command block or something

I also made the world where you can edit maps calculate light in the
world.

Thanks to that i managed to fix some light issues i had previously with
my lobby map. Now i don’t have to give all player night vision the
entire time.

0
0
13
Open comments for this post

6h 18m 20s logged

Programming a in game world editor because i am too lazy to create server code for axiom or other tools

Context
I am creating a custom mini game server for Minecraft with Minestom
A library allowing to write a java Minecraft server from scratch

Today i spent most of my time building a in game world editor functioning similar to the popular world edit plugin.

My little twist is that i use the new displayblocks Minecraft offers to make a visual appealing selection box of what you selected. It is ridicules how long it took me >:(

I also made it possible to load specific worlds and edit them which are saved after you are finished this way i could for example modify the TntRun game world a bit to my liking while the server runs but these modifications made are permanent. Normally worlds don’t get saved after the mini game is finished.

So now i could just rely on my own tools instead of having to create a world in vanilla Minecraft and then import them into my Minestom project.

I also touched the idea of trying to implement protocol code of Luanti or formally known as Minetest which works with Minestom to let players join through Minetest for people who don’t want to use proprietary applications or don’t have an account for regular Minecraft. But i will probably fail at that task because it is waaay over my head :|

0
0
5
Open comments for this post

16h 9m 9s logged

Oh no i forgot to do a post 👀

Well, here we are 16 hours in… again.

Context
I am programming a mini game server for Minecraft with Minestom, a library which allows me to create my own server from scratch. (in java)

Overview of what i have done

  • Added a server side console where an administrator can input commands which the server executes with a library called jLine
  • Tried making a workflow for automatically building with some success
  • Made a Spleef game prototype
  • Improved the ghost player system
  • Made a ui makeover for chat elements (again again)
  • Added some new abilities/commands

Server side console

I have added a console thing where, after the server started, somebody with access to the terminal can run commands as the server with all permissions.

For that i used a lib called jLine to make it just like the consoles most Minecraft server administrators should be familiar with.

The actual hard part was that i had to rewrite some of the code i already have done. For example commands that would only work if they where run by a player needed now to check first if the command caller is the server actually itself.

Actions

I never used github actions or something like that.

So i did the normal thing and created a runner for my own forgejo git instance and build an action without understanding more than 60% of it or even less.

While i did not manage to create a docker build process i managed to create an action which builds my gradle java project with shadowjar and puts all required files into a zip which gets saved to my repo as an artifact file to be downloaded and executed instantly.

turns out it is really dumb to try create an action on an runner which uses podman which uses docker in docker in a container which now should have installed docker inside of that to build an image?
IDK man i have to sleep at some point

Ghosts

I have already made a system letting games make players ghosts who can’t interact with the world around them.
Now i have made it like hypixel does it. Players are getting hidden from all other players. Not by giving them an invisible potion or something. The server lets players disappear by just not sending information about their whereabouts to the other players oh and they are in a survival mode but can still fly. TO NOT LET THEM ESCAPE MUHAHA i am evil or something.

Oh and new commands

I have made small commands which i though would be fun.

hide

Tell server to hide your player account by the same principle as the ghost system.

fly

Enable flying for your player account.

stop

Literally stops the server

help

A help command which tells players all about the commands they can access with their permissions

nickname

Kicks you but after joining again you will be logged in as another account name with the others skin etc. Only your uuid will stay the same to still be able to fetch your accurate permission etc. on the server.

(of course this and most of the others commands on this level are behind permissions and can’t be accessed that easily)

By, by

Hope you have a great rest of a good day!

I am currently on vacation and therefore have to use my Labtop instead of my PC. I already miss him i just tried another linux distro on it :(

0
0
12
Open comments for this post

7h 33m 28s logged

Security

Context
I am creating a custom mini game server for Minecraft with Minestom.
A library allowing to write a java Minecraft server from scratch

Security is one of my least favorite thing because it is sooooooooo complicated to get done right but this time it is not about security for protecting the server itself. It is about user security.

Banning

Every public server (sometimes also private ones) need a ban system. I now have implemented one which allows banning players even if they are not on the server by using Mojang’s public API to get the uuid of players with their name. This uuid gets saved alongside a ban time and a reason for the ban to the sqlite database.

The players are also automatically kicked when the writing to the database happens.

Each time players try to connect to the server it first checks if they are banned or not. If yes they kick them instantly again with information for them about how long the ban is etc.

Players get also automatically unbanned if they ban time runs out.

Or an player with sufficiant permissions can unban them over /unban unban <player> manually.

Permanent bans are also possible by telling the server the ban time is 0.

Report system

Players can now report others with a reason. Administrators can then look up all open reports not handled by another administrator. They can view information about the report like who is reported, when is reported, why is reported.

After they have researched if the player actually made something stupid they can react to it and tell the report system to archive the report and tell a reason/a explanation on how/why it is fixed now for future administrator actions to look at.

Chats

Going to a more fun little thing.

Now every player can only chat with other players in the same world/crate/game/whateveryouwannecallthem so that not all players are getting flooded by messages by ALL players of the ENTIRE server.

Auto banning

I also gone ahead and made a system which checks those chat messages before sending them to other players for words from a word blacklist configured in the server configuration. If a match is found the player who send that message gets instantly banned for using a blacklisted word.

This is just basic security from people using bad/horrible words in chat for/with others.

When the system maybe fail to detect something because players are probably starting using cryptic things to express words we also have the report system and the logs made from those chat conversation which can be viewed by server administration.

0
0
10
Open comments for this post

8h 7m 47s logged

Let me just shortly re implement everything

Context
I am creating a custom mini game server for Minecraft with Minestom
A library allowing to write a java Minecraft server from scratch

Overview

Yesterday and today i did this here

  • Now hard coded values are instead read from properties file
  • Made nearly all commands rely on same design in chat to look good
  • Players who disconnect also leave queues now automatically
  • On shutdown the server actually closes things like THE DATABASE CONNECTION :|
  • Made queue reset if players leave while in start sequence
  • Made a little game loop system for all games (countdown to start/countdown to end)
  • Create auto completion for queue- & permissions command
  • Rewrote large portions of the queue and party system

Config file

I now use the same thing for config files the official Minecraft server uses. .properties. It is actually a library provided by java and does not use any other dependencies.

Same design everywhere to feel at home

Mostly all commands now rely on the same design in the chat to make it look more consistent.

Disconnecting players

I have made a event handler for player disconnection which tells the queue and party system to kick this player from their system. Because you should not be in a party with someone who
is not on the server.

Actually handling shutdown now

Previously the server just terminated everything including the database connection :| now Minestom sends my program a signal and i gracefully close database, kick players and so on.

Game loop system

Just a small collection of functions helping with standard game presidia like starting after 5 seconds or sending all players back to the lobby after 10 seconds.

Auto completion

I added auto completion to commands the user will interact with to make it easier.

Rewriting CoDe

YAY my favorite thing. My original code was kind of spaghetti code and now i rewrote large portions which should improve understand ability?

The hardest thing

Probably the hardest thing i am facing with this project is Minestom’s lack of documentation. It has a wiki which only covers the basics. The rest is java doc but many functions/variables are defined like this: this_specific_thing() Does this_specific_thing but doesn’t tell what this_specific_thing is. But thankfully Minestom is open source so i can just look at the source code thought it is a bit hard for me because i am still somewhat of a java newbie.

0
0
13
Open comments for this post

5h 43m 43s logged

The first mini game

Context
I am creating a custom mini game server for minecraft with Minestom
A library allowing to write a java Minecraft server from scratch.

Cleaned up on blueprints & crates management

I rewrote parts of the logic of crates (system to manage mini games).
To be hopefully better maintainable.

Tnt Run

I made a first game the classic TntRun. Players are on a floor which
disappears under their feed. There are 3 floors and it is checked who has won.

I also had a bit fun with the light engine at the start (first image)

Jar

I made everything, including dependencies, able to be build into a single jar
with shadow jar.

Docker/Podman

I used my jar to create a Docker image file which takes everything important
from the repo & puts it into a docker/podman image (only tested with podman).

I also made an environment variable that can be set which gives a specific player the highest admin permissions.
So that you don’t have to mount the container & manually change add a player to the permission table of the SQLite database in it.

Ghost system

I also made 3 functions to implement a basic ghost system for when games want to get rid of players from the game.

And an readme

I added a README.md to my repo… with some text about how this thing works and breaths.

0
0
11
Open comments for this post

5h 40m 34s logged

Procrastinating with design over function

Consistent chat UI

So today i made a consistent chat design for different parts of the server. Except admin tools those still need to get a makeover.

Queue upgrade

Furthermore I added a bit of UI for the queue to tell players how full the queue is and how long it will take to start.

I also made the queue wait for a few seconds before actually starting to give other players to join if the game can start but also works with more players.

terrain loading screen

This was such a paaaiinnn i didn’t find any documentation that is up to date. After some digging i found out the Minecraft client shows users the loading screen for change worlds if the dimension is changed NOT THE WORLD THE DIMENSION so i made a dimension… again a bit painful because docs are kinde not existing? But… i guess the source code is enough docs :).

The reason why i wanted a loading screen on client side when changing worlds is to hide some ugly chunk glitching that happens sometimes and hopefully not to confuse the client too much about in which world it actually now is.

In addition I had fun with dimension parameters and accidentally made a horror map.

0
0
6
Open comments for this post

5h 39m 10s logged

I kinde forgot to install hackatime extension for Vscode _(° - °)_/ … but 5 hours are still some hours.

But now to get your introduced to what i already have managed to create.

  1. A server
  2. A system to dynamically manage different worlds, which will host different games in future
  3. A queue system for games
  4. A party system
  5. A lobby
  6. A permission system
  7. sooommeee chat UI stuff to look okay
  8. Permissions get saved to sqllite database

So yea a bit of stuff are already on their way.

Dynamically managing of different worlds

I have made a system that can on command create/remove worlds and move players to them. Furthermore it also removes automatically old worlds with no players in them to save on resources.

I call worlds crates because they are a bit self contained.

Queue system

On top of the crateManager i build a queue system. Players can join queues for a game and if a queue has enough players it creates the crate for it and moves all players to it. In the crate they can than play bc the crates have their own self contained logic.

Party system

Players can all join together in a party and if they queue they always get into the SAME queue.

Permission system

I have made a permission system. Players can get permissions like admin.build.place to for example be allowed to place blocks in normally non build areas. But they can’t break any blocks that would also require admin.build.break or instead of having to give both permissions you can just give a player admin.build and they will have all permissions of sub permissions of build.

Each permissions is saved/read from/to a sqllite database to make them persistent across server reboots.

lobby

oh yea and i did spend around 3 hours building a lobby :))))

0
0
9

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…