The source code of the Minecraft plugin DualMode. The main goal is to divide the server into PVE and PVP players.