Skip to content

Instantly share code, notes, and snippets.

View legoboy0215's full-sized avatar

Legoboy0215 legoboy0215

View GitHub Profile

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
#!/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 April 1, 2016 01:58 — 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
<?php
/**
* @name VirtualInventories
* @main VirtualInventories\Loader
* @version 1.0.0
* @api 1.12.0
* @description Way to open virtual custom inventories
* @author iksaku
*/
$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 March 1, 2016 00:21 — forked from shoghicp/commands.md
Some interesting commands to play with the new NBT support for items.

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}]}
<?php
$world = $this->getServer()->getDefaultLevel();
$radius = 136;
$total = (($radius * 2) + 1) ** 2;
$count = 0;
$bList = clone \pocketmine\block\Block::$list;
$search = [];
<?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 January 20, 2016 11:35 — forked from PEMapModder/mysqli.php
Simple MySQL client written in 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:");