##### QUICK MINECRAFT(JAVA VERSION) DEDICATED SERVER ON CENTOS 7 by L0r3 #####
Note: Only Mac and pre-Win 10 versions of Minecraft can join a Java Minecraft server.
On Console, Pocket Edition, or Win 10 Version use Realms to host.

### INSTALL JAVA 1.8 JDK ###
$ java -version (to see current version)
$ yum install java-1.8.0-openjdk

### INSTALL SCREEN ###
$ yum install screen

### ADD A USER TO RUN THE SERVER UNDER #####
$ adduser mc
$ passwd mc

### SWITCH TO THAT USER ###
$ su - mc
$ cd ~

### INSTALL MINECRAFT ###
$ mkdir minecraft
$ cd minecraft
$ wget https://s3.amazonaws.com/Minecraft.Download/versions/1.12.2/minecraft_server.1.12.2.jar
$ chmod +x minecraft_server.1.12.2.jar

### FIRST RUN OF THE SERVER TO GENERATE FILES ###
This will fail to run but generate required files
$ screen
$ java -Xmx1024M -Xms1024M -jar minecraft_server.1.12.2.jar nogui

### EDIT EULA ###
$ vi ~/minecraft/eula.txt
Change false to true

### EDIT SRVER PROPERTIES ###
vi ~/minecraft/server.properties

### RUN SERVER AGAIN ###
$ screen -r
exit Screen by typing Control + A and then hitting D to detach

### OPEN PORT IN IPTABLES ###
$ iptables -I INPUT -p tcp –dport 25565 –syn -j ACCEPT
$ sbin/service iptables save