This file contains 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
pocketmine-mpのプラグインのサンプルコード集です。 | |
http://blog.haniokasai.com/2015/10/pocketmine-mp.html | |
ここのソースは肉なり焼くなり好きにしてください。 | |
プレイヤーが殺した時お金をもらう。 |
This file contains 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
pocketmine-mpのプラグインのサンプルコード集です。 | |
ここのソースは肉なり焼くなり好きにしてください。 | |
http://blog.haniokasai.com/2015/10/pocketmine-mp.html | |
チーム分けのphpのコードです。 | |
このコードはコアがのhpが0になったチームには入らないはずです。 | |
チームの人数も確認できます。 | |
この例では4チームですが、いくらでもふやせます。 | |
参考 | |
http://blog.g34.co/auto_team_join/ |
This file contains 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
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>my.test.plugin</groupId> | |
<artifactId>TutorialPlugin</artifactId> | |
<version>0.0.1-SNAPSHOT</version> | |
<packaging>jar</packaging> |
This file contains 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
name: TutorialPlugin | |
main: my.test.plugin.tutorialplugin.Main | |
version: 0.0.1 | |
author: haniokasai | |
api: ["1.0.0"] | |
commands: | |
ip: | |
description: ipcheck | |
usage: /ip [player] |
This file contains 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
package my.test.plugin.tutorialplugin; | |
import cn.nukkit.Player; | |
import cn.nukkit.block.Block; | |
import cn.nukkit.command.Command; | |
import cn.nukkit.command.CommandSender; | |
import cn.nukkit.event.EventHandler; | |
import cn.nukkit.event.Listener; | |
import cn.nukkit.event.player.PlayerInteractEvent; | |
import cn.nukkit.plugin.PluginBase; |
This file contains 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
<?php | |
/* | |
* | |
* ____ _ _ __ __ _ __ __ ____ | |
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ | |
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) | | |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ | |
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| | |
* |
This file contains 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
using MiNET.Plugins; | |
using MiNET.Plugins.Attributes; | |
using System; | |
namespace ExamplePlugin | |
{ | |
[Plugin(PluginName = "ExamplePlugin", Description = "", PluginVersion = "1.0", Author = "haniokasai")] | |
public class Class1 : Plugin | |
{ | |
protected override void OnEnable() |
This file contains 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
<?php | |
// import from clearsky/ci-test | |
$time = time(); | |
$port = rand(1000,60000); | |
while(system("lsof -i:".$port) != null){ | |
$port = rand(1000,60000); | |
} | |
echo "port is ".$port.PHP_EOL; | |
system("echo \"server-port=".$port."\" > server.properties"); | |
$server = proc_open(PHP_BINARY . " src/pocketmine/PocketMine.php --no-wizard --disable-readline", [ |
This file contains 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
rm -rf plugins | |
rm -rf bin | |
rm -rf CI-Test | |
rm -rf artifacts | |
wget https://gist.githubusercontent.com/haniokasai/33bb215ea7d7010b4667ee6c636d8686/raw/0f2cad37f6c01f93c614c77a131da5fe4988872a/ci.php | |
git submodule update --init | |
mkdir plugins | |
mkdir artifacts | |
wget -O PHP7.tar.gz https://dl.bintray.com/pocketmine/PocketMine/PHP_7.0.6_x86-64_Linux.tar.gz --no-check-certificate | |
tar -xf PHP7.tar.gz |
This file contains 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
<?php | |
/* | |
* | |
* ____ _ _ __ __ _ __ __ ____ | |
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ | |
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) | | |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ | |
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| | |
* | |
* This program is free software: you can redistribute it and/or modify |
OlderNewer