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
private function loadEveryClassToCheckForErrorsBecauseICannotAffordGoodIDEs($directory = "/root/pmmp/plugins/CosmicCore-master/src/CosmicCore") | |
{ | |
if(is_dir($directory)) { | |
$scan = scandir($directory); | |
unset($scan[0], $scan[1]); //unset . and .. | |
foreach($scan as $file) { | |
if(is_dir($directory."/".$file)) { | |
$this->loadEveryClassToCheckForErrorsBecauseICannotAffordGoodIDEs($directory."/".$file); | |
} else { | |
if(strpos($file, '.php') !== false) { |
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 code is licensed under WTFPL | |
* (Do What The Fuck You Want To Public License) | |
* http://www.wtfpl.net/ | |
* | |
* WARNING: PLEASE READ the 'Caution' section at | |
* http://php.net/manual/en/function.eval.php before | |
* using or modifying this code. |
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 | |
//source: https://minecraft.gamepedia.com/Armor#Enchantments | |
//$damage = EntityDamageEvent::getFinalDamage(); | |
const TYPE_HELMET = 0; | |
const TYPE_CHESTPLATE = 1; | |
const TYPE_LEGGINGS = 2; | |
const TYPE_BOOTS = 3; |
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//done this just for syntax highlight | |
//ADDING HELMET | |
object(pocketmine\network\mcpe\protocol\InventoryTransactionPacket)#36861 (7) { | |
["actions"]=> | |
array(1) { | |
[0]=> | |
object(stdClass)#36953 (4) { | |
["inventorySource"]=> | |
object(stdClass)#36848 (3) { |
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 is the redis database being selected | |
//Databases in redis are integers (0-15) unlike | |
//mysql where the database can be a string | |
const REDIS_DATABASE = 0; | |
$redis = new \Redis();// https://github.com/phpredis/phpredis | |
$redis->connect("127.0.0.1"); |
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 | |
/** | |
* Source from: | |
* https://github.com/NiclasOlofsson/MiNET/blob/master/src/MiNET/MiNET/Utils/TextUtils.cs | |
*/ | |
namespace cosmiccore\miscs; | |
use pocketmine\utils\TextFormat as TF; | |
class StringUtils { |
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 | |
namespace villagertrade; | |
use pocketmine\entity\Villager; | |
use pocketmine\inventory\BaseInventory; | |
use pocketmine\item\Item; | |
use pocketmine\nbt\NetworkLittleEndianNBTStream; | |
use pocketmine\nbt\tag\{ByteTag, CompoundTag, IntTag, ListTag}; | |
use pocketmine\network\mcpe\protocol\UpdateTradePacket; | |
use pocketmine\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
<?php | |
class A { | |
/** @var \SplFixedArray */ | |
public $array; | |
public function __construct(){ | |
$this->array = new \SplFixedArray(1); |
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 DoubleChestDebug | |
* @main muqsit\dcdcd\Main | |
* @version 1.0 | |
* @api 3.0.0 | |
*/ | |
namespace muqsit\dcdcd { | |
use pocketmine\plugin\PluginBase; |
OlderNewer