The true value of WSL2
ヾ (・ ω <) ノ "3 3 3 ● Ⅱ Ⅲ
------------------- ↓ Digression from here ↓ -------------------
Minecraft How many years have you touched it? (When the boat broke as soon as it hit) I remember quitting because the building I created was destroyed by a creeper.
I decided to touch it after a long time, Anyway, I want to be able to move between servers on multiple servers, Minecraft Start playing to set up a server (What are you doing (・ ω ・))
WSL2 is included, Let's install it on Linux. There seems to be a build, so let's use docker. Let's make mods available as well. Let's set up multiple servers. And the specifications became greedy, Only time will pass.
I managed to get it into shape, so I'll leave it here.
------------------- ↓ The main subject starts here ↓ -------------------
It's natural to install Minecraft. I think Java Edition (Windows version) is fine. (It's not free!)
Assuming WSL2, Ubuntu and docker are included Look around here as well.
WSL2 + docker + PHP Windows development environment construction (1) WSL2 edition WSL2 + docker + PHP Windows development environment construction (2) docker edition
Success if the following command is passed from PowerShell
PS C:\> wsl -d Ubuntu-20.04
$ docker --version
Docker version 19.03.13, build 4484c46d9d
Cut the directory for data storage
$ mkdir ~/minecraft_data
There seems to be a server mod called Spigot. (I don't understand) spigot docker finds another, but This is adopted because it seems that it can be set only with parameters for those who are often used
$ docker run -d -v ~/minecraft_data:/data -p 25565:25565 -e TYPE=SPIGOT -e EULA=TRUE --name mc itzg/minecraft-server
#Plugin specification-e MODS=http://hogehoge.com/plugin01.jar,http://hogehoge.com/plugin02.jar
#Seed value specification-e SEED=7314490960418706833
It starts up quickly, but It takes additional downloads, biome generation, etc. Wait about 3 minutes (˘ω˘) Soo ...
Start Minecraft and try connecting with "Direct Connection" from Multiplayer.
Check the connection.
Good login (`・ ω ・ ´)
I will write a detailed explanation about the plug-in later. I will write only what I need here.
$ docker stop mc
$ cd ~/minecraft_data/plugins
$ wget http://ci.onarandombox.com/job/Multiverse-Core/Release%20Build/artifact/target/Multiverse-Core-4.2.2.jar #Multi-world management
$ wget http://ci.onarandombox.com/job/Multiverse-Portals/Release%20Build/artifact/target/Multiverse-Portals-4.2.0.jar #Move between worlds
$ wget https://ci.lucko.me/job/LuckPerms/lastStableBuild/artifact/bukkit/build/libs/LuckPerms-Bukkit-5.1.107.jar #Plugin permission management
$ docker start mc
(˘ω˘) Soo ...
(゚ д ゚) Hah!
If your username is Dozo
$ docker exec -i mc rcon-cli
> lp user Dozo permission set luckperms.* true
> lp user Dozo permission set minecraft.command.* true
> lp user Dozo permission set multiverse.* true
> ^C (ctrl+c)
No response from the console, but this is fine as long as the user name is correct
Log in to Minecraft and execute the following command
/gamerule doDaylightCycle false
Success if you can do it This is a time stop command that prevents the night from coming and being killed by zombies while working
Now that everything is ready, let's call it world generation. It can be generated on rcon-cli, but I don't really feel it, so I'll do it on Minecraft
/mv create asset NORMAL
Starting creation of world 'asset'...
Complete!
This created a new world named asset To move is the following command
/mvtp asset
When I try to create a nether and move it
Alright! It's a success! (`・ Ω ・ ´)
------------------- ↓ Click here for the postscript ↓ -------------------
There is plugins in the storage directory, By putting the pre-built plugin file (jar) here, You can add plugins The ** data storage directory ** that was a little at the beginning of the article comes in handy here.
The flow is to clone and build with maven, It's easier and better to use the pre-built one directly.
The plugin creator who writes seems to publish Jenkins, Let's borrow from there. At that time, get from *** stable build *** instead of the latest build
Multiverse
Multiverse was created at the dawn of Bukkit multiworld support. It has since then grown into a complete world management solution including special treatment of your nether worlds with Multiverse NetherPortals.
In the second delivery of Multiverse, we've broken it up into several smaller plugins that are each feature packed but not bloated! Multiverse provides the easiest to use world management solution for your Minecraft server, big or small, and with great addons like Portals and NetherPortals, what's not to love!
Multiverse is here and works for the latest server build! Is your server a Multiverse? https://dev.bukkit.org/projects/multiverse-core/
A plugin that manages multiple servers. You can enjoy the benefits of multiple servers such as creating worlds, recreating them, and moving between servers. Various plug-ins
name | Details | Jenkins URL |
---|---|---|
Multiverse-core | Multi-server core system | http://ci.onarandombox.com/view/Multiverse/job/Multiverse-Core/ |
Multiverse-Portals | Build a portal for server-to-server movement | http://ci.onarandombox.com/view/Multiverse/job/Multiverse-Portals/ |
Multiverse-NetherPortals | For the above nether | http://ci.onarandombox.com/view/Multiverse/job/Multiverse-NetherPortals/ |
Multiverse-Inventories | Inventory management between servers | http://ci.onarandombox.com/view/Multiverse/job/Multiverse-Inventories/ |
Should I put them all in anyway?
$ cd ~/minecraft_data/plugins
$ wget http://ci.onarandombox.com/job/Multiverse-Core/Release%20Build/artifact/target/Multiverse-Core-4.2.2.jar
$ wget http://ci.onarandombox.com/job/Multiverse-Portals/Release%20Build/artifact/target/Multiverse-Portals-4.2.0.jar
$ wget http://ci.onarandombox.com/job/Multiverse-NetherPortals/Release%20Build/artifact/target/Multiverse-NetherPortals-4.2.1.jar
$ wget http://ci.onarandombox.com/job/Multiverse-Inventories/Release%20Build/artifact/target/Multiverse-Inventories-4.2.1.jar
Click here for world generation parameters https://github.com/Multiverse/Multiverse-Core/wiki/World-properties
Command on Minecraft or RCON.
$ docker exec -i mc rcon-cli
> mvlist
§d====[ Multiverse World List ]====
§fworld§f§f - §aNORMAL
§fworld_the_end§f§f - §bTHE_END
§fworld_nether§f§f - §cNETHER
> mv create asset NORMAL
Starting creation of world 'asset'...
Complete!
> mv modify set weather false asset
§aSuccess!§f Property §bweather§f was set to §afalse
> mvrule doDaylightCycle false asset
§aSuccess!§f Gamerule §bdoDaylightCycle§f was set to §afalse§f.
> mv modify add creeper monsters asset
§aSuccess! §bcreeper§f was §cremoved from §amonsters
> mv create farm NORMAL -t FLAT
Starting creation of world 'farm'...
Complete!
> mv modify set gamemode creative farm
§aSuccess!§f Property §bgamemode§f was set to §acreative
> mv modify set difficulty hard farm
§aSuccess!§f Property §bdifficulty§f was set to §ahard
> mv modify set hunger false farm
§aSuccess!§f Property §bhunger§f was set to §afalse
LuckPerms
LuckPerms is a permissions plugin for Minecraft servers. It allows server admins to control what features players can use by creating groups and assigning permissions. https://luckperms.net
A plugin that manages server permissions, etc.
name | Details | Jenkins URL |
---|---|---|
LuckPerms | https://ci.lucko.me/job/LuckPerms/ |
$ cd ~/minecraft_data/plugins
$ wget https://ci.lucko.me/job/LuckPerms/lastStableBuild/artifact/bukkit/build/libs/LuckPerms-Bukkit-5.1.107.jar
The LuckPerms plugin doesn't set an admin user by default, so After restarting, access the minecraft console and register as a user. If your username is Dozo
$ docker restart mc
$ docker exec -i mc rcon-cli
> lp user Dozo permission set luckperms.* true
ctrl+C
I don't know if it's a bug, but there is no response when I enter it, It's working properly. Connect with the client to check the operation
/lp editor
If you click the URL provided to access it, you will be taken to the Web UI for changing permissions. Various settings can be made. For the time being, it's like setting this much and making fine adjustments.
group name | Authority |
---|---|
Admin | minecraft.command.ban minecraft.command.pardon some.cool.admin.perm someplugin.vanish |
Mod | minecraft.command.mute minecraft.command.unmute some.cool.mod.perm chatcolor.bold |
Default | minecraft.command.say minecraft.command.me |
reference: Using WSL2 in a Docker Linux container on Windows to run a Minecraft Java Edition
Recommended Posts