Minecraft server: Difference between revisions
(→Spigot) |
|||
Line 56: | Line 56: | ||
: An up-to-date fork of [https://dev.bukkit.org/projects/essentials Essentials]. Requires also Vault. Not sure what is the difference with other permission plugins (like [https://dev.bukkit.org/projects/permissionsex PermissionEx]). |
: An up-to-date fork of [https://dev.bukkit.org/projects/essentials Essentials]. Requires also Vault. Not sure what is the difference with other permission plugins (like [https://dev.bukkit.org/projects/permissionsex PermissionEx]). |
||
:* [https://www.spigotmc.org/resources/essentialsx.9089/ EssentialX]. Compatible Bukkit 1.12. Also [https://dev.bukkit.org/projects/essentialsx here]. |
:* [https://www.spigotmc.org/resources/essentialsx.9089/ EssentialX]. Compatible Bukkit 1.12. Also [https://dev.bukkit.org/projects/essentialsx here]. |
||
:* Essential Chat, Essential Spawn, Essential Group Manager must be installed separately. |
|||
:* [https://dev.bukkit.org/projects/vault Vault] Compatible Bukkit 1.11. |
:* [https://dev.bukkit.org/projects/vault Vault] Compatible Bukkit 1.11. |
||
Revision as of 20:01, 22 February 2018
Links
Available servers [1]:
- The original server from Mojang.
- The most popular server
Server API (don't know what it means exactly):
Some server-side tools (for large servers)
Installation log
Installation - Minecraft >= 1.8
Spigot
Following Spigot BuildTools guide:
mkdir spigot_buildtools
cd spigot_buildtools
wget https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
git config --global --unset core.autocrlf
java -jar BuildTools.jar
This creates 2 jar files: craftbukkit-1.12.2.jar and spigot-1.12.2.jar.
Then follow install instructions [2]:
- Copy craftbukkit-1.12.2.jar and spigot-1.12.2.jar in a directory dedicated to the minecraft server, and rename to craftbukkit.jar and spigot.jar.
- Start the server with:
java -Xms1G -Xmx1G -XX:+UseConcMarkSweepGC -jar spigot.jar
Bukkit / Spigot plugins
List of available plugins:
Install the following plugins:
- World management
- Multiverse
- Multiverse is the most popular multi-world plugin for minecraft server.
- Permission
- EssentialX
- An up-to-date fork of Essentials. Requires also Vault. Not sure what is the difference with other permission plugins (like PermissionEx).
- EssentialX. Compatible Bukkit 1.12. Also here.
- Essential Chat, Essential Spawn, Essential Group Manager must be installed separately.
- Vault Compatible Bukkit 1.11.
- Creative
- WorldEdit, an easy-to-use in-game editor. Compatible Bukkit 1.12.
- PlotSquared, compatible 1.12, is a more up-to-date version of PlotMe (mc 1.8.1).
- Economy
- iConomy is discontinued.
- Possible plugins are CraftConomy, using MySQL and suited to multiserver. Compatible 1.12, actively maintained.
- Simpler alternative is Essential Economy.
- Essential
- Group Manager. Also available here.
- Essential Chat, latest build here.
- Essential Spawn, latest build here.
Plugin to consider installing:
- Worlguard
- Citizens
- PlotSquared, compatible 1.12, is a more up-to-date
- OpenInv.
- Time is Money.
- ChestShop
- AsyncWorldEdit, an alternative to WorldEdit.
- DynMap
- PlayerHeads
- Command iConomy.
- Lift
- Lockette
Plugins I installed in older bukkit server but that are no longer maintained / useful:
Installation - Minecraft <= 1.7.10
CraftBukkit
- Recommended line from http://forums.bukkit.org/threads/how-to-setup-a-ubuntu-craftbukkit-server-x64-running-java-x64.598/
java -d64 -Xincgc -Xmx1024M -jar craftbukkit.jar nogui
Spigot on Raspberry Pi
- http://picraftbukkit.webs.com/pi-minecraft-server-how-to
- http://www.howtogeek.com/173044/how-to-run-low-cost-minecraft-on-a-raspberry-pi-for-block-building-on-the-cheap/
- http://www.raspberrypi.org/forums/viewtopic.php?f=78&t=75882
Cauldron and Forge
- Cauldron is the new name of MCPC+, ie. basically Spigot + Forge API. Cauldron allows for running servers using both CraftBukkit plugins and Forge mods (like Mo'Creatures).
- Best way for installing is to run the Cauldron installer (see download page)
- When launched, it runs like a standard Spigot / Craftbukkit server.
Start / stop init script
Forge mods
Use Cauldron + forge to run a server that accepts both CraftBukkit plugins and Forge mods
- Supported mods
- Mo' creatures v6.2.0 R2
- Simply install the mods in minecraft server mod directory (./mods)
CraftBukkit Troubleshoot
Essentials / permissions debug
To debug permission issues easily, set plugins/Essentials/config.yml:
# More output to the console.
debug: true
Cannot start the server
- I had issue due to jline, which was parsing my /root/.inputrc file!!!
$ java -jar craftbukkit.jar help
229 recipes
27 achievements
Jul 10, 2013 3:00:24 AM net.minecraft.server.v1_5_R3.MinecraftServer main
SEVERE: Failed to start the minecraft server
java.lang.IllegalArgumentException: No enum constant org.bukkit.craftbukkit.libs.jline.console.Operation.DYNAMIC_COMPLETE_HISTORY
at java.lang.Enum.valueOf(Enum.java:236)
at org.bukkit.craftbukkit.libs.jline.console.Operation.valueOf(Operation.java:24)
at org.bukkit.craftbukkit.libs.jline.console.ConsoleKeys.loadKeys(ConsoleKeys.java:245)
at org.bukkit.craftbukkit.libs.jline.console.ConsoleKeys.loadKeys(ConsoleKeys.java:71)
at org.bukkit.craftbukkit.libs.jline.console.ConsoleKeys.<init>(ConsoleKeys.java:43)
at org.bukkit.craftbukkit.libs.jline.console.ConsoleReader.<init>(ConsoleReader.java:146)
at org.bukkit.craftbukkit.libs.jline.console.ConsoleReader.<init>(ConsoleReader.java:126)
at net.minecraft.server.v1_5_R3.MinecraftServer.<init>(MinecraftServer.java:106)
at net.minecraft.server.v1_5_R3.DedicatedServer.<init>(DedicatedServer.java:34)
at net.minecraft.server.v1_5_R3.MinecraftServer.main(MinecraftServer.java:653)
at org.bukkit.craftbukkit.Main.main(Main.java:152)
The solution was simply to remove the binding to dynamic-complete-history in the .inputrc file.
Wrong plugin version
- The following message indicates a mismatch between server and plugin version:
01:14:18 CONSOLE: [WARNING] WorldEdit: Failed to do NMS safe block set
Frequent disconnect
Getting frequently disconnect from server, with message:
lost connection: Internal Exception: io.netty.handler.timeout.ReadTimeoutException
See https://bugs.mojang.com/browse/MC-34947
- Possible causes
- Java garbage collector on the server taking too much time.
- Server triggering disconnects on the client side when loading/generating new chunks.
- Related to a save spike [7]
- Related to file data/Mineshaft.dat taking too much CPU
- At the same time, I had lot of connection loss on the wifi (mandala laptop). Could this be related?
- Possible fixes
- Restart the server
- Install Oracle Java 7 on the server
- Change the GC settings [8]. Use
-XX:+UseG1GC
instead of-XX:MaxGCPauseMillis=200
:
java -XX:+UseG1GC -jar minecraft_server.jar nogui
- Tweak connection mtu settings [9]:
netsh interface ipv4 set subinterface "Local Area Connection" mtu=750 store=persistent
- rename data/Mineshaft.dat to data/Mineshaft.old
- upgrade to 1.7.10
Maintenance
CraftBukkit server
- Clear server log
- Use LogManager:
/logclear
- Clear core-protect db.
- On the console,
/co purge t:7d
(only data older than 24h can be purged from the console) - In game,
/co purge t:30d
(only data older than 30 days can be purged from in-game)
CraftBukkit Plugins
- PlotMe (used on CraftyServ)
- InfinitePlots
- Multiverse-Core (used on CraftyServ)
- Lockette (used on CraftyServ)
- CombatTag (used on CraftyServ)
- BukkitBackup
- Essentials
- PermissionsBukkit (forum page [10])
- Some plugins from same source
- CoreProtect
- LogManager
- A small plugin to clear the server log from in-game, w/o need to restart the server (
/logclear
)
- This plugin allows for preventing / controling explosion.
# Enable TNT explosion as follows (note that tnt chain are allowed by default)
/acs tnt yield 80 # 80% of exploded blocks will be available back
/acb tnt damage player true # TNT will damage players...
/acb tnt damage mob true # ... and mobs
/acb tnt explodeblocks true # TNT will explode neighbouring blocks
# To protect a zone against TNT (even via TNT cannon)
/rg flag spawn tnt deny
- DynMap
- AntiBotUltra
- Edit plugins/AntiBotUltra/config.yml to change the white list message (use § for colors)
- AntiCheat
- X-Ray Detective (analyse mining behavior through statistical analysis)
- Problem with these statistical tool is that they only detect after damage is done (all diamonds have been removed), and that they require administration effort.
- Anti X-Ray (commands
/antixray
)
- Nice analysis of pro and con of other anti-X-ray tools (statistical, obfuscator), and how to detect xraying users.
- X-Ray informer (commands
/xcheck
) - X-Ray Catcher (inactive, based on pattern analysis)
- Rate of X-Ray (statistical, command
/rx
)
Basic commands
tphere <PLAYER>
changepw <oldpwd> <newpwd>
Essentials
- kits
To enable kits via signs, give to user the following permissions:
essentials.signs.kit.use
essentials.kits.<kitname>
To enable kits via /kit command, give the following permissions to the users:
essentials.kit
essentials.kits.<kitname>
Multiverse
- Permissions
/manuadd histerical Default plotworld # Change group of a user in a given world
- Set world difficulty
/mvmodify set difficulty PEACEFUL
This setting has precedence over server setting. To change server setting, edit file Server.properties on the server:
spawn-monsters=false
- Prevent spawning
/mvmodify set monsters false # Prevent monsters spawning
/mvmodify set animals false # Prevent animals spawning
- Set spawn for current world
/mv set spawn
- Create a portal
To create a portal, first create a selection containing a portal frame, then create the portal with /mpc
.
/mvpc portal_name # Create a portal named 'portal_name'
/mvpm dest world_name # Set the destination of current portal to spawn of world 'world_name'
/mvpm dest p:dest_portal_name # Set the destination of current portal to portal dest_portal_name
/mvpm dest p:dest_portal_name:n # Set the destination of current portal to portal dest_portal_name, changing player direction to 'north'
/mvpm dest p:dest_portal_name:s # Set the destination of current portal to portal dest_portal_name, changing player direction to 'south'
/mvpm dest p:dest_portal_name:e # Set the destination of current portal to portal dest_portal_name, changing player direction to 'east'
/mvpm dest p:dest_portal_name:w # Set the destination of current portal to portal dest_portal_name, changing player direction to 'west'
/mvp sel portal_name # Select portal 'portal_name' as current portal
/mvp remove portal_name # Destroy portal 'portal_name'
- Create inventory group ([11])
/mvinv group # Interactive command
Create
emma_survival # Create the group, named 'emma_survival'
emma_survival # We add the three following worlds
emma_survival_nether
emma_survival_end
@
all # We add all shares (so all is shared, inventory, money...)
@
WorldEdit
Reference: WorldEdit
# Selection
//wand # Give the user the editing wand (axe)
//sel # Clear selection
//sel cuboid # Default mode, ie. cuboid: L click: 1st point, R click: 2nd point
//sel extend # Enable extend mode: L click: start, R click: extend cuboid
# More //sel mode available. Type //sel ? to see
//chunk # Select the entire chunk
# Basic edit
//set [id] # Fill selection with block 'id' (numeric or block name)
//set 80%stone,20%cobble # Idem, with fill percentage
//set 0 # Fill with air
//replace [idfrom] [idto] # Replace given block id with given block id
//outline [id] # Set outline
//walls [id] # Set walls
//undo # Undo edition
//redo # Redo edition
# Copy / Paste
//copy # Copy selection
//paste # Paste selection
//rotate [angle]
//flip [direction]
# Brush
//brush clipboard [-a] # Paint with the clipboard. -a to append, not pasting air.
# ...
# Shape generation
# ...
# Utility
//fill id [radius] [depth] # Fill an area with block 'id', up to 'radius' and depth 'depth'
//fixlava # Levels out nearby lava pool
//fixwater # Levels out nearby water pool
//thaw # Remove snow
/ex [size]/[size] # Extinguish fire
//drain # Drains all nearby pools of laval or water
//green # Greens the area by adding grass to dirt
# Maintenance
//regen # Revert selected area to original seed blocks
How-to
Import a single-player world
- Import a single player world
- Copy SP world to say ./world_singleplayer
- You need to guess the world environment (usually either NORMAL or FLAT) and if needed the generator used (see doc for more information).
- To get the list of available environment:
/mv env
- In the server:
/mv import world_singleplayer NORMAL # Import with default generator
/mv import world_singleplayer NORMAL FLAG # Import with FLAT generator
Create PlotMe world
/mv create plotworld normal -g PlotMe # Must use 'plotworld', or see PlotMe/config.yml
/mangaddp Default creativegates.use # In the PlotMe world, or user can't use creative gates anymore
/mangaddp Default plotme.use # Give user access to plotme commands
/mangaddp Default plotme.limit.1 # Limit to 1 plot / user
/plotme weanywhere # To use worldedit anywhere (protection against grief)
/mvm set monsters false # To prevent mobs spawning
/mvm set animals false # To prevent animals spawning
Edit file plugins/Multiverse-Core/config.yml:
prefixchat: 'false'
Summon any horses
From [12].
/summon EntityHorse ~0 ~1 ~0 /summon EntityHorse ~0 ~1 ~0 {Tame:1} /summon EntityHorse ~0 ~1 ~0 {Type:4,Tame:1} # Type: 0 to 4 /summon EntityHorse ~0 ~1 ~0 {Type:0,Tame:1,SaddleItem:{id:329}} # /summon EntityHorse ~0 ~1 ~0 {Type:1,Tame:1,SaddleItem:{id:329},ChestedHorse:1} /summon EntityHorse ~ ~1 ~ {Type:0,Tame:1,SaddleItem:{id:329},ArmorItem:{id:417}} # ArmorItem: 417 to 419 /summon EntityHorse ~ ~1 ~ {Type:0,Tame:1,Variant:0} # Variant: 0..6, 256..262, 512..528, 768..774, 1024..1030