Repository: fador/mineserver Branch: master Commit: 0d3ed44a4354 Files: 383 Total size: 1.3 MB Directory structure: gitextract_4q_cqrt4/ ├── .gitignore ├── CMakeLists.txt ├── CMakeModules/ │ ├── FindEvent.cmake │ ├── FindNoise.cmake │ └── toolchain-i686-w64-mingw32.cmake ├── Dockerfile ├── LICENSE ├── README.md ├── files/ │ ├── CMakeLists.txt │ ├── ENABLED_RECIPES.cfg │ ├── banned.txt │ ├── commands.cfg │ ├── config.cfg │ ├── item_alias.cfg │ ├── motd.txt │ ├── permissions.txt │ ├── recipes/ │ │ ├── armour/ │ │ │ ├── boots_chain.recipe │ │ │ ├── boots_diamond.recipe │ │ │ ├── boots_gold.recipe │ │ │ ├── boots_iron.recipe │ │ │ ├── boots_leather.recipe │ │ │ ├── chestplate_chain.recipe │ │ │ ├── chestplate_diamond.recipe │ │ │ ├── chestplate_gold.recipe │ │ │ ├── chestplate_iron.recipe │ │ │ ├── chestplate_leather.recipe │ │ │ ├── helmet_chain.recipe │ │ │ ├── helmet_diamond.recipe │ │ │ ├── helmet_gold.recipe │ │ │ ├── helmet_iron.recipe │ │ │ ├── helmet_leather.recipe │ │ │ ├── legging_chain.recipe │ │ │ ├── legging_diamond.recipe │ │ │ ├── legging_gold.recipe │ │ │ ├── legging_iron.recipe │ │ │ └── legging_leather.recipe │ │ ├── block/ │ │ │ ├── sand_hslab.recipe │ │ │ ├── smooth_hslab.recipe │ │ │ ├── stone_hslab.recipe │ │ │ └── wood_hslab.recipe │ │ ├── cloth/ │ │ │ ├── black.recipe │ │ │ ├── blue.recipe │ │ │ ├── brown.recipe │ │ │ ├── cyan.recipe │ │ │ ├── darkgreen.recipe │ │ │ ├── grey.recipe │ │ │ ├── lightblue.recipe │ │ │ ├── lightgreen.recipe │ │ │ ├── lightgrey.recipe │ │ │ ├── magenta.recipe │ │ │ ├── orange.recipe │ │ │ ├── pink.recipe │ │ │ ├── purple.recipe │ │ │ ├── red.recipe │ │ │ ├── white.recipe │ │ │ └── yellow.recipe │ │ ├── dyes/ │ │ │ ├── cyan.recipe │ │ │ ├── grey.recipe │ │ │ ├── lightblue.recipe │ │ │ ├── lightgrey.recipe │ │ │ ├── lime.recipe │ │ │ ├── magenta.recipe │ │ │ ├── orange.recipe │ │ │ ├── pink.recipe │ │ │ ├── purple.recipe │ │ │ ├── red.recipe │ │ │ ├── white.recipe │ │ │ └── yellow.recipe │ │ ├── food/ │ │ │ ├── apple_golden.recipe │ │ │ ├── bowls.recipe │ │ │ ├── bread.recipe │ │ │ ├── cake.recipe │ │ │ ├── mushroomstew.recipe │ │ │ └── sugar.recipe │ │ ├── materials/ │ │ │ ├── block_brick.recipe │ │ │ ├── block_clay.recipe │ │ │ ├── block_diamond.recipe │ │ │ ├── block_glowstone.recipe │ │ │ ├── block_gold.recipe │ │ │ ├── block_iron.recipe │ │ │ ├── block_sandstone.recipe │ │ │ ├── block_snow.recipe │ │ │ ├── block_wool.recipe │ │ │ ├── clay.recipe │ │ │ ├── ingots_diamond.recipe │ │ │ ├── ingots_gold.recipe │ │ │ ├── ingots_iron.recipe │ │ │ ├── sticks.recipe │ │ │ ├── tnt.recipe │ │ │ ├── wood_planks_acacia.recipe │ │ │ ├── wood_planks_birch.recipe │ │ │ ├── wood_planks_dark_oak.recipe │ │ │ ├── wood_planks_jungle.recipe │ │ │ ├── wood_planks_oak.recipe │ │ │ └── wood_planks_spruce.recipe │ │ ├── mechanism/ │ │ │ ├── button_stone.recipe │ │ │ ├── dispenser.recipe │ │ │ ├── door_iron.recipe │ │ │ ├── door_wood.recipe │ │ │ ├── lever.recipe │ │ │ ├── note_block.recipe │ │ │ ├── pressure_stone.recipe │ │ │ ├── pressure_wood.recipe │ │ │ └── torch_redstone.recipe │ │ ├── misc/ │ │ │ ├── bed.recipe │ │ │ ├── book.recipe │ │ │ ├── bookshelf.recipe │ │ │ ├── chest.recipe │ │ │ ├── fence_acacia.recipe │ │ │ ├── fence_birch.recipe │ │ │ ├── fence_dark_oak.recipe │ │ │ ├── fence_jungle.recipe │ │ │ ├── fence_oak.recipe │ │ │ ├── fence_spruce.recipe │ │ │ ├── furnace.recipe │ │ │ ├── jackolantern.recipe │ │ │ ├── jukebox.recipe │ │ │ ├── ladder.recipe │ │ │ ├── painting.recipe │ │ │ ├── paper.recipe │ │ │ ├── sign.recipe │ │ │ ├── stairs_stone.recipe │ │ │ ├── stairs_wood.recipe │ │ │ ├── torch.recipe │ │ │ └── workbench.recipe │ │ ├── tools/ │ │ │ ├── axe_diamond.recipe │ │ │ ├── axe_gold.recipe │ │ │ ├── axe_iron.recipe │ │ │ ├── axe_stone.recipe │ │ │ ├── axe_wood.recipe │ │ │ ├── bucket.recipe │ │ │ ├── clock.recipe │ │ │ ├── compass.recipe │ │ │ ├── fishingrod.recipe │ │ │ ├── flintsteel.recipe │ │ │ ├── hoe_diamond.recipe │ │ │ ├── hoe_gold.recipe │ │ │ ├── hoe_iron.recipe │ │ │ ├── hoe_stone.recipe │ │ │ ├── hoe_wood.recipe │ │ │ ├── pickaxe_diamond.recipe │ │ │ ├── pickaxe_gold.recipe │ │ │ ├── pickaxe_iron.recipe │ │ │ ├── pickaxe_stone.recipe │ │ │ ├── pickaxe_wood.recipe │ │ │ ├── shears.recipe │ │ │ ├── shovel_diamond.recipe │ │ │ ├── shovel_gold.recipe │ │ │ ├── shovel_iron.recipe │ │ │ ├── shovel_stone.recipe │ │ │ └── shovel_wood.recipe │ │ ├── transport/ │ │ │ ├── boat.recipe │ │ │ ├── minecart.recipe │ │ │ ├── minecart_powered.recipe │ │ │ ├── minecart_storage.recipe │ │ │ └── minecart_tracks.recipe │ │ ├── weapons/ │ │ │ ├── arrows.recipe │ │ │ ├── bow.recipe │ │ │ ├── sword_diamond.recipe │ │ │ ├── sword_gold.recipe │ │ │ ├── sword_iron.recipe │ │ │ ├── sword_stone.recipe │ │ │ └── sword_wood.recipe │ │ └── white.recipe │ ├── roles.txt │ ├── rules.txt │ ├── test.lua │ └── whitelist.txt ├── init.d/ │ └── mineserver.centos ├── plugins/ │ ├── CMakeLists.txt │ ├── binlog/ │ │ ├── binlog.cfg │ │ ├── binlog.cpp │ │ ├── binlog.h │ │ └── binlogdump.cpp │ ├── commands/ │ │ ├── commands.cpp │ │ └── commands.h │ ├── crapMobs/ │ │ ├── crapMobs.cpp │ │ └── crapMobs.h │ ├── cursesui/ │ │ ├── screen.cpp │ │ └── screen.h │ ├── filelog/ │ │ └── filelog.cpp │ ├── flatpermissions/ │ │ └── flatpermissions.cpp │ ├── luascript/ │ │ ├── luascript.cpp │ │ ├── luawrapper.cpp │ │ └── luawrapper.h │ ├── nBreak/ │ │ ├── nBreak.cpp │ │ └── nBreak.h │ ├── nether/ │ │ ├── nether.cpp │ │ └── nether.h │ └── passiveMobs/ │ ├── passiveMobs.cpp │ └── passiveMobs.h ├── src/ │ ├── CMakeLists.txt │ ├── SystemExceptions.h │ ├── blocks/ │ │ ├── basic.cpp │ │ ├── basic.h │ │ ├── bed.cpp │ │ ├── bed.h │ │ ├── blockbrewingstand.cpp │ │ ├── blockbrewingstand.h │ │ ├── blockfurnace.cpp │ │ ├── blockfurnace.h │ │ ├── cake.cpp │ │ ├── cake.h │ │ ├── chest.cpp │ │ ├── chest.h │ │ ├── default.cpp │ │ ├── default.h │ │ ├── door.cpp │ │ ├── door.h │ │ ├── falling.cpp │ │ ├── falling.h │ │ ├── fire.cpp │ │ ├── fire.h │ │ ├── ice.cpp │ │ ├── ice.h │ │ ├── jackolantern.cpp │ │ ├── jackolantern.h │ │ ├── ladder.cpp │ │ ├── ladder.h │ │ ├── leaves.cpp │ │ ├── leaves.h │ │ ├── liquid.cpp │ │ ├── liquid.h │ │ ├── note.cpp │ │ ├── note.h │ │ ├── planks.cpp │ │ ├── planks.h │ │ ├── plant.cpp │ │ ├── plant.h │ │ ├── pumpkin.cpp │ │ ├── pumpkin.h │ │ ├── redstone.cpp │ │ ├── redstone.h │ │ ├── redstoneutil.cpp │ │ ├── redstoneutil.h │ │ ├── sign.cpp │ │ ├── sign.h │ │ ├── snow.cpp │ │ ├── snow.h │ │ ├── stair.cpp │ │ ├── stair.h │ │ ├── step.cpp │ │ ├── step.h │ │ ├── tnt.cpp │ │ ├── tnt.h │ │ ├── torch.cpp │ │ ├── torch.h │ │ ├── tracks.cpp │ │ ├── tracks.h │ │ ├── wood.cpp │ │ ├── wood.h │ │ ├── wool.cpp │ │ ├── wool.h │ │ ├── workbench.cpp │ │ └── workbench.h │ ├── chat.cpp │ ├── chat.h │ ├── chunkmap.h │ ├── cliScreen.cpp │ ├── cliScreen.h │ ├── config/ │ │ ├── lexer.cpp │ │ ├── lexer.h │ │ ├── node.cpp │ │ ├── node.h │ │ ├── parser.cpp │ │ ├── parser.h │ │ ├── scanner.cpp │ │ └── scanner.h │ ├── config.h │ ├── configure.h.in │ ├── constants.cpp │ ├── constants.h │ ├── constants_num.h │ ├── extern.h │ ├── fastset.h │ ├── furnace.cpp │ ├── furnace.h │ ├── furnaceManager.cpp │ ├── furnaceManager.h │ ├── inventory/ │ │ ├── inventoryBasic.cpp │ │ ├── inventoryBrewingstand.cpp │ │ ├── inventoryBrewingstand.h │ │ ├── inventoryChest.cpp │ │ ├── inventoryChest.h │ │ ├── inventoryFurnace.cpp │ │ ├── inventoryFurnace.h │ │ ├── inventoryPlayer.cpp │ │ ├── inventoryPlayer.h │ │ ├── inventoryWorkbench.cpp │ │ ├── inventoryWorkbench.h │ │ └── inventorybasic.h │ ├── inventory.cpp │ ├── inventory.h │ ├── items/ │ │ ├── food.cpp │ │ ├── food.h │ │ ├── itembasic.cpp │ │ ├── itembasic.h │ │ ├── projectile.cpp │ │ └── projectile.h │ ├── json.cpp │ ├── json.h │ ├── lighting.cpp │ ├── lighting.h │ ├── logger.cpp │ ├── logger.h │ ├── logtype.h │ ├── map.cpp │ ├── map.h │ ├── mcregion.cpp │ ├── mcregion.h │ ├── metadata.cpp │ ├── metadata.h │ ├── mineserver.cpp │ ├── mineserver.h │ ├── mineserver.pro │ ├── mob.cpp │ ├── mob.h │ ├── nbt.cpp │ ├── nbt.h │ ├── packets.cpp │ ├── packets.h │ ├── permissions.h │ ├── physics.cpp │ ├── physics.h │ ├── plugin.cpp │ ├── plugin.h │ ├── plugin_api.cpp │ ├── plugin_api.h │ ├── plugins/ │ │ ├── PyScript/ │ │ │ ├── .gitignore │ │ │ ├── MineServer.i │ │ │ ├── PyScript.cpp │ │ │ ├── PyScript.h │ │ │ ├── makefile │ │ │ ├── python/ │ │ │ │ └── TriggTest.py │ │ │ ├── python_plugin_api.cpp │ │ │ └── python_plugin_api.h │ │ ├── banlist/ │ │ │ ├── banlist.cpp.unused │ │ │ └── banlist.h │ │ └── command/ │ │ ├── command.cpp.unused │ │ └── command.h │ ├── protocol.cpp │ ├── protocol.h │ ├── random.cpp │ ├── random.h │ ├── redstoneSimulation.cpp │ ├── redstoneSimulation.h │ ├── screenBase.cpp │ ├── screenBase.h │ ├── signalhandler.cpp │ ├── signalhandler.h │ ├── sockets.cpp │ ├── sockets.h │ ├── stdtime.h │ ├── threadpool.cpp │ ├── threadpool.h │ ├── tools.cpp │ ├── tools.h │ ├── tree.cpp │ ├── tree.h │ ├── user.cpp │ ├── user.h │ ├── utf8.h │ ├── vec.h │ └── worldgen/ │ ├── biomegen.cpp │ ├── biomegen.h │ ├── cavegen.cpp │ ├── cavegen.h │ ├── eximgen.cpp │ ├── eximgen.h │ ├── heavengen.cpp │ ├── heavengen.h │ ├── mapgen.cpp │ ├── mapgen.h │ ├── nethergen.cpp │ └── nethergen.h └── win32/ ├── mineserver.vcxproj ├── mineserver.vcxproj.filters ├── mineserver_VS2013.sln └── plugins/ ├── plugin_commands.vcxproj ├── plugin_filelog.vcxproj ├── plugin_flatpermissions.vcxproj ├── plugin_luascript.vcxproj └── plugin_passivemobs.vcxproj ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitignore ================================================ # ignore kate temp files *~ # ignore cmake crap CMakeFiles CMakeCache.txt src/configure.h include/configure.h # ignore our compile directory bin # qmake .pro(ject) per platform config file src/mineserver.pro.user ================================================ FILE: CMakeLists.txt ================================================ CMAKE_MINIMUM_REQUIRED(VERSION 2.6) PROJECT(mineserver) CMAKE_POLICY(SET CMP0003 NEW) # # project version # # Justasic: Get the git revision location for the branch we're on if(EXISTS "${${PROJECT_NAME}_SOURCE_DIR}/.git/HEAD") file(STRINGS ${${PROJECT_NAME}_SOURCE_DIR}/.git/HEAD GIT_HEAD_LOC REGEX ".*") #file(GIT_HEAD_LOC ${${PROJECT_NAME}_SOURCE_DIR}/.git/HEAD REGEX ".*") string(LENGTH ${GIT_HEAD_LOC} HEAD_LEN) math(EXPR LEN "${HEAD_LEN} - 5") string(SUBSTRING ${GIT_HEAD_LOC} 5 ${LEN} GIT_HEAD) endif(EXISTS "${${PROJECT_NAME}_SOURCE_DIR}/.git/HEAD") # Justasic: Get the git revision we're on for the version string if(EXISTS "${${PROJECT_NAME}_SOURCE_DIR}/.git/${GIT_HEAD}") # Justasic: read_from_file(${${PROJECT_NAME}_SOURCE_DIR}/.git/${GIT_HEAD} ".*" VERSION_STR) file(STRINGS ${${PROJECT_NAME}_SOURCE_DIR}/.git/${GIT_HEAD} VERSION_STR REGEX ".*") # Justasic: Get the length of the string string(LENGTH ${VERSION_STR} VERSION_LEN) # Justasic: Subtract 7 from the string's length math(EXPR VERSION_NUM_LEN "${VERSION_LEN} - ${VERSION_LEN} + 7") # Justasic: Extract the value from the string string(SUBSTRING ${VERSION_STR} 0 ${VERSION_NUM_LEN} VERSION_GIT) endif(EXISTS "${${PROJECT_NAME}_SOURCE_DIR}/.git/${GIT_HEAD}") # Set the actual version strings, these are used inside the program later SET(${PROJECT_NAME}_MAJOR_VERSION 0) SET(${PROJECT_NAME}_MINOR_VERSION 2) SET(${PROJECT_NAME}_PATCH_LEVEL 0) # Justasic: the rest is automatic SET(${PROJECT_NAME}_VERSION_SIMPLE "${${PROJECT_NAME}_MAJOR_VERSION}.${${PROJECT_NAME}_MINOR_VERSION}.${${PROJECT_NAME}_PATCH_LEVEL}") # Justasic: Get the git revision as well, really only useful for locating what revision we're on SET(${PROJECT_NAME}_VERSION_COMPLETE "${${PROJECT_NAME}_VERSION_SIMPLE}-${VERSION_GIT}") # set default build to Debug IF(NOT CMAKE_BUILD_TYPE) SET(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel." FORCE ) ENDIF(NOT CMAKE_BUILD_TYPE) SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules;${CMAKE_MODULE_PATH}") # # Configure paths # SET(CONFIG_DIR_BIN bin/) SET(CONFIG_DIR_ETC etc/${PROJECT_NAME}/) SET(CONFIG_DIR_LIB lib/${PROJECT_NAME}/) SET(CONFIG_DIR_SHARE ./) IF(WIN32) MESSAGE(STATUS "CONFIG_LOCAL is set -- assuming local build") SET(CONFIG_DIR_BIN bin/) SET(CONFIG_DIR_ETC bin/) SET(CONFIG_DIR_LIB bin/) SET(CONFIG_DIR_SHARE ./) SET(CONFIG_PREFIX ${CMAKE_INSTALL_PREFIX}) ENDIF() # The DISTSOURCE parameter tells the executable where to find the factory defaults. # It is used by Mineserver::configDirectoryPrepare() to install the factory defaults. # In the Release build, this should eventually be overridden by a central location # like $PREFIX/share/mineserver/files, I suppose. SET(CONFIG_DIR_DISTSOURCE files) # # Include directories # INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src) # CMake crap to include include(CheckFunctionExists) include(CheckIncludeFile) include(CheckTypeSize) include(CheckLibraryExists) include(CheckCXXCompilerFlag) # functions/includes needed during compile check_function_exists(backtrace HAVE_BACKTRACE) check_include_file(sys/utsname.h HAVE_SYS_UTSNAME_H) # Output paths SET(EXECUTABLE_OUTPUT_PATH bin) SET(LIBRARY_OUTPUT_PATH bin) # Set compiler specific build flags IF(CMAKE_COMPILER_IS_GNUCXX) SET(CMAKE_CXX_FLAGS "-W -Wall -Wno-unused-variable -Wno-unused-parameter -pedantic -std=c++11") SET(CMAKE_CXX_FLAGS_DEBUG "-DDEBUG -g -O0") SET(CMAKE_CXX_FLAGS_PROFILE "-DDEBUG -g -pg") SET(CMAKE_CXX_FLAGS_RELEASE "-O4 -s -DNDEBUG") ENDIF() IF(MSVC_IDE) SET(CMAKE_CXX_FLAGS "/DWIN32 /D_CONSOLE /DZLIB_WINAPI /fp:fast /EHsc") SET(CMAKE_CXX_FLAGS_DEBUG "/DDEBUG /D_DEBUG /MTd /Zi") SET(CMAKE_CXX_FLAGS_RELEASE "/MT /D_SECURE_SCL=0") ENDIF(MSVC_IDE) # # dependencies # SET(TARGET ${PROJECT_NAME}) SET(mineserver_depends -lpthread) # Note that on Ubuntu systems, CMake's FindOpenSSL.cmake file does not define # all the proper defines, therefore our old and generic library finder does not # work like it should :< - Justasic Find_package(OpenSSL REQUIRED) Find_package(Event REQUIRED) Find_package(Noise REQUIRED) Find_package(ZLIB REQUIRED) include_directories(${ZLIB_INCLUDE_DIR} ${NOISE_INCLUDE_DIR} ${OPENSSL_INCLUDE_DIR} ${EVENT_INCLUDE_DIR}) LIST(APPEND mineserver_depends "${ZLIB_LIBRARY};${NOISE_LIBRARY};${OPENSSL_LIBRARIES};${EVENT_LIBRARY}") # preprocess configuration file CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/src/configure.h.in ${PROJECT_BINARY_DIR}/src/configure.h) # # platform-specific tweaks # IF(WIN32) # this requires WinMain() entry, disabled until console/GUI option is added #set(exe "WIN32") # this shouldn't be here, but can cmake find these .lib's? # do we really need winmm? FOREACH(lib ws2_32 winmm) STRING(TOUPPER ${lib} LIB) LIST(APPEND mineserver_depends "${lib}") SET(${LIB}_LIBRARY "${lib}") ENDFOREACH() ELSE() IF(NOISE_DIR_IS_LIBNOISE) ADD_DEFINITIONS(-DLIBNOISE) ENDIF() ENDIF() # # Create some directories we need # FILE(MAKE_DIRECTORY "${CONFIG_DIR_BIN}/plugins") # # subdirectories to build # ADD_SUBDIRECTORY(src) ADD_SUBDIRECTORY(plugins) ADD_SUBDIRECTORY(files) # In the Debug build, we provide a local config file. #IF(CMAKE_BUILD_TYPE MATCHES Debug) #CONFIGURE_FILE(files/config.cfg "${EXECUTABLE_OUTPUT_PATH}/config.cfg" COPYONLY) #CONFIGURE_FILE(files/item_alias.cfg "${EXECUTABLE_OUTPUT_PATH}/item_alias.cfg" COPYONLY) #ENDIF() # # install # install(FILES ${mineserver_configs} DESTINATION ${CONFIG_DIR_ETC}/ ) install(DIRECTORY ${mineserver_dirs} DESTINATION ${CONFIG_DIR_SHARE}/ ) # # cpack # set(CPACK_PACKAGE_VENDOR "The Mineserver Project") set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Mineserver Developers ") set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Mineserver - C++ Minecraft server software") set(CPACK_PACKAGE_VERSION ${${PROJECT_NAME}_MAJOR_VERSION}.${${PROJECT_NAME}_MINOR_VERSION}.${${PROJECT_NAME}_PATCH_LEVEL}) set(CPACK_PACKAGE_VERSION_MAJOR ${${PROJECT_NAME}_MAJOR_VERSION}) set(CPACK_PACKAGE_VERSION_MINOR ${${PROJECT_NAME}_MINOR_VERSION}) set(CPACK_PACKAGE_VERSION_PATCH ${${PROJECT_NAME}_PATCH_LEVEL}) set(CPACK_PACKAGE_INSTALL_DIRECTORY "/usr/local/bin") include(CPack) ================================================ FILE: CMakeModules/FindEvent.cmake ================================================ # This module defines # EVENT_LIBRARY # EVENT_FOUND, if false, libevent wasn't found # EVENT_INCLUDE_DIR, where to find the headers FIND_PATH(EVENT_INCLUDE_DIR event.h $ENV{EVENT_DIR}/include $ENV{EVENT_DIR} ~/Library/Frameworks /Library/Frameworks /usr/local/include /usr/include /sw/include # Fink /opt/local/include # DarwinPorts /opt/csw/include # Blastwave /opt/include /usr/freeware/include ) FIND_LIBRARY(EVENT_LIBRARY NAMES event libevent PATHS $ENV{EVENT_DIR}/lib $ENV{EVENT_DIR} ~/Library/Frameworks /Library/Frameworks /usr/local/lib /usr/lib /sw/lib /opt/local/lib /opt/csw/lib /opt/lib /usr/freeware/lib64 ) # handle the QUIETLY and REQUIRED arguments and set EVENT_FOUND to TRUE if # all listed variables are TRUE INCLUDE("FindPackageHandleStandardArgs") FIND_PACKAGE_HANDLE_STANDARD_ARGS(EVENT REQUIRED_VARS EVENT_LIBRARY EVENT_INCLUDE_DIR) ================================================ FILE: CMakeModules/FindNoise.cmake ================================================ # NOISE_LIBRARY # NOISE_FOUND, if false, libnoise wasn't found # NOISE_INCLUDE_DIR, where to find the headers # NOISE_DIR_IS_LIBNOISE, if true, include as libnoise/noise.h (Debian) foreach(header noise/noise.h libnoise/noise.h) FIND_PATH(NOISE_INCLUDE_DIR ${header} $ENV{NOISE_DIR}/include $ENV{NOISE_DIR} ~/Library/Frameworks /Library/Frameworks /usr/local/include /usr/include /sw/include # Fink /opt/local/include # DarwinPorts /opt/csw/include # Blastwave /opt/include /usr/freeware/include ) if(NOISE_INCLUDE_DIR) break() endif() endforeach() if(EXISTS ${NOISE_INCLUDE_DIR}/libnoise/noise.h) set(NOISE_DIR_IS_LIBNOISE True) endif() IF(CMAKE_SYSTEM_NAME MATCHES FreeBSD) set(CMAKE_FIND_LIBRARY_SUFFIXES_ORIG ${CMAKE_FIND_LIBRARY_SUFFIXES}) set(CMAKE_FIND_LIBRARY_SUFFIXES ".so.0") ENDIF() FIND_LIBRARY(NOISE_LIBRARY NAMES noise libnoise PATHS $ENV{NOISE_DIR}/lib $ENV{NOISE_DIR} ~/Library/Frameworks /Library/Frameworks /usr/local/lib /usr/lib /sw/lib /opt/local/lib /opt/csw/lib /opt/lib /usr/freeware/lib64 ) IF(CMAKE_SYSTEM_NAME MATCHES FreeBSD) set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_ORIG}) ENDIF() # handle the QUIETLY and REQUIRED arguments and set NOISE_FOUND to TRUE if # all listed variables are TRUE INCLUDE("FindPackageHandleStandardArgs") FIND_PACKAGE_HANDLE_STANDARD_ARGS(NOISE REQUIRED_VARS NOISE_LIBRARY NOISE_INCLUDE_DIR) ================================================ FILE: CMakeModules/toolchain-i686-w64-mingw32.cmake ================================================ # the name of the target operating system set(CMAKE_SYSTEM_NAME Windows) # which compilers to use for C and C++ set(CMAKE_C_COMPILER i686-w64-mingw32-gcc) set(CMAKE_CXX_COMPILER i686-w64-mingw32-g++) set(CMAKE_RC_COMPILER i686-w64-mingw32-windres) # here is the target environment located set(CMAKE_FIND_ROOT_PATH /usr/i686-w64-mingw32 ~/i686-w64-mingw32 ) # adjust the default behaviour of the FIND_XXX() commands: # search headers and libraries in the target environment, search # programs in the host environment set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) ================================================ FILE: Dockerfile ================================================ FROM debian:jessie MAINTAINER Marko Viitanen ENV PACKAGES libssl1.0.0 libevent-2.0 zlib1g systemd-sysv sysv-rc debconf passwd dpkg gnupg libnoise0 ENV TEMP_PACKAGES build-essential cmake git libssl-dev libevent-dev zlib1g-dev libnoise-dev ca-certificates ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update \ && apt-get install -y --fix-missing --no-install-recommends --no-install-suggests $PACKAGES $TEMP_PACKAGES \ && git clone --depth=1 git://github.com/fador/mineserver.git; \ cd mineserver; \ cmake .; \ make all;\ make install; \ make clean; \ AUTO_PACKAGES=`apt-mark showauto`; \ apt-get remove --purge --force-yes -y $TEMP_PACKAGES $AUTO_PACKAGES; \ apt-get clean autoclean; \ apt-get autoremove -y; \ rm -rf /var/lib/{apt,dpkg,cache,log}/ ;\ mkdir /var/mineserver; \ cp -rf files/* /var/mineserver/; \ cp -rf bin/* /var/mineserver/ EXPOSE 25565 ENV PATH /usr/local/bin:$PATH VOLUME ["/var/mineserver"] WORKDIR /var/mineserver ENTRYPOINT ["mineserver"] CMD ["/etc/mineserver/config.cfg","+system.path.home=\"/var/mineserver\"","+system.path.plugins=\"/usr/local/bin/plugins\""] ================================================ FILE: LICENSE ================================================ Copyright (c) 2016, The Mineserver Project All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the The Mineserver Project nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ================================================ FILE: README.md ================================================ # Mineserver *by Fador & Nredor and others* Custom Minecraft server software written in C++. You can find the core team from [#mineserver](https://web.libera.chat/#mineserver) in [Libera.Chat](https://libera.chat/) IRC network. Also mail to developers@mineserver.be will reach us. Copyright (c) 2010-2016, The Mineserver Project **NOTICE:** Server still lacks features compared to original minecraft server. **Supported platforms** * Linux (CMake) * Windows (VS2013 project included, CMake not tested) Server has also been tested to build on Mac OS X and FreeBSD/PCBSD but we do not officially support those. We are trying to minimize memory and CPU usage compared to original Java server. *Important:* The language is C++11, so you will need a reasonably modern C++ compiler. MS Visual C++ 12 and GCC 4.8 should be sufficient. The build system requires [cmake](http://www.cmake.org/). ### Supported Minecraft version * Working with 1.8.9 client (protocol 47) ### Features * Plugins (chatcommands, filelog, nether, passivemobs, etc..) * NBT parsing/saving * Lightmap generation * Config file * Normal mining/item spawning/item pickups * Basic physics for gravel and sand * Physics for water (currently revising this) * Flatland and terrain map generation (Also biomegen!) * Working chests, furnaces & signs * User validation from minecraft.net * Protocol Encryption ### Configuration Notes An example `config.cfg` file is located in the `files` subdirectory. The config file sets three path names and one file name which are relevant to the server; with their example values they are: system.path.data = "files"; system.path.plugins = "plugins"; system.path.home = "."; system.pid_file = "mineserver.pid"; These paths may be either absolute or relative. The server requires a set of configuration files which are located in the `files` subdirectory of the distribution. The plugin binaries must be manually placed in the appropriate location for the server to find them. ### Bug Tracker / To Do / Roadmap We use GitHub issue tracker and milestones. Please check the wiki pages for details about the project status and development plans. Check the [fork network](https://github.com/fador/mineserver/network) for the latest development status. ### Compiling Mineserver requires the following libraries: * [zlib 1.2.5](http://www.zlib.org) * [libevent 2.0.x](http://libevent.org/) * [libnoise 1.0](http://libnoise.sourceforge.net/) * [openssl/libssl](http://www.openssl.org/) * [pthread](http://en.wikipedia.org/wiki/POSIX_Threads) * Installing on Debian and Ubuntu: `sudo apt-get install libssl libssl-dev libevent-2.0 libevent-dev zlib1g zlib1g-dev libnoise-dev` * Installing on CentOS and RHEL `# Install EPEL (Extra Packages for Enterprise Linux)` `sudo su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm'` `sudo yum install git libevent libevent-devel zlib zlib-devel libnoise-dev` * Installing on FreeBSD / PCBSD `sudo pkg_add -r libevent` * Installing on Mac OS X * Install libevent using your favourite tool, e.g., homebrew, fink or macports. * Installing libnoise can be painful. Howerver, there is a homebrew formular on [krono's homebrew fork](http://github.com/krono/homebrew). So for homebrew do `brew install libevent libnoise` **Compiling using Linux (cmake & make & g++):** * Download and extract source or use `git clone git://github.com/fador/mineserver.git` * Go to mineserver directory * Run `cmake .` * Run `make all` * Run server with `cd bin && ./mineserver` **Compiling using FreeBSD / PCBSD (cmake & gmake & g++):** * Download and extract source or use `git clone git://github.com/fador/mineserver.git` * Go to mineserver directory * Run `cmake .` * Run `gmake all` * Run server with `cd bin && ./mineserver` **Compiling using Windows (VS2013): (Might be outdated)** * Download and compile [zlib](http://www.zlib.org) or use [pre-built binaries](http://www.winimage.com/zLibDll/index.html) * Add zlib libraries to project (zlibstat.lib or zlibwapi.lib which requires also zlibwapi.dll in the same dir with the executable) * Download and compile [libevent 2.0.x](http://monkey.org/~provos/libevent/) * Download [libnoise 1.0](http://libnoise.sourceforge.net/) and add header/library files to project * Add libevent library to project (libevent2.lib) * Build * Run mineserver.exe * [Build Pack](http://mineserver.be/downloads/mineserver-VS2013_build_pack.zip) also available for easy compiling An example using commandline compiler available at http://www.microsoft.com/express/Windows/ Please change the ZLIB_INC_DIR, LIBEVENT_INC_DIR, ZLIB_LIB_DIR and LIBEVENT_LIB_DIR to those you keep the includes/libs. call "%VS120COMNTOOLS%vsvars32.bat" cl /I"ZLIB_INC_DIR;LIBEVENT_INC_DIR" /W3 /WX- /O2 /D ZLIB_WINAPI /D WIN32 /D NDEBUG /D _CRT_SECURE_NO_WARNINGS /EHsc *.cpp zlibwapi.lib libevent2.lib Ws2_32.lib /link /OUT:mineserver.exe /LIBPATH:"ZLIB_LIB_DIR;LIBEVENT_LIB_DIR" ================================================ FILE: files/CMakeLists.txt ================================================ cmake_minimum_required(VERSION 2.6) # forbid running cmake from this subdir if(PROJECT_NAME STREQUAL "Project") message(FATAL_ERROR "\nplease run cmake from the project's parent directory\n") endif() # Get all the current config files and such from the current directory FILE(GLOB mineserver_configs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.txt *.cfg) LIST(REMOVE_ITEM mineserver_configs "CMakeLists.txt") LIST(REMOVE_DUPLICATES mineserver_configs) # Install all the Recipes FILE(GLOB_RECURSE mineserver_recipes RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "recipes/*") LIST(REMOVE_DUPLICATES mineserver_recipes) # copy configs for local usage FOREACH(path ${mineserver_configs} ${mineserver_recipes}) SET(dest "${PROJECT_SOURCE_DIR}/bin/${path}") IF(NOT EXISTS ${dest}) MESSAGE(STATUS "Configuring: ${dest}") CONFIGURE_FILE(${path} ${dest} COPYONLY) ENDIF() ENDFOREACH() ================================================ FILE: files/ENABLED_RECIPES.cfg ================================================ #Armour armour/helmet_leather armour/helmet_iron armour/helmet_gold armour/helmet_diamond armour/helmet_chain armour/chestplate_leather armour/chestplate_gold armour/chestplate_iron armour/chestplate_diamond armour/chestplate_chain armour/legging_leather armour/legging_gold armour/legging_iron armour/legging_diamond armour/legging_chain armour/boots_leather armour/boots_gold armour/boots_iron armour/boots_diamond armour/boots_chain #Food food/bowls food/mushroomstew food/bread food/apple_golden food/cake food/sugar #Materials materials/sticks materials/block_iron materials/block_gold materials/block_diamond materials/block_glowstone materials/block_wool materials/block_snow materials/block_clay materials/block_sandstone materials/ingots_diamond materials/ingots_iron materials/ingots_gold materials/block_brick materials/wood_planks_acacia materials/wood_planks_birch materials/wood_planks_dark_oak materials/wood_planks_jungle materials/wood_planks_oak materials/wood_planks_spruce materials/tnt materials/clay #Mechanism mechanism/door_wood mechanism/door_iron mechanism/pressure_wood mechanism/pressure_stone mechanism/button_stone mechanism/torch_redstone mechanism/lever mechanism/dispenser mechanism/note_block #Misc misc/stairs_wood misc/stairs_stone misc/chest misc/fence_acacia misc/fence_birch misc/fence_dark_oak misc/fence_jungle misc/fence_oak misc/fence_spruce misc/furnace misc/ladder misc/sign misc/torch misc/workbench misc/bookshelf misc/jukebox misc/jackolantern misc/painting misc/paper misc/book misc/bed #Tools tools/axe_stone tools/axe_wood tools/pickaxe_wood tools/shovel_stone tools/shovel_wood tools/pickaxe_stone tools/axe_iron tools/axe_gold tools/axe_diamond tools/pickaxe_iron tools/pickaxe_gold tools/pickaxe_diamond tools/shears tools/shovel_iron tools/shovel_gold tools/shovel_diamond tools/hoe_wood tools/hoe_stone tools/hoe_iron tools/hoe_gold tools/hoe_diamond tools/flintsteel tools/bucket tools/compass tools/clock tools/fishingrod #Weapons weapons/sword_wood weapons/sword_stone weapons/sword_iron weapons/sword_gold weapons/sword_diamond weapons/bow weapons/arrows #Transport transport/minecart transport/minecart_powered transport/minecart_storage transport/minecart_tracks transport/boat #Dyes dyes/red dyes/yellow dyes/orange dyes/cyan dyes/lightgrey dyes/grey dyes/lime dyes/pink dyes/white dyes/lightblue dyes/magenta dyes/purple dyes/yellow #Cloth cloth/black cloth/darkgreen cloth/lightgrey cloth/purple cloth/blue cloth/grey cloth/magenta cloth/red cloth/brown cloth/lightblue cloth/orange cloth/white cloth/cyan cloth/lightgreen cloth/pink cloth/yellow #block block/sand_hslab block/smooth_hslab block/stone_hslab block/wood_hslab ================================================ FILE: files/banned.txt ================================================ # This is default banfile. Write nicks to be banned here one for each line ================================================ FILE: files/commands.cfg ================================================ # command permissions # the order is: guest < member < op < admin # e.g. "kick" is allowed for op & above (ops & admins) load = admin unload = admin reload = admin save = admin settime = admin regen = admin adminonlymsg = admin kick = op tp = op ctp = op ban = op unban = op give = op igive = op mute = op unmute = op sethealth = op servermsg = op kit = member whisper = member gps = member about = guest motd = guest help = guest who = guest home = guest rules = guest dnd = guest emote = guest ================================================ FILE: files/config.cfg ================================================ # # Mineserver configuration # # Search paths # Note: leading tilde '~' is treated as $HOME system.path.data = "."; system.path.plugins = "plugins"; system.path.home = "."; system.pid_file = "mineserver.pid"; # Include item alias config file include "item_alias.cfg"; # Interface. system.interface.use_cli = true; # Server name system.server_name = "Mineserver testserver"; # Validate usernames against minecraft.net # false means "offline" mode system.user_validation = true; # Encryption required for validation # will encrypt the whole protocol with AES/CFB8 # Offline mode will work with encryption # Recommendation: DONT CHANGE system.protocol_encryption = true; # Disclose Software Version system.show_version = true; # Userlimit system.user_limit = 50; # IP net.ip = "0.0.0.0"; # Port net.port = 25565; # Server administrator authentication password # Used for core commands like shutdown and loadplugin # using "/auth password" will make you an admin # NOTE: default "CHANGEME" is ignored, so change this only if you want to use it. system.admin.password = "CHANGEME"; # 0 = Normal Map # 1 = Nether Map # ... # Map directory : Generator map.storage.nbt.directories= (); # WORLD ARE LOADED ALPHABETICALLY. you have been warned ;P # Generators: # 0 - old generator # 1 - nether generator # 2 - heaven generator # 3 - new (biome) generator # 4 - mapgen by Eximius #map.storage.nbt.directories += ("B-nether":1); #map.storage.nbt.directories += ("Cheaven":2); map.storage.nbt.directories += ("A-world":3); # Localization strings strings.wrong_protocol = "Wrong protocol version"; strings.server_full = "Server is currently full"; # Physics options (water/lava) system.physics.enabled = false; # Redstone options (EXPERIMENTAL) system.redstone.enabled = true; # Enable PvP ? system.pvp.enabled = true; # Enable area damage? system.damage.enabled = true; # true = Only helmets in helmet slot, false = any block in helmet slot (fun!) system.armour.helmet_strict = true; furnace.items.stone = ("in":4, "out":1, "meta":0, "count":1); furnace.items.gold = ("in":14, "out":266, "meta":0, "count":1); furnace.items.iron = ("in":15, "out":265, "meta":0, "count":1); furnace.items.charcoal = ("in":17, "out":263, "meta":1, "count":1); furnace.items.diamond = ("in":56, "out":264, "meta":0, "count":1); furnace.items.lapiz = ("in":21, "out":351, "meta":4, "count":6); furnace.items.glass = ("in":12, "out":20, "meta":0, "count":1); furnace.items.pork = ("in":319, "out":320, "meta":0, "count":1); furnace.items.clay = ("in":337, "out":336, "meta":0, "count":1); furnace.items.fish = ("in":349, "out":350, "meta":0, "count":1); furnace.items.cactus = ("in": 81, "out":351, "meta":2, "count":1); # Save generated chunks which are not changed? # Will generate the chunks again if false. map.save_unchanged_chunks = true; # Map save interval in seconds, 0 = off map.save_interval = 1800; # # Map generator parameters # # Generate spawn area in advance map.generate_spawn.enabled = true; map.generate_spawn.size = 5; map.generate_spawn.show_progress = true; # Threading (how many concurrent generators running) !!NOT IN USE!! mapgen.threads = 2; # Time that grass takes to spread to the next block, in seconds # Please note that zero is a VERY bad idea. mapgen.grassrate = 10; mapgen.croprate = 10; mapgen.cactusrate = 10; mapgen.reedrate = 10; # Max height mapgen.cactusmax = 4; mapgen.reedmax = 5; # Generate flatgrass map instead of normal map mapgen.flatgrass = false; # Snow instead of grass mapgen.winter.enabled = false; # Sea level mapgen.sea.level = 62; # Add Ore mapgen.addore = true; # Generate trees mapgen.trees.enabled = true; # Generate caves mapgen.caves.enabled = false; # Smaller number = smaller caves mapgen.caves.size = 15; # Do not modify if not sure what this is # Used in: if(caveNoise.GetValue(x,y,z) < caveTreshold) mapgen.caves.treshold = 0.05; mapgen.caves.lava = true; # Expand beaches (Experimental) mapgen.beaches.expand = false; mapgen.beaches.extent = 10; mapgen.beaches.height = 2; # Plugin loading # # The syntax is as follows: # system.plugins += (""); # system.plugins += ("" : ""); # Alternatively you can do this: # system.plugins. = ""; # # Plugins are to be found under 'system.path.plugins' path # # If you use the second syntax, you're limited to [a-zA-Z0-9_]+ for the alias. # It's probably not a great idea to use any characters other than that anyway. # # # The plugin alias is whatever you like, it will be passed to the plugin so it # can use it as a sort of instance name. For example if you have two different # ban lists (for some reason), you could have them both operating at once by # giving them unique identifiers. # # # Plugin name. If it starts with underscore '_' character, mineserver tries to # load it from within the main binary. Instructions on how to compile plugins # into mineserver are pending, but it basically involves just compiling the # plugin to an object file then linking it to the mineserver binary when it's # built. # # More information on this topic will be covered on the wiki Soon (tm). system.plugins = (); #system.plugins += ("binlog"); #system.plugins += ("banlist"); system.plugins += ("commands"); #system.plugins += ("crapMobs"); #system.plugins += ("cursesui"); system.plugins += ("filelog"); system.plugins += ("flatpermissions"); system.plugins += ("nBreak"); system.plugins += ("nether"); system.plugins += ("passiveMobs"); #system.plugins += ("whitelist"); ================================================ FILE: files/item_alias.cfg ================================================ # # Aliases for /give and other labels # stone = 1 grass = 2 dirt = 3 cobblestone = 4 woodenplank = 5 sapling = 6 bedrock = 7 water = 8 statwater = 9 lava = 10 statlava = 11 sand = 12 gravel = 13 goldore = 14 ironore = 15 coalore = 16 wood = 17 leaves = 18 sponge = 19 glass = 20 lapisore = 21 lapisblock = 22 dispenser = 23 sandstone = 24 noteblock = 25 bed = 26 wool = 35 yellowflower = 37 redrose = 38 brownmushroom = 39 redmushroom = 40 goldblock = 41 ironblock = 42 doublestoneslab = 43 stoneslab = 44 brickblock = 45 tnt = 46 bookshelf = 47 mossstone = 48 obsidian = 49 torch = 50 fire = 51 monsterspawner = 52 woodenstairs = 53 chest = 54 redstonewire = 55 diamondore = 56 diamondblock = 57 workbench = 58 crops = 59 farmland = 60 furnace = 61 ladder = 65 tracks = 66 cobblestonestairs = 67 lever = 69 stonepressureplate = 70 woodenpressureplate = 72 redstoneore = 73 redstonetorch = 75 stonebutton = 77 snow = 78 ice = 79 snowblock = 80 cactus = 81 clay = 82 sugarcane = 83 jukebox = 84 fence = 85 pumpkin = 86 netherrack = 87 soulsand = 88 glowstone = 89 jackolantern = 91 cakeblock = 92 # items ironshovel = 256 ironpickaxe = 257 ironaxe = 258 flintandsteel = 259 apple = 260 bow = 261 arrow = 262 coal = 263 diamond = 264 ironingot = 265 goldingot = 266 ironsword = 267 woodensword = 268 woodenshovel = 269 woodenpickaxe = 270 woodenaxe = 271 stonesword = 272 stoneshovel = 273 stonepickaxe = 274 stoneaxe = 275 diamondsword = 276 diamondshovel = 277 diamondpickaxe = 278 diamondaxe = 279 stick = 280 bowl = 281 mushroomsoup = 282 goldsword = 283 goldshovel = 284 goldpickaxe = 285 goldaxe = 286 string = 287 feather = 288 sulphur = 289 woodenhoe = 290 stonehoe = 291 ironhoe = 292 diamondhoe = 293 goldhoe = 294 seeds = 295 wheat = 296 bread = 297 leatherhelmet = 298 leatherchestplate = 299 leatherleggings = 300 leatherboots = 301 chainmailhelmet = 302 chainmailchestplate = 303 chainmailaleggings = 304 chainmailboots = 305 ironhelmet = 306 ironchestplate = 307 ironleggings = 308 ironboots = 309 diamondhelmet = 310 diamondchestplate = 311 diamondleggings = 312 diamondboots = 313 goldhelmet = 314 goldchestplate = 315 goldleggings = 316 goldboots = 317 flint = 318 rawporkchop = 319 grilledporkchop = 320 paintings = 312 goldenapple = 322 sign = 323 woodendoor = 324 bucket = 325 waterbucket = 326 lavabucket = 327 minecart = 328 saddle = 329 irondoor = 330 redstone = 331 snowball = 332 boat = 333 leather = 334 milk = 335 claybrick = 336 clayballs = 337 sugarcane = 338 paper = 339 book = 340 slimeball = 341 storageminecart = 342 poweredminecart = 343 egg = 344 compass = 345 fishingrod = 346 clock = 347 glowstonedust = 348 rawfish = 349 cookedfish = 350 inksac = 351 bone = 352 sugar = 353 cake = 354 bed = 355 brewingstand = 379 goldrecord = 2256 greenrecord = 2257 ================================================ FILE: files/motd.txt ================================================ # # Write message of the day here. # Lines beginning with # are commentlines and will not be sent to player # > §aWelcome to Mineserver! > §bThis is MOTD > §fThis is third line of MOTD :E ================================================ FILE: files/permissions.txt ================================================ someMemberName:Member someOpName:Op someAdminName:Admin ================================================ FILE: files/recipes/armour/boots_chain.recipe ================================================ # Input width 3 height 2 <- 51 -1 51 51 -1 51 -> # Output outputcount 1 outputtype 305 outputhealth 0 ================================================ FILE: files/recipes/armour/boots_diamond.recipe ================================================ # Input width 3 height 2 <- 264 -1 264 264 -1 264 -> # Output outputcount 1 outputtype 313 outputhealth 0 ================================================ FILE: files/recipes/armour/boots_gold.recipe ================================================ # Input width 3 height 2 <- 266 -1 266 266 -1 266 -> # Output outputcount 1 outputtype 317 outputhealth 0 ================================================ FILE: files/recipes/armour/boots_iron.recipe ================================================ # Input width 3 height 2 <- 265 -1 265 265 -1 265 -> # Output outputcount 1 outputtype 309 outputhealth 0 ================================================ FILE: files/recipes/armour/boots_leather.recipe ================================================ # Input width 3 height 2 <- 334 -1 334 334 -1 334 -> # Output outputcount 1 outputtype 301 outputhealth 0 ================================================ FILE: files/recipes/armour/chestplate_chain.recipe ================================================ # Input width 3 height 3 <- 51 -1 51 51 51 51 51 51 51 -> # Output outputcount 1 outputtype 303 outputhealth 0 ================================================ FILE: files/recipes/armour/chestplate_diamond.recipe ================================================ # Input width 3 height 3 <- 264 -1 264 264 264 264 264 264 264 -> # Output outputcount 1 outputtype 311 outputhealth 0 ================================================ FILE: files/recipes/armour/chestplate_gold.recipe ================================================ # Input width 3 height 3 <- 266 -1 266 266 266 266 266 266 266 -> # Output outputcount 1 outputtype 315 outputhealth 0 ================================================ FILE: files/recipes/armour/chestplate_iron.recipe ================================================ # Input width 3 height 3 <- 265 -1 265 265 265 265 265 265 265 -> # Output outputcount 1 outputtype 307 outputhealth 0 ================================================ FILE: files/recipes/armour/chestplate_leather.recipe ================================================ # Input width 3 height 3 <- 334 -1 334 334 334 334 334 334 334 -> # Output outputcount 1 outputtype 299 outputhealth 0 ================================================ FILE: files/recipes/armour/helmet_chain.recipe ================================================ # Input width 3 height 2 <- 51 51 51 51 -1 51 -> # Output outputcount 1 outputtype 302 outputhealth 0 ================================================ FILE: files/recipes/armour/helmet_diamond.recipe ================================================ # Input width 3 height 2 <- 264 264 264 264 -1 264 -> # Output outputcount 1 outputtype 310 outputhealth 0 ================================================ FILE: files/recipes/armour/helmet_gold.recipe ================================================ # Input width 3 height 2 <- 266 266 266 266 -1 266 -> # Output outputcount 1 outputtype 314 outputhealth 0 ================================================ FILE: files/recipes/armour/helmet_iron.recipe ================================================ # Input width 3 height 2 <- 265 265 265 265 -1 265 -> # Output outputcount 1 outputtype 306 outputhealth 0 ================================================ FILE: files/recipes/armour/helmet_leather.recipe ================================================ # Input width 3 height 2 <- 334 334 334 334 -1 334 -> # Output outputcount 1 outputtype 298 outputhealth 0 ================================================ FILE: files/recipes/armour/legging_chain.recipe ================================================ # Input width 3 height 3 <- 51 51 51 51 -1 51 51 -1 51 -> # Output outputcount 1 outputtype 304 outputhealth 0 ================================================ FILE: files/recipes/armour/legging_diamond.recipe ================================================ # Input width 3 height 3 <- 264 264 264 264 -1 264 264 -1 264 -> # Output outputcount 1 outputtype 312 outputhealth 0 ================================================ FILE: files/recipes/armour/legging_gold.recipe ================================================ # Input width 3 height 3 <- 266 266 266 266 -1 266 266 -1 266 -> # Output outputcount 1 outputtype 316 outputhealth 0 ================================================ FILE: files/recipes/armour/legging_iron.recipe ================================================ # Input width 3 height 3 <- 265 265 265 265 -1 265 265 -1 265 -> # Output outputcount 1 outputtype 308 outputhealth 0 ================================================ FILE: files/recipes/armour/legging_leather.recipe ================================================ # Input width 3 height 3 <- 334 334 334 334 -1 334 334 -1 334 -> # Output outputcount 1 outputtype 300 outputhealth 0 ================================================ FILE: files/recipes/block/sand_hslab.recipe ================================================ # Input width 3 height 1 <- 24 24 24 -> # Output outputcount 3 outputtype 44 outputhealth 1 ================================================ FILE: files/recipes/block/smooth_hslab.recipe ================================================ # Input width 3 height 1 <- 1 1 1 -> # Output outputcount 3 outputtype 44 outputhealth 0 ================================================ FILE: files/recipes/block/stone_hslab.recipe ================================================ # Input width 3 height 1 <- 4 4 4 -> # Output outputcount 3 outputtype 44 outputhealth 3 ================================================ FILE: files/recipes/block/wood_hslab.recipe ================================================ # Input width 3 height 1 <- 5 5 5 -> # Output outputcount 3 outputtype 44 outputhealth 2 ================================================ FILE: files/recipes/cloth/black.recipe ================================================ # Input width 2 height 1 <- 35 351:0 -> # Output outputcount 1 outputtype 35 outputhealth 15 ================================================ FILE: files/recipes/cloth/blue.recipe ================================================ # Input width 2 height 1 <- 35 351:4 -> # Output outputcount 1 outputtype 35 outputhealth 11 ================================================ FILE: files/recipes/cloth/brown.recipe ================================================ # Input width 2 height 1 <- 35 351:3 -> # Output outputcount 1 outputtype 35 outputhealth 12 ================================================ FILE: files/recipes/cloth/cyan.recipe ================================================ # Input width 2 height 1 <- 35 351:6 -> # Output outputcount 1 outputtype 35 outputhealth 9 ================================================ FILE: files/recipes/cloth/darkgreen.recipe ================================================ # Input width 2 height 1 <- 35 351:2 -> # Output outputcount 1 outputtype 35 outputhealth 13 ================================================ FILE: files/recipes/cloth/grey.recipe ================================================ # Input width 2 height 1 <- 35 351:8 -> # Output outputcount 1 outputtype 35 outputhealth 7 ================================================ FILE: files/recipes/cloth/lightblue.recipe ================================================ # Input width 2 height 1 <- 35 351:12 -> # Output outputcount 1 outputtype 35 outputhealth 3 ================================================ FILE: files/recipes/cloth/lightgreen.recipe ================================================ # Input width 2 height 1 <- 35 351:10 -> # Output outputcount 1 outputtype 35 outputhealth 5 ================================================ FILE: files/recipes/cloth/lightgrey.recipe ================================================ # Input width 2 height 1 <- 35 351:7 -> # Output outputcount 1 outputtype 35 outputhealth 8 ================================================ FILE: files/recipes/cloth/magenta.recipe ================================================ # Input width 2 height 1 <- 35 351:13 -> # Output outputcount 1 outputtype 35 outputhealth 2 ================================================ FILE: files/recipes/cloth/orange.recipe ================================================ # Input width 2 height 1 <- 35 351:14 -> # Output outputcount 1 outputtype 35 outputhealth 1 ================================================ FILE: files/recipes/cloth/pink.recipe ================================================ # Input width 2 height 1 <- 35 351:9 -> # Output outputcount 1 outputtype 35 outputhealth 6 ================================================ FILE: files/recipes/cloth/purple.recipe ================================================ # Input width 2 height 1 <- 35 351:5 -> # Output outputcount 1 outputtype 35 outputhealth 10 ================================================ FILE: files/recipes/cloth/red.recipe ================================================ # Input width 2 height 1 <- 35 351:1 -> # Output outputcount 1 outputtype 35 outputhealth 14 ================================================ FILE: files/recipes/cloth/white.recipe ================================================ # Input width 2 height 1 <- 35 351:15 -> # Output outputcount 1 outputtype 35 outputhealth 0 ================================================ FILE: files/recipes/cloth/yellow.recipe ================================================ # Input width 2 height 1 <- 35 351:11 -> # Output outputcount 1 outputtype 35 outputhealth 4 ================================================ FILE: files/recipes/dyes/cyan.recipe ================================================ # Input width 2 height 1 <- 351:4 351:2 -> # Output outputcount 2 outputtype 351 outputhealth 6 ================================================ FILE: files/recipes/dyes/grey.recipe ================================================ # Input width 2 height 1 <- 351:0 351:15 -> # Output outputcount 2 outputtype 351 outputhealth 8 ================================================ FILE: files/recipes/dyes/lightblue.recipe ================================================ # Input width 2 height 1 <- 351:4 351:15 -> # Output outputcount 2 outputtype 351 outputhealth 12 ================================================ FILE: files/recipes/dyes/lightgrey.recipe ================================================ # Input width 2 height 1 <- 351:8 351:15 -> # Output outputcount 2 outputtype 351 outputhealth 7 ================================================ FILE: files/recipes/dyes/lime.recipe ================================================ # Input width 2 height 1 <- 351:2 351:15 -> # Output outputcount 2 outputtype 351 outputhealth 10 ================================================ FILE: files/recipes/dyes/magenta.recipe ================================================ # Input width 2 height 1 <- 351:5 351:9 -> # Output outputcount 2 outputtype 351 outputhealth 13 ================================================ FILE: files/recipes/dyes/orange.recipe ================================================ # Input width 2 height 1 <- 351:1 351:11 -> # Output outputcount 2 outputtype 351 outputhealth 14 ================================================ FILE: files/recipes/dyes/pink.recipe ================================================ # Input width 2 height 1 <- 351:1 351:15 -> # Output outputcount 2 outputtype 351 outputhealth 9 ================================================ FILE: files/recipes/dyes/purple.recipe ================================================ # Input width 2 height 1 <- 351:4 351:1 -> # Output outputcount 2 outputtype 351 outputhealth 5 ================================================ FILE: files/recipes/dyes/red.recipe ================================================ # Input width 1 height 1 <- 38 -> # Output outputcount 2 outputtype 351 outputhealth 1 ================================================ FILE: files/recipes/dyes/white.recipe ================================================ # Input width 1 height 1 <- 352 -> # Output outputcount 2 outputtype 351 outputhealth 15 ================================================ FILE: files/recipes/dyes/yellow.recipe ================================================ # Input width 1 height 1 <- 37 -> # Output outputcount 2 outputtype 351 outputhealth 11 ================================================ FILE: files/recipes/food/apple_golden.recipe ================================================ # Input width 3 height 3 <- 41 41 41 41 260 41 41 41 41 -> # Output outputcount 1 outputtype 322 outputhealth 0 ================================================ FILE: files/recipes/food/bowls.recipe ================================================ # Input width 3 height 2 <- 5 -1 5 -1 5 -1 -> # Output outputcount 4 outputtype 281 outputhealth 0 ================================================ FILE: files/recipes/food/bread.recipe ================================================ # Input width 3 height 1 <- 296 296 296 -> # Output outputcount 1 outputtype 297 outputhealth 0 ================================================ FILE: files/recipes/food/cake.recipe ================================================ # Input width 3 height 3 <- 335 335 335 353 344 353 296 296 296 -> # Output outputcount 1 outputtype 354 outputhealth 0 ================================================ FILE: files/recipes/food/mushroomstew.recipe ================================================ # Input width 1 height 3 <- 40 39 281 -> # Output outputcount 1 outputtype 282 outputhealth 0 ================================================ FILE: files/recipes/food/sugar.recipe ================================================ # Input width 1 height 1 <- 338 -> # Output outputcount 1 outputtype 353 outputhealth 0 ================================================ FILE: files/recipes/materials/block_brick.recipe ================================================ # Input width 2 height 2 <- 336 336 336 336 -> # Output outputcount 1 outputtype 45 outputhealth 0 ================================================ FILE: files/recipes/materials/block_clay.recipe ================================================ # Input width 2 height 2 <- 337 337 337 337 -> # Output outputcount 1 outputtype 82 outputhealth 0 ================================================ FILE: files/recipes/materials/block_diamond.recipe ================================================ # Input width 3 height 3 <- 264 264 264 264 264 264 264 264 264 -> # Output outputcount 1 outputtype 57 outputhealth 0 ================================================ FILE: files/recipes/materials/block_glowstone.recipe ================================================ # Input width 3 height 3 <- 348 348 348 348 348 348 348 348 348 -> # Output outputcount 1 outputtype 89 outputhealth 0 ================================================ FILE: files/recipes/materials/block_gold.recipe ================================================ # Input width 3 height 3 <- 266 266 266 266 266 266 266 266 266 -> # Output outputcount 1 outputtype 41 outputhealth 0 ================================================ FILE: files/recipes/materials/block_iron.recipe ================================================ # Input width 3 height 3 <- 265 265 265 265 265 265 265 265 265 -> # Output outputcount 1 outputtype 42 outputhealth 0 ================================================ FILE: files/recipes/materials/block_sandstone.recipe ================================================ # Input width 2 height 2 <- 12 12 12 12 -> # Output outputcount 1 outputtype 24 outputhealth 0 ================================================ FILE: files/recipes/materials/block_snow.recipe ================================================ # Input width 2 height 2 <- 332 332 332 332 -> # Output outputcount 1 outputtype 80 outputhealth 0 ================================================ FILE: files/recipes/materials/block_wool.recipe ================================================ # Input width 3 height 3 <- 287 287 287 287 287 287 287 287 287 -> # Output outputcount 1 outputtype 23 outputhealth 0 ================================================ FILE: files/recipes/materials/clay.recipe ================================================ # Input width 1 height 1 <- 82 -> # Output outputcount 4 outputtype 337 outputhealth 0 ================================================ FILE: files/recipes/materials/ingots_diamond.recipe ================================================ # Input width 1 height 1 <- 57 -> # Output outputcount 9 outputtype 264 outputhealth 0 ================================================ FILE: files/recipes/materials/ingots_gold.recipe ================================================ # Input width 1 height 1 <- 41 -> # Output outputcount 9 outputtype 266 outputhealth 0 ================================================ FILE: files/recipes/materials/ingots_iron.recipe ================================================ # Input width 1 height 1 <- 42 -> # Output outputcount 9 outputtype 265 outputhealth 0 ================================================ FILE: files/recipes/materials/sticks.recipe ================================================ # Input width 1 height 2 <- 5 5 -> # Output outputcount 4 outputtype 280 outputhealth 0 ================================================ FILE: files/recipes/materials/tnt.recipe ================================================ # Input width 3 height 3 <- 289 12 289 12 289 12 289 12 289 -> # Output outputcount 1 outputtype 46 outputhealth 0 ================================================ FILE: files/recipes/materials/wood_planks_acacia.recipe ================================================ # Input width 1 height 1 <- 162:0 -> # Output outputcount 4 outputtype 5 outputhealth 4 ================================================ FILE: files/recipes/materials/wood_planks_birch.recipe ================================================ # Input width 1 height 1 <- 17:2 -> # Output outputcount 4 outputtype 5 outputhealth 2 ================================================ FILE: files/recipes/materials/wood_planks_dark_oak.recipe ================================================ # Input width 1 height 1 <- 162:1 -> # Output outputcount 4 outputtype 5 outputhealth 5 ================================================ FILE: files/recipes/materials/wood_planks_jungle.recipe ================================================ # Input width 1 height 1 <- 17:3 -> # Output outputcount 4 outputtype 5 outputhealth 3 ================================================ FILE: files/recipes/materials/wood_planks_oak.recipe ================================================ # Input width 1 height 1 <- 17:0 -> # Output outputcount 4 outputtype 5 outputhealth 0 ================================================ FILE: files/recipes/materials/wood_planks_spruce.recipe ================================================ # Input width 1 height 1 <- 17:1 -> # Output outputcount 4 outputtype 5 outputhealth 1 ================================================ FILE: files/recipes/mechanism/button_stone.recipe ================================================ # Input width 1 height 2 <- 1 1 -> # Output outputcount 1 outputtype 77 outputhealth 0 ================================================ FILE: files/recipes/mechanism/dispenser.recipe ================================================ # Input width 3 height 3 <- 4 4 4 4 261 4 4 55 4 -> # Output outputcount 1 outputtype 23 outputhealth 0 ================================================ FILE: files/recipes/mechanism/door_iron.recipe ================================================ # Input width 2 height 3 <- 265 265 265 265 265 265 -> # Output outputcount 1 outputtype 330 outputhealth 0 ================================================ FILE: files/recipes/mechanism/door_wood.recipe ================================================ # Input width 2 height 3 <- 5 5 5 5 5 5 -> # Output outputcount 1 outputtype 324 outputhealth 0 ================================================ FILE: files/recipes/mechanism/lever.recipe ================================================ # Input width 1 height 2 <- 280 4 -> # Output outputcount 1 outputtype 69 outputhealth 0 ================================================ FILE: files/recipes/mechanism/note_block.recipe ================================================ # Input width 3 height 3 <- 5 5 5 5 55 5 5 5 5 -> # Output outputcount 1 outputtype 25 outputhealth 0 ================================================ FILE: files/recipes/mechanism/pressure_stone.recipe ================================================ # Input width 2 height 1 <- 1 1 -> # Output outputcount 1 outputtype 70 outputhealth 0 ================================================ FILE: files/recipes/mechanism/pressure_wood.recipe ================================================ # Input width 2 height 1 <- 5 5 -> # Output outputcount 1 outputtype 72 outputhealth 0 ================================================ FILE: files/recipes/mechanism/torch_redstone.recipe ================================================ # Input width 1 height 2 <- 331 280 -> # Output outputcount 1 outputtype 76 outputhealth 0 ================================================ FILE: files/recipes/misc/bed.recipe ================================================ # Input width 3 height 2 <- 35 35 35 5 5 5 -> # Output outputcount 1 outputtype 355 outputhealth 0 ================================================ FILE: files/recipes/misc/book.recipe ================================================ # Input width 1 height 3 <- 339 339 339 -> # Output outputcount 1 outputtype 340 outputhealth 0 ================================================ FILE: files/recipes/misc/bookshelf.recipe ================================================ # Input width 3 height 3 <- 5 5 5 340 340 340 5 5 5 -> # Output outputcount 1 outputtype 47 outputhealth 0 ================================================ FILE: files/recipes/misc/chest.recipe ================================================ # Input width 3 height 3 <- 5 5 5 5 -1 5 5 5 5 -> # Output outputcount 1 outputtype 54 outputhealth 0 ================================================ FILE: files/recipes/misc/fence_acacia.recipe ================================================ # Input width 3 height 2 <- 5:4 280 5:4 5:4 280 5:4 -> # Output outputcount 3 outputtype 192 outputhealth 0 ================================================ FILE: files/recipes/misc/fence_birch.recipe ================================================ # Input width 3 height 2 <- 5:2 280 5:2 5:2 280 5:2 -> # Output outputcount 3 outputtype 189 outputhealth 0 ================================================ FILE: files/recipes/misc/fence_dark_oak.recipe ================================================ # Input width 3 height 2 <- 5:5 280 5:5 5:5 280 5:5 -> # Output outputcount 3 outputtype 191 outputhealth 0 ================================================ FILE: files/recipes/misc/fence_jungle.recipe ================================================ # Input width 3 height 2 <- 5:3 280 5:3 5:3 280 5:3 -> # Output outputcount 3 outputtype 190 outputhealth 0 ================================================ FILE: files/recipes/misc/fence_oak.recipe ================================================ # Input width 3 height 2 <- 5:0 280 5:0 5:0 280 5:0 -> # Output outputcount 3 outputtype 85 outputhealth 0 ================================================ FILE: files/recipes/misc/fence_spruce.recipe ================================================ # Input width 3 height 2 <- 5:1 280 5:1 5:1 280 5:1 -> # Output outputcount 3 outputtype 188 outputhealth 0 ================================================ FILE: files/recipes/misc/furnace.recipe ================================================ # Input width 3 height 3 <- 4 4 4 4 -1 4 4 4 4 -> # Output outputcount 1 outputtype 61 outputhealth 0 ================================================ FILE: files/recipes/misc/jackolantern.recipe ================================================ # Input width 1 height 2 <- 86 50 -> # Output outputcount 1 outputtype 91 outputhealth 0 ================================================ FILE: files/recipes/misc/jukebox.recipe ================================================ # Input width 3 height 3 <- 5 5 5 5 264 5 5 5 5 -> # Output outputcount 1 outputtype 84 outputhealth 0 ================================================ FILE: files/recipes/misc/ladder.recipe ================================================ # Input width 3 height 3 <- 280 -1 280 280 280 280 280 -1 280 -> # Output outputcount 2 outputtype 65 outputhealth 0 ================================================ FILE: files/recipes/misc/painting.recipe ================================================ # Input width 3 height 3 <- 280 280 280 280 26 280 280 280 280 -> # Output outputcount 1 outputtype 321 outputhealth 0 ================================================ FILE: files/recipes/misc/paper.recipe ================================================ # Input width 3 height 1 <- 338 338 338 -> # Output outputcount 3 outputtype 339 outputhealth 0 ================================================ FILE: files/recipes/misc/sign.recipe ================================================ # Input width 3 height 3 <- 5 5 5 5 5 5 -1 280 -1 -> # Output outputcount 1 outputtype 323 outputhealth 0 ================================================ FILE: files/recipes/misc/stairs_stone.recipe ================================================ # Input width 3 height 3 <- 4 -1 -1 4 4 -1 4 4 4 -> # Output outputcount 4 outputtype 67 outputhealth 0 ================================================ FILE: files/recipes/misc/stairs_wood.recipe ================================================ # Input width 3 height 3 <- 5 -1 -1 5 5 -1 5 5 5 -> # Output outputcount 4 outputtype 53 outputhealth 0 ================================================ FILE: files/recipes/misc/torch.recipe ================================================ # Input width 1 height 2 <- 263 280 -> # Output outputcount 4 outputtype 50 outputhealth 0 ================================================ FILE: files/recipes/misc/workbench.recipe ================================================ # Input width 2 height 2 <- 5 5 5 5 -> # Output outputcount 1 outputtype 58 outputhealth 0 ================================================ FILE: files/recipes/tools/axe_diamond.recipe ================================================ # Input width 2 height 3 <- 264 264 264 280 -1 280 -> # Output outputcount 1 outputtype 279 outputhealth 0 ================================================ FILE: files/recipes/tools/axe_gold.recipe ================================================ # Input width 2 height 3 <- 266 266 266 280 -1 280 -> # Output outputcount 1 outputtype 286 outputhealth 0 ================================================ FILE: files/recipes/tools/axe_iron.recipe ================================================ # Input width 2 height 3 <- 265 265 265 280 -1 280 -> # Output outputcount 1 outputtype 258 outputhealth 0 ================================================ FILE: files/recipes/tools/axe_stone.recipe ================================================ # Input width 2 height 3 <- 4 4 4 280 -1 280 -> # Output outputcount 1 outputtype 275 outputhealth 0 ================================================ FILE: files/recipes/tools/axe_wood.recipe ================================================ # Input width 2 height 3 <- 5 5 5 280 -1 280 -> # Output outputcount 1 outputtype 271 outputhealth 0 ================================================ FILE: files/recipes/tools/bucket.recipe ================================================ # Input width 3 height 2 <- 265 -1 265 -1 265 -1 -> # Output outputcount 1 outputtype 325 outputhealth 0 ================================================ FILE: files/recipes/tools/clock.recipe ================================================ # Input width 3 height 3 <- -1 266 -1 266 331 266 -1 266 -1 -> # Output outputcount 1 outputtype 347 outputhealth 0 ================================================ FILE: files/recipes/tools/compass.recipe ================================================ # Input width 3 height 3 <- -1 265 -1 265 331 265 -1 265 -1 -> # Output outputcount 1 outputtype 345 outputhealth 0 ================================================ FILE: files/recipes/tools/fishingrod.recipe ================================================ # Input width 3 height 3 <- -1 -1 280 -1 280 287 280 -1 286 -> # Output outputcount 1 outputtype 346 outputhealth 0 ================================================ FILE: files/recipes/tools/flintsteel.recipe ================================================ # Input width 2 height 2 <- 265 -1 -1 318 -> # Output outputcount 1 outputtype 259 outputhealth 0 ================================================ FILE: files/recipes/tools/hoe_diamond.recipe ================================================ # Input width 2 height 3 <- 264 264 -1 280 -1 280 -> # Output outputcount 1 outputtype 293 outputhealth 0 ================================================ FILE: files/recipes/tools/hoe_gold.recipe ================================================ # Input width 2 height 3 <- 266 266 -1 280 -1 280 -> # Output outputcount 1 outputtype 294 outputhealth 0 ================================================ FILE: files/recipes/tools/hoe_iron.recipe ================================================ # Input width 2 height 3 <- 265 265 -1 280 -1 280 -> # Output outputcount 1 outputtype 292 outputhealth 0 ================================================ FILE: files/recipes/tools/hoe_stone.recipe ================================================ # Input width 2 height 3 <- 4 4 -1 280 -1 280 -> # Output outputcount 1 outputtype 291 outputhealth 0 ================================================ FILE: files/recipes/tools/hoe_wood.recipe ================================================ # Input width 2 height 3 <- 5 5 -1 280 -1 280 -> # Output outputcount 1 outputtype 290 outputhealth 0 ================================================ FILE: files/recipes/tools/pickaxe_diamond.recipe ================================================ # Input width 3 height 3 <- 264 264 264 -1 280 -1 -1 280 -1 -> # Output outputcount 1 outputtype 278 outputhealth 0 ================================================ FILE: files/recipes/tools/pickaxe_gold.recipe ================================================ # Input width 3 height 3 <- 266 266 266 -1 280 -1 -1 280 -1 -> # Output outputcount 1 outputtype 285 outputhealth 0 ================================================ FILE: files/recipes/tools/pickaxe_iron.recipe ================================================ # Input width 3 height 3 <- 265 265 265 -1 280 -1 -1 280 -1 -> # Output outputcount 1 outputtype 257 outputhealth 0 ================================================ FILE: files/recipes/tools/pickaxe_stone.recipe ================================================ # Input width 3 height 3 <- 4 4 4 -1 280 -1 -1 280 -1 -> # Output outputcount 1 outputtype 274 outputhealth 0 ================================================ FILE: files/recipes/tools/pickaxe_wood.recipe ================================================ # Input width 3 height 3 <- 5 5 5 -1 280 -1 -1 280 -1 -> # Output outputcount 1 outputtype 270 outputhealth 0 ================================================ FILE: files/recipes/tools/shears.recipe ================================================ # Input width 2 height 2 <- -1 265 265 -1 -> # Output outputcount 1 outputtype 359 outputhealth 0 ================================================ FILE: files/recipes/tools/shovel_diamond.recipe ================================================ # Input width 1 height 3 <- 264 280 280 -> # Output outputcount 1 outputtype 277 outputhealth 0 ================================================ FILE: files/recipes/tools/shovel_gold.recipe ================================================ # Input width 1 height 3 <- 266 280 280 -> # Output outputcount 1 outputtype 284 outputhealth 0 ================================================ FILE: files/recipes/tools/shovel_iron.recipe ================================================ # Input width 1 height 3 <- 265 280 280 -> # Output outputcount 1 outputtype 256 outputhealth 0 ================================================ FILE: files/recipes/tools/shovel_stone.recipe ================================================ # Input width 1 height 3 <- 4 280 280 -> # Output outputcount 1 outputtype 273 outputhealth 0 ================================================ FILE: files/recipes/tools/shovel_wood.recipe ================================================ # Input width 1 height 3 <- 5 280 280 -> # Output outputcount 1 outputtype 269 outputhealth 0 ================================================ FILE: files/recipes/transport/boat.recipe ================================================ # Input width 3 height 2 <- 5 -1 5 5 5 5 -> # Output outputcount 1 outputtype 333 outputhealth 0 ================================================ FILE: files/recipes/transport/minecart.recipe ================================================ # Input width 3 height 2 <- 265 -1 265 265 265 265 -> # Output outputcount 1 outputtype 328 outputhealth 0 ================================================ FILE: files/recipes/transport/minecart_powered.recipe ================================================ # Input width 1 height 2 <- 61 328 -> # Output outputcount 1 outputtype 343 outputhealth 0 ================================================ FILE: files/recipes/transport/minecart_storage.recipe ================================================ # Input width 1 height 2 <- 54 328 -> # Output outputcount 1 outputtype 342 outputhealth 0 ================================================ FILE: files/recipes/transport/minecart_tracks.recipe ================================================ # Input width 3 height 3 <- 265 -1 265 265 280 265 265 -1 265 -> # Output outputcount 16 outputtype 66 outputhealth 0 ================================================ FILE: files/recipes/weapons/arrows.recipe ================================================ # Input width 1 height 3 <- 318 280 288 -> # Output outputcount 4 outputtype 262 outputhealth 0 ================================================ FILE: files/recipes/weapons/bow.recipe ================================================ # Input width 3 height 3 <- 287 280 -1 287 -1 280 287 280 -1 -> # Output outputcount 1 outputtype 261 outputhealth 0 ================================================ FILE: files/recipes/weapons/sword_diamond.recipe ================================================ # Input width 1 height 3 <- 264 264 280 -> # Output outputcount 1 outputtype 276 outputhealth 1562 ================================================ FILE: files/recipes/weapons/sword_gold.recipe ================================================ # Input width 1 height 3 <- 266 266 280 -> # Output outputcount 1 outputtype 283 outputhealth 33 ================================================ FILE: files/recipes/weapons/sword_iron.recipe ================================================ # Input width 1 height 3 <- 265 265 280 -> # Output outputcount 1 outputtype 267 outputhealth 0 ================================================ FILE: files/recipes/weapons/sword_stone.recipe ================================================ # Input width 1 height 3 <- 4 4 280 -> # Output outputcount 1 outputtype 272 outputhealth 0 ================================================ FILE: files/recipes/weapons/sword_wood.recipe ================================================ # Input width 1 height 3 <- 5 5 280 -> # Output outputcount 1 outputtype 268 outputhealth 0 ================================================ FILE: files/recipes/white.recipe ================================================ # Input width 1 height 1 <- 35 351:15 -> # Output outputcount 1 outputtype 35 outputhealth 0 ================================================ FILE: files/roles.txt ================================================ # admins [Server] # ops # members ================================================ FILE: files/rules.txt ================================================ # Server rules here §4Server rules 1. Do not whine 2. Whine 3. Whining is required 4. ^__________^ ================================================ FILE: files/test.lua ================================================ print ("Hi, enjoy hacking with Lua"); function timer200() calltest("test1", "test2"); end; ================================================ FILE: files/whitelist.txt ================================================ # This is default whitelist file. Write nicks to be whitelisted here one for each line ================================================ FILE: init.d/mineserver.centos ================================================ #!/bin/bash # # mineserver Startup script for the Mineserver # # chkconfig: - 85 15 # description: Mineserver is a FOSS implementation of the Minecraft server from minecraft.net # processname: mineserver # pidfile: /usr/local/mineserver/mineserver.pid BASEDIR=/usr/local/mineserver pidfile=$BASEDIR/mineserver.pid lockfile=/var/lock/subsys/mineserver prog=mineserver # Source function library. . /etc/rc.d/init.d/functions start() { echo -n $"Starting $prog: " cd $BASEDIR #this doesn't seem to work ./$prog ./config.cfg &> /dev/null RETVAL=$? echo [ $RETVAL = 0 ] && touch ${lockfile} return $RETVAL } stop() { echo -n $"Stopping $prog: " killproc -p ${pidfile} -d 10 $BASEDIR/$prog 2 RETVAL=$? echo [ $RETVAL = 0 ] && rm -f ${lockfile} return $RETVAL } restart() { stop start } # See how we were called. case "$1" in start) start ;; stop) stop ;; restart) restart ;; status) status -p ${pidfile} $prog ;; *) echo $"Usage: $prog {start|stop|restart|status}" ;; esac ================================================ FILE: plugins/CMakeLists.txt ================================================ cmake_minimum_required(VERSION 2.6) # forbid running cmake from this subdir if(PROJECT_NAME STREQUAL "Project") message(FATAL_ERROR "\nplease run cmake from the project's parent directory\n") endif() # # plugin sources # RULES: each unique subdirectory is plugin name # set(plugins_source commands/commands.cpp filelog/filelog.cpp nBreak/nBreak.cpp nether/nether.cpp binlog/binlog.cpp crapMobs/crapMobs.cpp cursesui/screen.cpp flatpermissions/flatpermissions.cpp passiveMobs/passiveMobs.cpp ) # # custom defines # add_definitions(-DFADOR_PLUGIN=1) # # dependencies # set(cursesui_depends Curses ) ############################################################################### # # make lists from plugins_source # foreach(src ${plugins_source}) string(REGEX REPLACE "/.*$" "" p "${src}") list(APPEND plugins ${p}) list(APPEND ${p}_source ${src}) endforeach() list(REMOVE_DUPLICATES plugins) # # dependency check # set(TARGETS "") foreach(p ${plugins}) message(STATUS "Dependency check: ${p}") foreach(lib ${${p}_depends}) find_package(${lib}) string(TOUPPER ${lib} LIB) if (NOT ${LIB}_FOUND) set(${p}_error True) break() endif() endforeach() if(NOT ${p}_error) list(APPEND TARGETS ${p}) else() message("\t-- DISABLED: ${p}") endif() endforeach() # override the build location again. SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "../${CONFIG_DIR_BIN}/plugins") # # build targets # foreach(p ${TARGETS}) message(STATUS "Target: ${p}") add_library(${p} SHARED ${${p}_source}) set_target_properties(${p} PROPERTIES PREFIX "") foreach(lib ${${p}_depends}) string(TOUPPER ${lib} LIB) include_directories(${${LIB}_INCLUDE_DIR}) target_link_libraries(${p} ${${LIB}_LIBRARY}) endforeach() endforeach() # # install # install(TARGETS ${TARGETS} DESTINATION ${CONFIG_DIR_BIN}/plugins) ================================================ FILE: plugins/binlog/binlog.cfg ================================================ system.plugins += ("binlog":"./binlog"); # Enable Transaction Logging? enable_binary_logging = true binary_log = "minserver.bin" ================================================ FILE: plugins/binlog/binlog.cpp ================================================ /* Copyright (c) 2010, The Mineserver Project All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the The Mineserver Project nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ // // Mineserver binlog.cpp // #include #include #include #include #include #include #include #include "plugin_api.h" #include "binlog.h" Binlog::Binlog (std::string filename) { log_stream.open(filename.c_str(), std::fstream::in | std::fstream::out | std::fstream::binary ); if (!log_stream.is_open()) { return; } } Binlog &Binlog::get(std::string filename) { static Binlog instance(filename); return instance; } // Log action to binary log void Binlog::log (event_t event) { if(!log_stream.bad()) { event.timestamp = time (NULL); event.nsize = strlen(event.nick); log_stream.seekp(0, std::ios::end); log_stream.write((char *) &event.timestamp, sizeof(time_t)); log_stream.write((char *) &event.x, sizeof(int)); log_stream.write((char *) &event.y, sizeof(int)); log_stream.write((char *) &event.z, sizeof(int)); log_stream.write((char *) &event.otype, sizeof(unsigned char)); log_stream.write((char *) &event.ntype, sizeof(unsigned char)); log_stream.write((char *) &event.ometa, sizeof(unsigned char)); log_stream.write((char *) &event.nmeta, sizeof(unsigned char)); log_stream.write((char *) &event.nsize, sizeof(int)); log_stream.write((char *) &event.nick, event.nsize+1); } } // Get logs based on nick and timestamp bool Binlog::getLogs (time_t t, std::string &nick, std::vector *logs) { event_t event; log_stream.flush(); log_stream.seekg(0, std::ios::beg); while(this->getEvent(&event)) { if(event.timestamp > t && (strcmp(event.nick, nick.c_str()) == 0)) { logs->push_back(event); } } return true; } // Get logs based on timestamp bool Binlog::getLogs (time_t t, std::vector *logs) { event_t event; log_stream.flush(); log_stream.seekg(0, std::ios::beg); while(this->getEvent(&event)) { if(event.timestamp > t) { logs->push_back(event); } } return true; } // Get all logs bool Binlog::getLogs (std::vector *logs) { event_t event; log_stream.flush(); log_stream.seekg(0, std::ios::beg); while(this->getEvent(&event)) { logs->push_back(event); } return true; } // Get event from log bool Binlog::getEvent (event_t *event) { if(!log_stream.eof()) { log_stream.read((char *) &event->timestamp, sizeof(time_t)); log_stream.read((char *) &event->x, sizeof(int)); log_stream.read((char *) &event->y, sizeof(int)); log_stream.read((char *) &event->z, sizeof(int)); log_stream.read((char *) &event->otype, sizeof(unsigned char)); log_stream.read((char *) &event->ntype, sizeof(unsigned char)); log_stream.read((char *) &event->ometa, sizeof(unsigned char)); log_stream.read((char *) &event->nmeta, sizeof(unsigned char)); log_stream.read((char *) &event->nsize, sizeof(int)); log_stream.read((char *) &event->nick, event->nsize+1); return true; } log_stream.clear(); return false; } Binlog::~Binlog() { log_stream.close(); } mineserver_pointer_struct* mineserver; std::string pluginName = "binlog"; std::string filename; bool enabled; // Rollback Transaction Logs void rollBack (const char* user, int argc, const char** args) { std::vector logs; time_t timestamp; if(argc > 0) { std::stringstream ss (std::stringstream::in | std::stringstream::out); ss << args[0]; ss >> timestamp; } if(argc == 2 ) { std::string victim = args[1]; Binlog::get(filename).getLogs(timestamp, victim, &logs); } else if (argc == 1) { Binlog::get(filename).getLogs(timestamp, &logs); } else { Binlog::get(filename).getLogs(&logs); } std::vector::reverse_iterator event; if(logs.size() > 0) { mineserver->chat.sendmsgTo(user, "Rolling back map..."); for(event = logs.rbegin(); event != logs.rend(); event++) { mineserver->map.setBlock(event->x, event->y, event->z, event->otype, event->ometa); } mineserver->chat.sendmsgTo(user, "Map roll back completed!"); } else { mineserver->chat.sendmsgTo(user, "No binary logs found!"); } } // Playback Transaction Logs void playBack (const char* user, int argc, const char** args) { return; std::vector logs; time_t timestamp; if(argc > 0) { std::stringstream ss (std::stringstream::in | std::stringstream::out); ss << args[0]; ss >> timestamp; } if(argc == 2 ) { std::string victim = args[1]; Binlog::get(filename).getLogs(timestamp, victim, &logs); } else if (argc == 1) { Binlog::get(filename).getLogs(timestamp, &logs); } else { Binlog::get(filename).getLogs(&logs); } std::vector::reverse_iterator event; if(logs.size() > 0) { mineserver->chat.sendmsgTo(user, "Playing back binary log..."); for(event = logs.rbegin(); event != logs.rend(); event++) { mineserver->map.setBlock(event->x, event->y, event->z, event->otype, event->ometa); } mineserver->chat.sendmsgTo(user, "Binary log playback completed!"); } else { mineserver->chat.sendmsgTo(user, "No binary logs found!"); } } // Block Break Callback bool callbackBlockBreakPre (const char* user,int x,int y,int z) { event_t event; strcpy(event.nick, user); event.x = x; event.y = y; event.z = z; event.ntype = 0; event.nmeta = 0; mineserver->map.getBlock(x,y,z,&event.otype, &event.ometa); Binlog::get(filename).log(event); return true; } bool translateDirection(int32_t *x, int8_t *y, int32_t *z, int8_t direction) { switch(direction) { case BLOCK_BOTTOM: (*y)--; break; case BLOCK_TOP: (*y)++; break; case BLOCK_NORTH: (*x)++; break; case BLOCK_SOUTH: (*x)--; break; case BLOCK_EAST: (*z)++; break; case BLOCK_WEST: (*z)--; break; default: break; } return true; } // Block Place Callback bool callbackBlockPlacePre (const char* user,int32_t x,int8_t y,int32_t z, unsigned char type, unsigned char meta) { event_t event; translateDirection(&x,&y,&z,meta); strcpy(event.nick, user); event.x = x; event.y = y; event.z = z; event.ntype = type; event.nmeta = meta; mineserver->map.getBlock(x,y,z,&event.otype, &event.ometa); Binlog::get(filename).log(event); return true; } // Command Registration bool callbackPlayerChatCommand (const char* user, const char* command, int argc, const char** args) { if(strcmp(command, "rollback") == 0) { rollBack(user, argc, args); return true; } else if (strcmp(command, "playback") == 0) { playBack(user, argc, args); return true; } return false; } std::string dtos( double n ) { std::ostringstream result; result << n; return result.str(); } #define LOG_INFO 6 PLUGIN_API_EXPORT void CALLCONVERSION binlog_init(mineserver_pointer_struct* mineserver_temp) { mineserver = mineserver_temp; enabled = mineserver->config.bData("enable_binary_logging"); filename = mineserver->config.sData("binary_log"); if (mineserver->plugin.getPluginVersion("binlog") > 0) { std::string msg = "binlog is already loaded v."+dtos(mineserver->plugin.getPluginVersion(pluginName.c_str())); mineserver->logger.log(LOG_INFO, "plugin.binlog", msg.c_str()); return; } std::string msg = "Loaded "+pluginName+"!"; mineserver->logger.log(LOG_INFO, "plugin.binlog", msg.c_str()); mineserver->plugin.setPluginVersion("binlog", PLUGIN_VERSION); if(enabled) { mineserver->plugin.addCallback("BlockPlacePre", reinterpret_cast(callbackBlockPlacePre)); mineserver->plugin.addCallback("BlockBreakPre", reinterpret_cast(callbackBlockBreakPre)); } mineserver->plugin.addCallback("PlayerChatCommand", reinterpret_cast(callbackPlayerChatCommand)); } PLUGIN_API_EXPORT void CALLCONVERSION binlog_shutdown(void) { if (mineserver->plugin.getPluginVersion("binlog") <= 0) { mineserver->logger.log(LOG_INFO, "plugin.binlog", "binlog is not loaded!"); return; } } ================================================ FILE: plugins/binlog/binlog.h ================================================ /* Copyright (c) 2010, The Mineserver Project All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the The Mineserver Project nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ // // Mineserver trxlogger.h // #include #include #include #include "plugin_api.h" #ifndef _BINLOG_H #define _BINLOG_H #define PLUGIN_VERSION 0.1 #endif struct event_t { time_t timestamp; int x; int y; int z; unsigned char otype, ntype; unsigned char ometa, nmeta; int nsize; char nick[17]; }; class Binlog { public: void log(event_t event); static Binlog &get(std::string filename); bool getLogs(time_t t, std::string &nick, std::vector *logs); bool getLogs(time_t t, std::vector *logs); bool getLogs(std::vector *logs); bool getEvent(event_t *event); private: std::fstream log_stream; Binlog(std::string filename); ~Binlog(); }; ================================================ FILE: plugins/binlog/binlogdump.cpp ================================================ /* Copyright (c) 2010, The Mineserver Project All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the The Mineserver Project nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ // // Mineserver binlogdump.cpp // #include #include #include "binlog.h" int main (int argc, const char* argv[] ) { if(argc != 2) { printf("Usage: %s \n", argv[0]); return 1; } std::vector logs; Binlog::get(argv[1]).getLogs(&logs); std::vector::iterator event; for(event = logs.begin(); event != logs.end(); event++) { printf("{timestamp:%d, nick:%s, x:%i, y:%i, z:%i, old_type:%#x, old_meta:%#x, new_type:%#x, new_meta:%#x}\n", event->timestamp, event->nick, event->x, event->y, event->z, (int) event->otype, (int) event->ometa, (int) event->ntype, (int) event->nmeta ); } return 0; } ================================================ FILE: plugins/commands/commands.cpp ================================================ /* Copyright (c) 2013, The Mineserver Project All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the The Mineserver Project nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include // Added for MOTD #include #include #include #include #include #include #include #define MINESERVER_C_API #include "plugin_api.h" #include "commands.h" enum { PLANE,REPLACE }; int _atoi(const std::string& str, bool* ok = 0){ if(ok){ *ok =true; for(int i=0;i 57){ *ok = false; return 0; } } return atoi(str.c_str()); } #define PLUGIN_COMMANDS_VERSION 1.1 const char CHATCMDPREFIX = '/'; mineserver_pointer_struct* mineserver; struct cuboidStruct { int x; char y; int z; unsigned char block; bool active; int state; int action; int fromBlock; int toBlock; }; std::unordered_map cuboidMap; std::string dtos(double n) { std::ostringstream result; result << n; return result.str(); } typedef void (*CommandCallback)(std::string nick, std::string, std::deque); struct Command { Command(std::deque _names, std::string _arguments, std::string _description, CommandCallback _callback, bool _needAdmin = false, bool _needOp = false, bool _needMember = false) : names(_names), arguments(_arguments), description(_description), callback(_callback), needAdmin(_needAdmin), needOp(_needOp), needMember(_needMember) {} std::deque names; std::string arguments; std::string description; bool needAdmin; bool needOp; bool needMember; CommandCallback callback; }; typedef std::shared_ptr ComPtr; typedef std::unordered_map CommandList; CommandList m_Commands; void registerCommand(ComPtr command) { // Loop thru all the words for this command std::string currentWord; std::deque words = command->names; while(!words.empty()) { currentWord = words.front(); words.pop_front(); m_Commands[currentWord] = command; } } bool chatCommandFunction(const char* userIn,const char* cmdIn, int argc, char** argv) { std::string user(userIn); std::string command(cmdIn); std::deque cmd(argv, argv+argc); if(command.size() == 0) { return false; } std::string logMsg = user + ": " + command; mineserver->logger.log(LOG_INFO, "plugin.commands", logMsg.c_str()); // User commands CommandList::iterator iter; if((iter = m_Commands.find(command)) != m_Commands.end()) { if(iter->second->needAdmin) { if(!mineserver->permissions.isAdmin(user.c_str())) { mineserver->chat.sendmsgTo(user.c_str(), "Need Admin rights"); return true; } } if(iter->second->needOp) { if(!mineserver->permissions.isOp(user.c_str())) { mineserver->chat.sendmsgTo(user.c_str(), "Need Operator rights"); return true; } } if(iter->second->needMember) { if(!mineserver->permissions.isMember(user.c_str())) { mineserver->chat.sendmsgTo(user.c_str(), "Need Member rights"); return true; } } iter->second->callback(user, command, cmd); return true; } return false; } bool isValidItem(int id) { if (id < 1) // zero or negative items are all invalid { return false; } if (id > 136 && id < 256) // these are undefined blocks and items { return false; } if (id >= 2256 && id <= 2266) // records are special cased { return true; } if (id > 388) // high items are invalid { return false; } return true; } int roundUpTo(int x, int nearest) { return (((x + (nearest - 1)) / nearest) * nearest ); } void giveItemsName(std::string userIn, int id, int count, int health) { if (isValidItem(id)) { int itemCount = 1, itemStacks = 1; if(count != 1) { itemCount = count; if(itemCount>1024) itemCount=1024; // If multiple stacks itemStacks = roundUpTo(itemCount, 64) / 64; itemCount -= (itemStacks-1) * 64; } int amount = 64; for(int i = 0; i < itemStacks; i++) { // if last stack if(i == itemStacks - 1) { amount = itemCount; } mineserver->user.addItem(userIn.c_str(), id, amount, health); } } else { mineserver->chat.sendmsgTo(userIn.c_str(), "Not a valid item"); } } void giveItems(std::string userIn, std::string command, std::deque args) { if (args.size() == 2 || args.size() == 3) { std::string user = args[0]; int itemId = 0; //First check if item is a number itemId = atoi(args[1].c_str()); //If item was not a number, search the name from config if (itemId == 0) { itemId = mineserver->config.iData(args[1].c_str()); } if(args.size()==2) { giveItemsName(user, itemId, 1,0); } else { giveItemsName(user, itemId, atoi(args[2].c_str()),0); } } else { mineserver->chat.sendmsgTo(userIn.c_str(),"Usage: /give player item [count]"); } } void giveItemsSelf(std::string user, std::string command, std::deque args) { if (args.size() == 1 || args.size() == 2) { int itemId = 0; //First check if item is a number itemId = atoi(args[0].c_str()); //If item was not a number, search the name from config if (itemId == 0) { itemId = mineserver->config.iData(args[0].c_str()); } if(args.size()==1) { giveItemsName(user, itemId, 1,0); } else { giveItemsName(user, itemId, atoi(args[1].c_str()),0); } } else { mineserver->chat.sendmsgTo(user.c_str(),"Usage: /igive item [count]"); } } void home(std::string user, std::string command, std::deque args) { mineserver->chat.sendmsgTo(user.c_str(),"Teleported you home!"); int x,y,z; mineserver->map.getSpawn(&x,&y,&z); mineserver->user.teleport(user.c_str(),x, y + 2, z); } void setSpawn(std::string user, std::string command, std::deque args) { if(args.size() == 0) { double x,y,z; mineserver->user.getPosition(user.c_str(), &x,&y,&z,NULL,NULL,NULL); mineserver->chat.sendmsgTo(user.c_str(),"Set spawn!"); mineserver->map.setSpawn(x,y,z); mineserver->user.teleport(user.c_str(),x, y + 2, z); } } void userWorld(std::string user, std::string command, std::deque args) { if(args.size() == 1) { double x,y,z; mineserver->user.getPosition(user.c_str(), &x,&y,&z,NULL,NULL,NULL); mineserver->logger.log(LOG_INFO, "plugin.commands", (user + args[0]).c_str()); mineserver->user.teleportMap(user.c_str(), x,y+2,z,atoi(args[0].c_str())); } } void coordinateTeleport(std::string user, std::string command, std::deque args) { if(args.size() == 3) { double x = atof(args[0].c_str()); double y = atof(args[1].c_str()); double z = atof(args[2].c_str()); mineserver->user.teleport(user.c_str(), x, y, z); } else { mineserver->chat.sendmsgTo(user.c_str(),"Usage: /ctp x y z"); } } void userTeleport(std::string user, std::string command, std::deque args) { if(args.size() == 1) { std::string tUser = args[0]; double x,y,z; if(mineserver->user.getPosition(tUser.c_str(), &x,&y,&z,NULL,NULL,NULL)) { mineserver->user.teleport(user.c_str(),x,y+2,z); mineserver->chat.sendmsgTo(user.c_str(), "Teleported!"); } else { std::string msg = "User " + args[0] + " not found (see /players)"; mineserver->chat.sendmsgTo(user.c_str(), msg.c_str()); } } else if(args.size() == 2) { std::string whoUser = args[0]; std::string toUser = args[1]; double x,y,z; if(mineserver->user.getPosition(toUser.c_str(), &x,&y,&z,NULL,NULL,NULL)) { mineserver->user.teleport(whoUser.c_str(),x,y+2,z); mineserver->chat.sendmsgTo(user.c_str(), "Teleported!"); } else { std::string msg = "User " + args[0] + " not found (see /players)"; mineserver->chat.sendmsgTo(user.c_str(), msg.c_str()); } } else { mineserver->chat.sendmsgTo(user.c_str(), "Usage: /tp [player] targetplayer"); } } void replace(std::string user, std::string command, std::deque args) { if (cuboidMap.find(user) != cuboidMap.end()) { cuboidMap.erase(user); } if (args.size() == 2) { cuboidMap[user].active = 1; cuboidMap[user].state = 0; cuboidMap[user].action = REPLACE; int blockID = atoi(args[0].c_str()); //If item was not a number, search the name from config if (blockID == 0) { blockID = mineserver->config.iData(args[0].c_str()); } if(blockID < 1 || blockID > 255) { cuboidMap.erase(user); return; } cuboidMap[user].fromBlock = blockID; blockID = atoi(args[1].c_str()); //If item was not a number, search the name from config if (blockID == 0 && args[1] != "0") { blockID = mineserver->config.iData(args[1].c_str()); } if(blockID < 0 || blockID > 255) { cuboidMap.erase(user); return; } cuboidMap[user].toBlock = blockID; mineserver->chat.sendmsgTo(user.c_str(),"Cuboid replace start, hit first block"); } } void replacechunk(std::string user, std::string command, std::deque args) { if(args.size() == 2) { double x,y,z; if(mineserver->user.getPosition(user.c_str(), &x,&y,&z,NULL,NULL,NULL)) { int fromBlock = atoi(args[0].c_str()); //If item was not a number, search the name from config if (fromBlock == 0) { fromBlock = mineserver->config.iData(args[0].c_str()); } if(fromBlock < 1 || fromBlock > 255) { return; } int toBlock = atoi(args[1].c_str()); //If item was not a number, search the name from config if (toBlock == 0 && args[1] != "0") { toBlock = mineserver->config.iData(args[1].c_str()); } if(toBlock < 0 || toBlock > 255) { return; } int chunkx,chunkz; chunkx = ((int)x)>>4; chunkz = ((int)z)>>4; unsigned char* blocks = mineserver->map.getMapData_block(chunkx,chunkz); for(int bX = 0; bX < 16; bX++) { for(int bZ = 0; bZ < 16; bZ++) { for(int bY = 0; bY < 128; bY++) { if(blocks[bY + ((bZ << 7) + (bX << 11))] == fromBlock) { blocks[bY + ((bZ << 7) + (bX << 11))] = toBlock; } } } } // TODO: Send chunk update to all players. mineserver->chat.sendmsgTo(user.c_str(),"Replace chunk done"); } } } void flattenchunk(std::string user, std::string command, std::deque args) { if(args.size() == 1) { double x,y,z; if(mineserver->user.getPosition(user.c_str(), &x,&y,&z,NULL,NULL,NULL)) { int topBlock = atoi(args[0].c_str()); //If item was not a number, search the name from config if (topBlock == 0) { topBlock = mineserver->config.iData(args[0].c_str()); } if(topBlock < 1 || topBlock > 255) { return; } int chunkx,chunkz; chunkx = ((int)x)>>4; chunkz = ((int)z)>>4; unsigned char* blocks = mineserver->map.getMapData_block(chunkx,chunkz); for(int bX = 0; bX < 16; bX++) { for(int bZ = 0; bZ < 16; bZ++) { for(int bY = 127; bY >= 0; bY--) { if(bY >= y) { blocks[bY + ((bZ << 7) + (bX << 11))] = 0; } else if(bY == y - 1) { blocks[bY + ((bZ << 7) + (bX << 11))] = topBlock; } else { // Do nothing; leave this block untouched } } } } // TODO: Send chunk update to all players. mineserver->chat.sendmsgTo(user.c_str(),"Flatten chunk done"); } } } void cuboid(std::string user, std::string command, std::deque args) { if(cuboidMap.find(user) != cuboidMap.end()) { cuboidMap.erase(user); } cuboidMap[user].active = 1; cuboidMap[user].state = 0; cuboidMap[user].action = PLANE; mineserver->chat.sendmsgTo(user.c_str(),"Cuboid start, place first block"); } void playerList(std::string user, std::string command, std::deque args) { mineserver->chat.sendUserlist(user.c_str()); } void saveMap(std::string user, std::string command, std::deque args) { mineserver->map.saveWholeMap(); mineserver->chat.sendmsgTo(user.c_str(),"Saved map!"); } void setTime(std::string user, std::string command, std::deque args) { if(args.size() == 1) { std::string timeValue = args[0]; // Check for time labels if(timeValue == "day" || timeValue == "morning") { timeValue = "24000"; } else if (timeValue == "dawn") { timeValue = "22500"; } else if (timeValue == "noon") { timeValue = "6000"; } else if (timeValue == "dusk") { timeValue = "12000"; } else if (timeValue == "night" || timeValue == "midnight") { timeValue = "18000"; } mineserver->map.setTime(atoi(timeValue.c_str())); mineserver->chat.sendmsgTo(user.c_str(),"World time changed."); } else { mineserver->chat.sendmsgTo(user.c_str(),"Usage: /settime time (time = 0-24000)"); } } void getTime(std::string user, std::string command, std::deque args) { std::string msg = "The current server time is " + dtos(mineserver->map.getTime()); mineserver->chat.sendmsgTo(user.c_str(), msg.c_str()); } bool translateDirection(int32_t *x, int8_t *y, int32_t *z, int8_t direction) { switch(direction) { case BLOCK_BOTTOM: (*y)--; break; case BLOCK_TOP: (*y)++; break; case BLOCK_NORTH: (*x)++; break; case BLOCK_SOUTH: (*x)--; break; case BLOCK_EAST: (*z)++; break; case BLOCK_WEST: (*z)--; break; default: break; } return true; } bool startedDiggingFunction(const char* userIn, int32_t x,int8_t y,int32_t z,int8_t direction) { //translateDirection(&x,&y,&z,direction); std::string user(userIn); int map = 0; mineserver->user.getPositionW(userIn, NULL, NULL, NULL, &map,NULL, NULL, NULL); if(cuboidMap.find(user) != cuboidMap.end()) { if(cuboidMap[user].active) { if(cuboidMap[user].action == REPLACE) { if(cuboidMap[user].state == 0) { cuboidMap[user].state = 1; cuboidMap[user].x = x; cuboidMap[user].y = y; cuboidMap[user].z = z; mineserver->chat.sendmsgTo(user.c_str(),"First block done, now second"); } else if(cuboidMap[user].state == 1) { int xstart,xend; int ystart,yend; int zstart,zend; xstart=(x 10000) { mineserver->chat.sendmsgTo(user.c_str(),"Area too large!"); return true; } for(int xpos = xstart; xpos <= xend; xpos ++) { for(int zpos = zstart; zpos <= zend; zpos ++) { for(int ypos = ystart; ypos <= yend; ypos ++) { if(mineserver->map.getBlock(xpos,ypos,zpos,&block,&meta) && block == cuboidMap[user].fromBlock) { mineserver->map.setBlock(xpos,ypos,zpos,cuboidMap[user].toBlock,map); } } } } mineserver->chat.sendmsgTo(user.c_str(),"Replace done"); cuboidMap.erase(user); } } } } return true; } bool blockPlacePreFunction(const char* userIn, int32_t x,int8_t y,int32_t z,int16_t block,int8_t direction) { translateDirection(&x,&y,&z,direction); std::string user(userIn); if(cuboidMap.find(user) != cuboidMap.end()) { if(cuboidMap[user].active) { if(cuboidMap[user].action == PLANE) { if(cuboidMap[user].state == 0) { cuboidMap[user].state = 1; cuboidMap[user].x = x; cuboidMap[user].y = y; cuboidMap[user].z = z; cuboidMap[user].block = block; mineserver->chat.sendmsgTo(user.c_str(),"First block done, place second"); } else if(cuboidMap[user].state == 1) { if(cuboidMap[user].block == block) { int xstart,xend; int ystart,yend; int zstart,zend; xstart=(x 10000) { mineserver->chat.sendmsgTo(user.c_str(),"Area too large!"); return true; } for(int xpos = xstart; xpos <= xend; xpos ++) { for(int zpos = zstart; zpos <= zend; zpos ++) { for(int ypos = ystart; ypos <= yend; ypos ++) { mineserver->map.setBlock(xpos,ypos,zpos,block,0); } } } mineserver->chat.sendmsgTo(user.c_str(),"Cuboid done"); cuboidMap.erase(user); } } } } } return true; } void doNotDisturb(std::string user, std::string command, std::deque args) { mineserver->user.toggleDND(user.c_str()); } void gps(std::string user, std::string command, std::deque args) { double x,y,z,stance; float yaw,pitch; mineserver->user.getPosition(user.c_str(), &x, &y, &z, &yaw, &pitch, &stance); std::string msg = "X: " + dtos(x) + " Y: " + dtos(y) + " Z: " + dtos(z); mineserver->chat.sendmsgTo(user.c_str(), msg.c_str()); } void banUser(std::string user, std::string command, std::deque args) { return; } void unbanUser(std::string user, std::string command, std::deque args) { return; } void sendRules(std::string user, std::string command, std::deque args) { std::string line; std::ifstream rules("rules.txt"); if(rules.is_open()) { while(rules.good()) { std::getline(rules, line); if(line.size() > 0 && line.at(0) != '#') mineserver->chat.sendmsgTo(user.c_str(), line.c_str()); } rules.close(); } } void about(std::string user, std::string command, std::deque args) { if (mineserver->config.bData("system.show_version")) { std::string msg = std::string("§9") + std::string(mineserver->config.sData("system.server_name")) + std::string(" Running Mineserver v.") + std::string(VERSION_SIMPLE); mineserver->chat.sendmsgTo(user.c_str(), msg.c_str()); } } void sendHelp(std::string user, std::string command, std::deque args) { // TODO: Add paging support, since not all commands will fit into // the screen at once. CommandList* commandList = &m_Commands; // defaults //std::string commandColor = MC_COLOR_BLUE; if (args.size() == 0) { bool isAdmin = mineserver->permissions.isAdmin(user.c_str()); bool isOp = mineserver->permissions.isOp(user.c_str()); bool isMember = mineserver->permissions.isMember(user.c_str()); for(CommandList::iterator it = commandList->begin();it != commandList->end();++it) { //Display only commands you can use and add !A!, !O! or !M! to signal who can use those std::string msg; if(it->second->needAdmin) { if(!isAdmin) { continue; } else { msg += "§o§c!A!§r "; } } if(it->second->needOp) { if(!isOp) { continue; } else { msg += "§o§c!O!§r "; } } if(it->second->needMember) { if(!isMember) { continue; } else { msg += "§o§c!M!§r "; } } std::string args = it->second->arguments; std::string description = it->second->description; msg += /*commandColor +*/ CHATCMDPREFIX + it->first + " " + args + " : " /*+ MC_COLOR_YELLOW*/ + description; mineserver->chat.sendmsgTo(user.c_str(), msg.c_str()); } } else { CommandList::iterator iter; if ((iter = commandList->find(args.front())) != commandList->end()) { std::string args = iter->second->arguments; std::string description = iter->second->description; std::string msg = /*commandColor +*/ CHATCMDPREFIX + iter->first + " " + args; mineserver->chat.sendmsgTo(user.c_str(), msg.c_str()); msg = /*MC_COLOR_YELLOW + */CHATCMDPREFIX + description; mineserver->chat.sendmsgTo(user.c_str(), msg.c_str()); } else { std::string msg = /*MC_COLOR_RED +*/ "Unknown Command: " + args.front(); mineserver->chat.sendmsgTo(user.c_str(),msg.c_str()); } } } void sendMOTD(std::string user, std::string command, std::deque args) { std::string line; std::ifstream MOTDFile("motd.txt"); if (MOTDFile.is_open()) { while (MOTDFile.good() ) { std::getline(MOTDFile, line); if(line.size() > 0 && line.at(0) != '#') mineserver->chat.sendmsgTo(user.c_str(), line.c_str()); } MOTDFile.close(); } } void changeGameMode(std::string user, std::string command, std::deque args){ std::string changeUser; if(args.size() == 2){ changeUser = args[0]; args.erase(args.begin()); } else changeUser = user; if(args.size() == 1){ bool ok; int i = _atoi(args[0], &ok); if(!ok){ if(args[0] == "survival") i=0; else if(args[0] == "creative") i=1; else goto printhelp; } if(i != 0 && i != 1) goto printhelp; mineserver->user.setGameMode(user.c_str(), i); std::string info = user + " set " + changeUser + "'s gamemode to " + ( i ? "creative" : "survival") + "."; mineserver->logger.log(LOG_INFO, "plugin.commands", info.c_str()); return; } printhelp: mineserver->chat.sendmsgTo(user.c_str(), "usage: /gamemode [player] < survival | 0 ; creative | 1 > " ) ; } std::string pluginName = "commands"; PLUGIN_API_EXPORT void CALLCONVERSION commands_init(mineserver_pointer_struct* mineserver_temp) { mineserver = mineserver_temp; if (mineserver->plugin.getPluginVersion(pluginName.c_str()) > 0) { std::string msg = "commands is already loaded v."+dtos(mineserver->plugin.getPluginVersion(pluginName.c_str())); mineserver->logger.log(LOG_INFO, "plugin.commands", msg.c_str()); return; } std::string msg = "Loaded "+pluginName+"!"; mineserver->logger.log(LOG_INFO, "plugin.commands", msg.c_str()); mineserver->plugin.setPluginVersion(pluginName.c_str(), PLUGIN_COMMANDS_VERSION); mineserver->plugin.addCallback("PlayerChatCommand", reinterpret_cast(chatCommandFunction)); mineserver->plugin.addCallback("BlockPlacePre", reinterpret_cast(blockPlacePreFunction)); mineserver->plugin.addCallback("PlayerDiggingStarted", reinterpret_cast(startedDiggingFunction)); registerCommand(ComPtr(new Command(parseCmd("about"), "", "Displays server name and software version", about))); registerCommand(ComPtr(new Command(parseCmd("ctp"), " ", "Teleport to coordinates (eg. /ctp 100 100 100)", coordinateTeleport,false,false,true))); registerCommand(ComPtr(new Command(parseCmd("cuboid"), "", "Type in the command and place two blocks, it will fill the space between them", cuboid,false,true))); registerCommand(ComPtr(new Command(parseCmd("dnd"), "", "Toggles Do Not Disturb mode", doNotDisturb))); registerCommand(ComPtr(new Command(parseCmd("flattenchunk"), "", "Erases all blocks above you and changes all blocks at your Y-level to your block of choice", flattenchunk, false,true))); registerCommand(ComPtr(new Command(parseCmd("gettime"), "", "Gets the world time", getTime))); registerCommand(ComPtr(new Command(parseCmd("give"), " [count]", "Gives [count] pieces of . By default [count] = 1", giveItems,false,true))); registerCommand(ComPtr(new Command(parseCmd("gps"), "", "Display current coordinates", gps))); registerCommand(ComPtr(new Command(parseCmd("help"), "[]", "Display this help message.", sendHelp))); registerCommand(ComPtr(new Command(parseCmd("home"), "", "Teleports you to this world's spawn location", home))); registerCommand(ComPtr(new Command(parseCmd("igive i item"), " [count]", "Gives self [count] pieces of . By default [count] = 1", giveItemsSelf, false,true))); registerCommand(ComPtr(new Command(parseCmd("motd"), "", "Displays the server's MOTD", sendMOTD))); registerCommand(ComPtr(new Command(parseCmd("players who names list"), "", "Lists online players", playerList))); registerCommand(ComPtr(new Command(parseCmd("replace"), " ", "Type in the command and left-click two blocks, it will replace the selected blocks with the new blocks", replace, true))); registerCommand(ComPtr(new Command(parseCmd("replacechunk"), " ", "Replaces the chunk you are at with the block you specify", replacechunk, true))); registerCommand(ComPtr(new Command(parseCmd("rules"), "", "Displays server rules", sendRules))); registerCommand(ComPtr(new Command(parseCmd("save"), "", "Manually saves map to disc", saveMap, false, true))); registerCommand(ComPtr(new Command(parseCmd("setspawn"), "", "Sets home to your current coordinates", setSpawn, true))); registerCommand(ComPtr(new Command(parseCmd("settime"), "