Skip to content

Instantly share code, notes, and snippets.

Avatar

Moved! TheDiamondYT1

View GitHub Profile
View github_markdown_spoilers.txt
<details>
<summary>Spoiler Title</summary>
Text in spoiler here...
Blah...
</details>
@TheDiamondYT1
TheDiamondYT1 / BlockFire.java
Created May 9, 2017
Minecraft BlockFire.java
View BlockFire.java
/*******************************************************
* From bukkit/mc-dev.
*
* THIS CODE IS COPYRIGHT MOJANG AB.
*
* I have changed some function and method names to
* make it more readable.
*/
package net.minecraft.server;
@TheDiamondYT1
TheDiamondYT1 / ModPE_v2.js
Last active Feb 2, 2017
A new version of ModPE. This is just for ideas on how the API should be. Please comment opinions.
View ModPE_v2.js
/*** #ModPE ***/ // How all mods should start (Or some kind of hashtag, because hastags are lit af)
//********** Please comment on this gist with any suggestions or changes **********
// Core apis
var block = require('block');
var modpe = require('core');
var level = require('level');
var command = require('command');
var mod = require('mod')
@TheDiamondYT1
TheDiamondYT1 / GET-MCPE-REALMS-WORLDS
Created Jan 9, 2017
I am trying to use curl to retrieve my realms worlds. Below is the command im using and below that is the output from a url capturing app.
View GET-MCPE-REALMS-WORLDS
curl -s -X GET -A "MCPE/Android" -H "Connection: Keep-Alive" -H "Client-Version: 1.0.0" -H "Charset: utf-8" -H "Content-Type: application/json" -H "Cache-Control: no-cache" -H "Authorization:XBL3.0 x=179553430866589705;eyJlbmMiOiJBMTI4Q0JDK0hTMjU2IiwiYWxnIjoiUlNBLU9BRVAiLCJjdHkiOiJKV1QiLCJ6aXAiOiJERUYiLCJ4NXQiOiJfd3lzeEV6dHY4UmdGLWl4cjltdy1LTTNaUG8ifQ.0Ab-pEz6JdK5SaqaVRsAjGYwcB9rij5oH4hBTVMGOCCpYrf8NxZzp5eH2Sd4RyTL6PW2gvb5vlqklfcIgZnsv7Aq4feIgSgdExPYluUa5E1ifJgVijX2iO3HN14pVHug2n23bwqj4eE80y-VILWEYCvzf08d7Jj69T7KiaKKI9_VbBCJ4BhhbEtDmDwfi10UZKewVQDbTnqF98vakA69dwkjWcdoIhUNDAfBzF3IkAEAM6BLQVuOxF07_63aaMPGJmEabf0GJCLMDvuvq1FsNOs1Bp_D9pnz8UPivneRegkOYiNcMMrlO49hjwF0L-VQ1e4PKjK5z82zy_qSJBSSdA.1SS8wj9xocMLPRicVC0WkA.qIrIQ38oKQaS2C82J_KabO_lfi3r56ulQ-SzfE2qFQaYrpFuIFeZy9A2wUW4ScXDivDLCzSRLgSEeGkFkSnwr8b0J692BGXbj3KAjjsjcAqYo6yJVJ3t9PGJjzM3iCmsfmSY_WnoHpszoTCsM_7euDucw1ITkZatlalwXVh8hbAZyUzfxFkqVU6ukTyJn21D8E49BblUi-SPV5socBX1tFNGAkLN0iz9DcDoq_3suTTQB11V2NNEv0NG_nS3Po4_WYg0x-gGXifYyTSULU39-XuuQfcSm_2dt4R4lHMKoGp8gjKK
@TheDiamondYT1
TheDiamondYT1 / Plugin-only-for-Genisys.php
Last active Aug 29, 2016
Snippret of only allowing plugin to be loaded by Genisys
View Plugin-only-for-Genisys.php
<?php
namespace example;
use pocketmine\plugin\PluginBase
class MyClass extends PluginBase {
public function onEnable(){
$version = $this->getServer()->getName();