Skip to content

Instantly share code, notes, and snippets.

@haniokasai
Created April 4, 2018 11:05
Show Gist options
  • Save haniokasai/ead7df9abe7ea70160fd37de9e67ae0d to your computer and use it in GitHub Desktop.
Save haniokasai/ead7df9abe7ea70160fd37de9e67ae0d to your computer and use it in GitHub Desktop.
oldapi pocketmine
sed -e 's/"online-mode" => true/"online-mode" => false/g' src/pocketmine/Server.php > src/pocketmine/a
rm src/pocketmine/Server.php
mv src/pocketmine/a src/pocketmine/Server.php
cat src/pocketmine/Server.php
grep -rl "onRun(int" ./src/pocketmine | xargs perl -i -pe "s/onRun\(int/onRun\(/g"
cat src/pocketmine/scheduler/Task.php
grep -rl "string \$commandLabel" ./src/pocketmine | xargs perl -i -pe "s/string \$commandLabel/\$commandLabel/g"
cat src/pocketmine/command/Command.php
rm -rf plugins
rm -rf bin
rm -rf CI-Test
rm -rf artifacts
rm -rf PocketMine-DevTools
git submodule update --init
mkdir plugins
mkdir artifacts
git clone https://github.com/BlueLightJapan/PocketMine-DevTools
rm src/pocketmine/plugin/PluginManager.php
wget https://gist.githubusercontent.com/haniokasai/05e6dee527ff763c0ae9239f3ad8bb04/raw/5980ac2a5ed2c6d88472bb1a8f4be5b94751bf30/PluginManager.php -P src/pocketmine/plugin/
rm src/pocketmine/plugin/PluginBase.php
wget https://gist.githubusercontent.com/haniokasai/227e72f0f19ec6fc3b3217db25d7dca0/raw/b277b5a9b80543602ba6e6345d5e7008fc2f7a35/PluginBase.php -P src/pocketmine/plugin/
rm src/pocketmine/command/CommandExecutor.php
wget https://gist.githubusercontent.com/haniokasai/227e72f0f19ec6fc3b3217db25d7dca0/raw/b277b5a9b80543602ba6e6345d5e7008fc2f7a35/CommandExecutor.php -P src/pocketmine/command/
php -dphar.readonly=0 PocketMine-DevTools/src/DevTools/ConsoleScript.php --make ./src --relative ./ --entry src/pocketmine/PocketMine.php --out ./artifacts/Turanic_1-2.phar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment