LoginSignup
3
0

More than 1 year has passed since last update.

PocketMine-MP4.0を構築する

Last updated at Posted at 2020-06-04

現在PMMP4.0は安定版ではありません。通常のPMMPを使いたい方は3.xを使用してください。
11/15追記: 現在4.0のベータバージョンが公開されており、12/1に安定版のリリースが予定されているため、この記事のような使い方は必要ない(はず)です。

環境

  • Ubuntu 18.04.4

作業用ディレクトリを作る

ディレクトリ名はなんでも大丈夫です。ここではpmmp4とします。

$ mkdir pmmp4
$ cd pmmp4

バイナリをコンパイルする

php-build-scriptsのmasterブランチを使います。compile.sh実行後はかなり時間がかかるので気長に待ちましょう。

$ git clone --branch=master https://github.com/pmmp/php-build-scripts
$ cd php-build-scripts
$ ./compile.sh

エラーが出た場合はインストールするよう表示されたものをインストール後、再度compile.shを実行してください。

$ mv bin ../
$ cd ../
$ rm -rf php-build-scripts

PMMPをダウンロードする

PMMP用のディレクトリを作り、GitHubからPMMPのmasterブランチをcloneした後、必要な物だけを取り出します。

$ git clone --recursive --branch=master https://github.com/pmmp/PocketMine-MP
$ cd PocketMine-MP
$ mv src resources composer.json start.sh ../
$ cd ../
$ rm -rf PocketMine-MP

依存ライブラリをインストール

まずcomposer.pharをダウンロードします。

$ curl -sS https://getcomposer.org/installer | php

composer.pharを用いてインストールします。

$ bin/php7/bin/php composer.phar install

PMMPを起動する

$ ./start.sh -f src/PocketMine.php

成功すると次のように表示されるため、指示に従って設定を行います。

[*] PocketMine-MP set-up wizard
[*] Please select a language
...

設定後、初回では開発中のバージョンで起動できない設定になっているため、自動でPMMPが停止します。
そこで、pocketmine.ymlを編集して起動できるように設定します。

pocketmine.yml
settings:
...
  enable-dev-builds: true

23行目のenable-dev-buildsをfalseからtrueに変更し、保存後再度start.shを実行すると起動できます。

おわりに

何か間違い等あれば連絡ください!
良きPMMPライフを!

3
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
0