Last active
May 18, 2021 04:56
-
-
Save book000/72833d938f9cf6f8542f0c548d26290f to your computer and use it in GitHub Desktop.
IntelliJでSpigotの開発環境を作る実行構成(すべてのファイルを .run ディレクトリに配置, buildAndTest.batをShiftJIS,CRLFにするのを忘れずに)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
set PLUGIN_NAME=PLUGIN-NAME | |
set JAR_FILE=OUTPUT-JAR.jar | |
if not exist run ( | |
mkdir run | |
) | |
if not exist run\eula.txt ( | |
echo eula=true> run\eula.txt | |
) | |
if not exist run\plugins ( | |
mkdir run\plugins | |
) | |
if not exist run\paper.jar ( | |
curl -o run\paper.jar -L "https://papermc.io/api/v1/paper/1.16.5/latest/download" | |
) | |
if not exist run\mcrconapi-1.1.1.jar ( | |
curl -o run\mcrconapi-1.1.1.jar -L "https://github.com/fnetworks/mcrconapi/releases/download/v1.1.1/mcrconapi-1.1.1.jar" | |
) | |
if not exist run\server.properties ( | |
echo server.propertiesが存在しないため作成します。 | |
echo gamemode=creative> run/server.properties | |
echo enforce-whitelist=true>> run/server.properties | |
echo difficulty=peaceful>> run/server.properties | |
echo level-type=flat>> run/server.properties | |
echo enable-command-block=true>> run/server.properties | |
echo server-port=25565>> run/server.properties | |
echo enable-rcon=true>> run/server.properties | |
echo rcon.password=rconpassword>> run/server.properties | |
echo rcon.port=25575>> run/server.properties | |
echo white-list=true>> run/server.properties | |
echo motd=%PLUGIN_NAME% Test Server>> run/server.properties | |
) | |
echo jarファイルをコピーします。 | |
copy target\%JAR_FILE% run\plugins\%JAR_FILE% | |
if not %errorlevel% == 0 ( | |
echo %JAR_FILE% NOT FOUND | |
echo 5秒後にクローズします。 | |
timeout 5 /NOBREAK | |
exit 1 | |
) | |
echo Minecraftサーバに対してリロードコマンドを実行します。 | |
java -jar run\mcrconapi-1.1.1.jar -a localhost -l rconpassword -n -c "rl confirm" | |
if not %errorlevel% == 0 ( | |
echo Minecraftサーバが起動していないため、起動します。 | |
cd run | |
java -jar paper.jar -nogui | |
if %errorlevel% == 0 exit | |
) | |
echo 5秒後にクローズします。 | |
timeout 5 /NOBREAK | |
exit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<component name="ProjectRunConfigurationManager"> | |
<configuration default="false" name="Package build" type="MavenRunConfiguration" factoryName="Maven"> | |
<MavenSettings> | |
<option name="myGeneralSettings" /> | |
<option name="myRunnerSettings" /> | |
<option name="myRunnerParameters"> | |
<MavenRunnerParameters> | |
<option name="profiles"> | |
<set /> | |
</option> | |
<option name="goals"> | |
<list> | |
<option value="clean" /> | |
<option value="package" /> | |
</list> | |
</option> | |
<option name="pomFileName" /> | |
<option name="profilesMap"> | |
<map /> | |
</option> | |
<option name="resolveToWorkspace" value="false" /> | |
<option name="workingDirPath" value="$PROJECT_DIR$" /> | |
</MavenRunnerParameters> | |
</option> | |
</MavenSettings> | |
<method v="2" /> | |
</configuration> | |
</component> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<component name="ProjectRunConfigurationManager"> | |
<configuration default="false" name="ReBuild And Reload (Win)" type="ShConfigurationType" singleton="false"> | |
<option name="INDEPENDENT_SCRIPT_PATH" value="false" /> | |
<option name="SCRIPT_PATH" value="$PROJECT_DIR$/.run/buildAndTest.bat" /> | |
<option name="SCRIPT_OPTIONS" value="" /> | |
<option name="INDEPENDENT_SCRIPT_WORKING_DIRECTORY" value="true" /> | |
<option name="SCRIPT_WORKING_DIRECTORY" value="$PROJECT_DIR$" /> | |
<option name="INDEPENDENT_INTERPRETER_PATH" value="true" /> | |
<option name="INTERPRETER_PATH" value="" /> | |
<option name="INTERPRETER_OPTIONS" value="" /> | |
<option name="EXECUTE_IN_TERMINAL" value="true" /> | |
<envs /> | |
<method v="2"> | |
<option name="RunConfigurationTask" enabled="true" run_configuration_name="Package build" run_configuration_type="MavenRunConfiguration" /> | |
</method> | |
</configuration> | |
</component> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment