Skip to content

Instantly share code, notes, and snippets.

Avatar

Legoboy0215 legoboy0215

View GitHub Profile
View commandOverride.md

You want to override the tell command, that has also the w and msg aliases by default. The class that will override these commands is MyTellCommand (extends PluginCommand).

To do this, you've to set the original command in a state that allows it to be overriden. Also, aliases will be registered directly, but since all the work was done for the first registration, it's pretty simple.

//We are in the context of a plugin
View import.sh
#!/bin/bash
USER="root"
PASSWORD=""
FILES="/Users/tenold/Backups/MySQL/*"
for f in $FILES
do
echo "Processing $f file..."
@legoboy0215
legoboy0215 / VirtualInventories.php
Last active Apr 1, 2016 — forked from iksaku/VirtualInventories.php
Way to open virtual custom inventories in MCPE :D (Work in progress...)Special thanks to @alejandroliu and @PEMapModder for a previous research :3
View VirtualInventories.php
<?php
/**
* @name VirtualInventories
* @main VirtualInventories\Loader
* @version 1.0.0
* @api 1.12.0
* @description Way to open virtual custom inventories
* @author iksaku
*/
View Creeper.php
$FB = "█";
$GR = TextFormat::DARK_GREEN;
$BL = TextFormat::BLACK;
$line1 = $GR . str_repeat($FB, 10);
$line2 = $GR . str_repeat($FB, 10);
$line3 = $GR . $FB . $FB . $BL . $FB . $FB . $GR . $FB . $FB . $BL . $FB . $FB . $GR . $FB . $FB;
$line4 = $GR . $FB . $FB . $BL . $FB . $FB . $GR . $FB . $FB . $BL . $FB . $FB . $GR . $FB . $FB;
$line5 = $GR . $FB . $FB . $FB . $FB . $BL . $FB . $FB . $GR . $FB . $FB . $FB . $FB;
$line6 = $GR . $FB . $FB . $FB . $BL . $FB . $FB . $FB . $FB . $GR . $FB . $FB . $FB;
$line7 = $GR . $FB . $FB . $FB . $BL . $FB . $FB . $FB . $FB . $GR . $FB . $FB . $FB;
@legoboy0215
legoboy0215 / commands.md
Created Mar 1, 2016 — forked from shoghicp/commands.md
Some interesting commands to play with the new NBT support for items.
View commands.md

Items with custom name

give sho stick 1 {display:{Name:"§r§6§lNormal stick"}}

Items with enchantments

give sho gold_sword 1 {ench:[{id:9s,lvl:2s}]}
View deleteBlocks.php
<?php
$world = $this->getServer()->getDefaultLevel();
$radius = 136;
$total = (($radius * 2) + 1) ** 2;
$count = 0;
$bList = clone \pocketmine\block\Block::$list;
$search = [];
View MarqueeTask.php
<?php
namespace shoghicp\MinecraftSimulator\task;
use pocketmine\Player;
use pocketmine\scheduler\PluginTask;
use shoghicp\MinecraftSimulator\Loader;
class MarqueeTask extends PluginTask{
@legoboy0215
legoboy0215 / mysqli.php
Created Jan 20, 2016 — forked from PEMapModder/mysqli.php
Simple MySQL client written in PHP
View mysqli.php
#!/usr/bin/env php
<?php
if(!defined("STDIN")) define("STDIN", fopen("php://stdin", "R"));
$host = "localhost";
$user = "root";
$password = "";
$schema = "";
$opts = getopt("h:u:p:s:");
You can’t perform that action at this time.