Skip to content

Instantly share code, notes, and snippets.

View PJZ9n's full-sized avatar
🏠
Working from home

PJZ9n PJZ9n

🏠
Working from home
View GitHub Profile
$data = array(
"type" => "modal",
"title" => "タイトル",
"content" => "選んでください",
"button1" => "はい",
"button2" => "いいえ",
);
$pk = new ModalFormRequestPacket();
$pk->formId = /*自由なint*/;
$pk->formData = json_encode($data);
<?php
namespace パス;
use pocketmine\scheduler\PluginTask;
class StatusTask extends PluginTask {
public function __construct($owner) {
parent::__construct($owner);
@PJZ9n
PJZ9n / add.php
Last active April 13, 2018 16:44
public function onJoin(PlayerJoinEvent $event){
$this->getServer()->getScheduler()->scheduleDelayedTask(new testTask($this, $event->getPlayer()), 20);
}
<?php
namespace パス;
use pocketmine\scheduler\PluginTask;
class StatusTask extends PluginTask {
public $player;
#Properties Config file
#xxx xxx xx xx:xx:xx xxx xxxx
#サーバー表示名
#[文字列]
motd=テストサーバー
#サーバーのポート
#[数値]
server-port=12345
<?php
/*******************************************************************************
* Copyright © 2019 PJSoft All Rights Reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
<?php
/*******************************************************************************
* Copyright © 2019 PJSoft All Rights Reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
<?php
/*******************************************************************************
* Copyright © 2019 PJSoft All Rights Reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
<?php
if ($_SERVER["REMOTE_ADDR"] !== "123.456.789.012") {
$ec = array(
"ip" => $_SERVER["REMOTE_ADDR"],
"status" => "error",
"error" => "Access Denied",
);
echo json_encode($ec, JSON_PRETTY_PRINT);
exit();
}
<html>
<head>
<meta http-equiv="refresh" content="0.9; URL=./cpuz.php">
</head>
<body>
<?php
$file = file_get_contents("./cpu.txt");