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
2016-12-31 [14:19:32] [Server thread/WARNING]: Non-packaged PocketMine-MP installation detected, do not use on production. | |
2016-12-31 [14:19:32] [Server thread/INFO]: Loading pocketmine.yml... | |
2016-12-31 [14:19:32] [Server thread/INFO]: Loading server properties... | |
2016-12-31 [14:19:32] [Server thread/INFO]: Selected English (eng) as the base language | |
2016-12-31 [14:19:32] [Server thread/INFO]: Starting Minecraft: PE server version v1.0.0.16 | |
2016-12-31 [14:19:32] [Server thread/INFO]: Opening server on 0.0.0.0:21256 | |
2016-12-31 [14:19:32] [Server thread/INFO]: This server is running PocketMine-MP version 1.6.2dev "Unleashed" (API 3.0.0-ALPHA1) | |
2016-12-31 [14:19:32] [Server thread/INFO]: PocketMine-MP is distributed under the LGPL License | |
2016-12-31 [14:19:32] [Server thread/INFO]: Loading recipes... | |
2016-12-31 [14:19:34] [Server thread/NOTICE]: Level "world" not found |
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 | |
$skindata = base64_decode(file_get_contents("/Users/luca/Desktop/skindata.txt")); | |
$colors = str_split($skindata, 4); | |
$height = count($colors) / 64; | |
$skin = imagecreatetruecolor(64, $height); | |
$allocatedColors = array(); | |
foreach ($colors as $color) { | |
str_split($color); | |
$red = hexdec(bin2hex($color[0])); |
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 | |
public function onPreCommand(PlayerCommandPreprocessEvent $event) { | |
$message = $event->getMessage(); | |
if ($message{0} == "/") { | |
$offset = 1; // /comando | |
} | |
elseif (substr($message, 0, 2) == "./") { | |
$offset = 2; // ./comando | |
} | |
else { |
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 | |
/** | |
* @name WorldNamesFixer | |
* @main TheNewHEROBRINE\WorldNamesFixer\Main | |
* @version 1.0.0 | |
* @api 3.0.0-ALPHA7 | |
* @author TheNewHEROBRINE | |
*/ |
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
#!/usr/bin/env php | |
<?php | |
$opts = getopt("", ["phar:", "target:"]); | |
if(!isset($opts["phar"]) or !isset($opts["target"])) { | |
exit(1); | |
} | |
$pharPath = "phar://".$opts["phar"]; | |
$folderPath = $opts["target"].DIRECTORY_SEPARATOR.basename($opts["phar"], ".phar"); | |
foreach(new RecursiveIteratorIterator(new RecursiveDirectoryIterator($pharPath)) as $fInfo){ | |
$path = $fInfo->getPathname(); |
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 | |
array_unique(array_map(function ($command) { | |
/** @var Command $command */ | |
return $command->getName(); | |
}, array_filter($cmds = $this->getServer()->getCommandMap()->getCommands(), function ($command) use($plugin, $cmds) { | |
/** @var Command $command */ | |
return $command instanceof PluginIdentifiableCommand and $command->getPlugin() === $plugin or isset($cmds[strtolower($plugin->getName() . ":" . $command->getName())]); | |
}))); |
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: string | |
version: string | |
main: string | |
api: string[]|string | |
mcpe-protocol: int[]|int | |
commands: | |
string: | |
description: string | |
usage: string | |
aliases: string[] |
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 | |
const WRAPPER = "\xfe\xfd"; | |
const SESSIONID = "\x01\x02\x03\x04"; | |
const HANDSHAKE = "\x09"; | |
const STATISTICS = "\x00"; | |
function queryPMMPServer(string $ip, int $port = 19132): array { | |
$socket = fsockopen("udp://" . gethostbyname($ip), $port, $errno, $errstr); |
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
function message { | |
echo "[*] $1" | |
} | |
message "PocketMine-MP sta per essere installato nella cartella corrente (`pwd`)" | |
read -p "Premi invio per iniziare l'installazione... | |
" | |
message "Download dei binari PHP..." | |
wget https://jenkins.pmmp.io/job/PHP-8.0-Linux-x86_64/lastSuccessfulBuild/artifact/PHP_Linux-x86_64.tar.gz | |
tar xzf PHP_Linux-x86_64.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 | |
public function onItemPickup(InventoryPickupItemEvent $event) : void{ | |
$inventory = $event->getInventory(); | |
if($inventory instanceof PlayerInventory){ | |
$player = $inventory->getHolder(); | |
if($player instanceof Player){ | |
$murderPlayer = $this->plugin->findMurderPlayer($player); | |
$itemEntity = $event->getItem(); | |
$itemItem = $itemEntity->getItem(); | |
if($murderPlayer instanceof MurderPlayer){ |
OlderNewer