Difference between revisions of "Minecraft"

From Server Knowledge Base
Jump to navigationJump to search
Line 172: Line 172:


http://www.minecraftwiki.net/wiki/Data_values
http://www.minecraftwiki.net/wiki/Data_values
== Install Feed The Beast on a Unix server ==
Make a directory specifically for the mod, e.g.:
<pre>/home/user/ftb</pre>
Then do:
<pre>su user
cd ~/ftb
wget http://www.creeperrepo.net/direct/FTB2/3be5e192a47685f491605e902dae3460/modpacks%5EUltimate%5E1_0_1%5EUltimate_Server.zip
java -Xms1G -Xmx1G -jar ftbserver.jar nogui</pre>
When it fails do CTRL + C
<pre>vim server.properties</pre>
Set the server-port to something that is not 25565. Then make sure the user:group ownership is correct on the ftb folder and all files and directories below it.


== Load MCMyAdmin and Minecraft on server start ==
== Load MCMyAdmin and Minecraft on server start ==

Revision as of 16:09, 22 April 2013

Currently the server is running 1.4.6-R0.4 Dev for our Minecraft server. We have now updated the plugins to be compatible with 1.4.6

Load Minecraft:

/usr/bin/java -Djline.terminal=jline.UnsupportedTerminal -client -Xmx7132M -jar craftbukkit.jar nogui -d yyyy-MM-dd HH:mm:ss -nojline

Load McMyAdmin:

tmux new-session -t minecraft
cd /home/user
./MCMA2_Linux_x86_64 | tee /var/www/sites/b*.co.uk/logs/ender*.log

If you want to connect from elsewhere to view the above output/console load the screen session:

ssh user@localhost -pXXXX
tmux ls
tmux attach 1 or minecraft

Using CTRL + D will quit screen and close any processes running within it. To exit safely do:

CTRL + B, let go, then press D on it's own.

When downloading a backup from McMyAdmin, it comes in the mcb format. Change it to .zip and you can then unzip it into a folder and restore to the server.

Chat

/tell PlayerName will whisper a message to a player. This option will not show in a console.

/msg PayerName will show it as YourPlayerName -> Me to the other Player but be private

Connection reset [Metrics]

Set opt-out to true in plugins/PluginMetrics/config.yml

This by default is false.

Configuration

Lava

Allowing lava seems to be easiest by creating a group that can do it and then doing:

# Allow lava buckets
[lavabucket]
allow
ignore-groups=Everyone
on-use=notify,log

The below method seems to fail

ignore-perms=worldguard.lavabucket.exempt
ignore-groups=admins,mods,Lava
on-use=deny,tell,notify,log

Current errors

None

Current issues

Enderman do not spawn. Likely issue with a plugin.

DynMap

Configuring Maps and Worlds using dmap
FAQ

Render all: /dynmap fullrender

Pause render: /dynmap pause all
Start render: /dynmap pause none

Disable world render: /dmap worldset WorldName enabled:false

Hide a player: /dynmap hide PlayerName
Show a player: /dynmap show PlayerName

https://github.com/webbukkit/dynmap/wiki/Web-UI-Parameters

http://bywatercraft.co.uk:8123/?worldname=world&mapname=surface

Enjin

  • domain.co.uk//admin/games/minecraft-plugin/gid/6207-0
  • Click Vault
  • If using Unix download the Vault.jar by doing wget http://dev.bukkit.org/media/files/655/849/Vault.jar
  • Download the Enjin plugin
  • Upload it via FTP to your server and it's Minecraft plugins directory
  • Click Add Server
  • Note down the enjinkey

Essentials

Command reference

Find players home:

/home playername:home
/home <user>:<name>

Broken:

/home user:

Get user's coordinates

If you have Essentials, use /getpos PlayerName

Kill specific mob/s

/killall MobName (e.g. Blaze)

Mail players

/mail send FullPlayerName Message

To read the mail, do /mail read
To clear the mail, do /mail clear

Respawn at home instead of spawn

Change this:

When users die, should they respawn at their first home or bed, instead of the spawnpoint?

respawn-at-home: false

to

respawn-at-home: true

Set players home

WIP

Teleport player to you

/tpohere playername

Teleport to coordinates

/tppos x y z

Teleport to player

As OP, /tpo playername

As player, /tpa playername

Fixed errors

NoSplosion will cause Endermen to NOT spawn:

"Disables all explosions vanila or mods (tekkit etc...) and fire from destroying blocks as well as endermen from spawning. All explosions and fire still damage players but do not damage the environment."

Outdated version, install up-to-date version: http://dev.bukkit.org/server-mods/nocheatplus/

[INFO] [NoCheatPlus] Enabling NoCheatPlus v3.6.1
[SEVERE] Error occurred while enabling NoCheatPlus v3.6.1 (Is it up to date?)
Error  : Minecraft server could not be started
java.lang.VerifyError: (class: fr/neatmonster/nocheatplus/checks/chat/ChatListener, method: commandPreprocess signature:(Lorg/bukkit/event/player/PlayerCommandPreprocessEvent;)V) Incompatible argument to function
Error  : An incompatible, damaged or outdated addon is preventing the server from starting.
Error  : Java Error: java.lang.VerifyError: (class: fr/neatmonster/nocheatplus/checks/chat/ChatListener, method: commandPreprocess signature: (Lorg/bukkit/event/player/PlayerCommandPreprocessEvent;)V) Incompatible argument to function

Give items

http://www.minecraftinfo.com/IDList.htm

/give [playername] [data-value] [amount]

http://www.minecraftwiki.net/wiki/Data_values

Install Feed The Beast on a Unix server

Make a directory specifically for the mod, e.g.:

/home/user/ftb

Then do:

su user
cd ~/ftb
wget http://www.creeperrepo.net/direct/FTB2/3be5e192a47685f491605e902dae3460/modpacks%5EUltimate%5E1_0_1%5EUltimate_Server.zip
java -Xms1G -Xmx1G -jar ftbserver.jar nogui

When it fails do CTRL + C

vim server.properties

Set the server-port to something that is not 25565. Then make sure the user:group ownership is correct on the ftb folder and all files and directories below it.

Load MCMyAdmin and Minecraft on server start

ssh -p port user@localhost
crontab -e

Press insert and add:

@reboot screen -dmS minecraft /home/mc/MCMA2_Linux_x86_64

Then do:

:wq

You can then if you wish do:

exit
touch /etc/init.d/minecraftd ; chown user:user /etc/init.d/minecraftd
vim /etc/init.d/minecraftd

Lock chests

Use Lockette. To snoop in chest and to do this without message, edit this file:

/home/user/Minecraft/plugins/Lockette/config.yml

And edit the following:

allow-admin-snoop: true
broadcast-snoop-target: ''

Kill all MCMA processes

ps aux|grep MC|grep x86|awk {'print $2'}

Results of the above command.

for a in `!!`
for a in `ps aux|grep MC|grep x86|awk {'print $2'}`
> do
> kill -9 $a
> done
ps aux|grep MC|grep x86|awk {'print $2'}

McMyAdmin Licence Key Recovery

Migrate from one *nix server to another

scp / rsync the data in the Minecraft directory across. Then do:

apt-get install unzip
apt-get install openjdk-7-jre openjdk-7-jdk
cd /usr/local
wget http://mcmyadmin.com/Downloads/etc.zip
unzip etc.zip

Go to serverIPaddress:8080 in your browser. To login, check the details in McMyAdmin.conf. To change the password you need to stop McMyAdmin:

/quit in console

The file stores the password as MD5, to convert your password use this: http://www.md5hashgenerator.com/index.php

Mob Spawning Ranges

Multiverse

Command Referece

Create new world

/mv create worldname TYPE

Hide world name in chat

In /plugins/Multiverse-Core/config.yml set prefixchat: 'false' to prefixchat: 'true'

Import backup of world

Delete the uid.dat file in the <worldname> folder before importing.

Rename default world

Set world alias and name

Set alias:

/mvm set alias newname oldname

Set world name

It is best to backup and remove the world, change the folder name and re-import it using /mv import foldername WORLDTYPE, then add it to plugins/Multiverse-Core/worlds.yml

Note: Set original world to be zworld. world is an older backup before zzd with several users homes pasted in.

Teleport player to another world

/mv tp them worldname

Redstone

Powering a column of pistons

Security

To check when a player was last online, their IP address, what world they are in, do:

/seen playername

Useful:

screen -xr mcmonitor
CTRL A + D
screen -xr mysqlmcmon

cd /home/mc/Minecraft
cat server.log | grep "YYYY-MM-DD" | grep User | grep -v indestructible
cat server.log | grep User | grep -v 'indestructible\|fell from a high place'

Hawkeye

Log everything:

Install Hawkeye by doing this manually or through a server control panel. In Unix, do:

/home/user/Minecraft/plugins/HawkEye# cat config.yml

log:
  lava-bucket: true
  pvp-death: true
  other-death: true
  chat: true
  join: true
  open-container: true
  container-transaction: true
  teleport: true
  sign-place: true
  sign-break: true
  flint-steel: true
  block-place: true
  block-break: true
  enderman-pickup: true
  spawnmob-egg: true
  crop-trample: true
general:
  max-lines: 0
  log-item-drops-on-death: true
  cleanse-period: 20m
  cleanse-age: 0
  delete-data-on-rollback: true
  log-ip-addresses: true
  debug: false
  debug-level: low
  max-radius: 0
  give-user-tool: true
  tool-block: '17'
  default-here-radius: 5
  default-tool-command: ''
  check-for-updates: true
  log-delay: 2
mysql:
  hawkeye-table: hawkeye
  port: 3306
  player-table: hawk_players
  username: root
  world-table: hawk_worlds
  hostname: localhost
  max-connections: 10
  password: 'InsertMySQLPasswordHere'
  database: hawkminecraft #you can rename this if you wish
ignore-worlds:
- thisworldisignored
- soisthisone
command-filter:
- /login
- /restartsrv
- /register
- /spawn
block-filter:
- NONE
containertransaction-filter:
  chest: true
  doublechest: true
  furnace: true
  dispenser: true
version: 1.1.0

Create the database:

mysql -p
create database hawkminecraft;
show databases;
use hawkminecraft
show tables;

This may be empty. If so (more than likely), log into your minecraft server and do /reload. Then go back into MySQL:

use hawkminecraft
show tables;
+-------------------------+
| Tables_in_hawkminecraft |
+-------------------------+
| hawk_players            |
| hawk_worlds             |
| hawkeye                 |
+-------------------------+
select * from hawk_players;
select * from hawk_worlds;
select * from hawkeye;
quit

And you can now do /hawk in game. To check a block, do /hawk tool , then left click a block and it will show you the block information.

Get table structure and players

desc hawkeye; select * from hawk_players;

Look at logs

select * from hawkeye ORDER BY data_id DESC LIMIT 100000;

See region information

/region info area

It should output something like:

Region: area, type: shape, Priority: X
Flags: use: ALLOW, mob-spawning: DENY (OR ALLOW)
Bound: (x) (z)

server.properties file

Set flyspeed

Default is 1

For yourself:

/flyspeeed 2

For others:

/flyspeed 2 playername

Synchronise Nether Portals

Tools

ASCII SSH Bukkit Menu (via screen)
Init script

tmux

Using it

http://unix.stackexchange.com/questions/13953/sending-text-input-to-a-detached-screen/13954#13954

Update CraftBukkit

Stop the server, then do:

mv craftbukkit.jar versioncraftbukkit.jar
wget http://dl.bukkit.org/latest-rb/craftbukkit.jar

Or download the development/beta build and do:

mv craftbukkit-dev.jar craftbukkit.jar

Start the server

Log out and back into MCMyAdmin.

World Edit

Place .schematic files in /home/user/Minecraft/plugins/WorldEdit/schematics

Import them by doing:

//schematic load filename

Then you can do //paste in Minecraft to paste it into the world where you are.

World Guard

To protect an area, do:

//wand

Then click the first position then the second position with the wooden axe.

If you only do one layer, you can do //expand to go up or down, e.g.:

//expand UpValue DownValue up
//expand 10 0 up

This would expand up 10 blocks from the single layer but do 0 down.

Then do:

/region define newnameforarea owner

Owner can be left blank.

To get information on the area you just created, do:

/region info newnameforarea

Set flags

To set flags, see this page: http://wiki.sk89q.com/wiki/WorldGuard/Regions/Flags

To stop building and PvP but to allow use, you would do:

/rg flag areaname build deny
/rg flag areaname pvp deny
/rg flag areaname use allow