Skip to content

Instantly share code, notes, and snippets.

View TheDiamondYT1's full-sized avatar

Moved! TheDiamondYT1

View GitHub Profile
@TheDiamondYT1
TheDiamondYT1 / Plugin-only-for-Genisys.php
Last active August 29, 2016 23:35
Snippret of only allowing plugin to be loaded by Genisys
<?php
namespace example;
use pocketmine\plugin\PluginBase
class MyClass extends PluginBase {
public function onEnable(){
$version = $this->getServer()->getName();
@TheDiamondYT1
TheDiamondYT1 / ModPE_v2.js
Last active February 2, 2017 00:26
A new version of ModPE. This is just for ideas on how the API should be. Please comment opinions.
/*** #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 January 9, 2017 23:40
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.
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 / BlockFire.java
Created May 9, 2017 20:32
Minecraft 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;
<details>
<summary>Spoiler Title</summary>
Text in spoiler here...
Blah...
</details>