give jasonwynn10 stick 1 {display:{Name:"§r§6§lNormal stick"}}
give jasonwynn10 stick 1 {ench:[{id:12s,lvl:10s}]}
name: Temp | |
author: "jasonwynn10" | |
version: 0.1.0 | |
api: | |
- 2.1.0 | |
- 3.0.0-ALPHA1 | |
- 3.0.0-ALPHA2 | |
- 3.0.0-ALPHA3 | |
- 3.0.0-ALPHA4 | |
- 3.0.0-ALPHA5 |
<?php | |
$path = 'your/path/to/skin.png'; | |
$img = @imagecreatefrompng($path); | |
$bytes = ''; | |
$l = (int)@getimagesize($path)[1]; | |
for ($y = 0; $y < $l; $y++) { | |
for ($x = 0; $x < 64; $x++) { | |
$rgba = @imagecolorat($img, $x, $y); |
<?php | |
/** | |
* Event call is of very low importance and should be ran first, to allow | |
* other plugins to further customise the outcome | |
*/ | |
const LOWEST = 5; | |
/** | |
* Event call is of low importance | |
*/ | |
const LOW = 4; |
<?php | |
#Adding NBT tag "test" (string), which has a value of "hey" | |
/** @var Item $item */ | |
$nbt = $item->getNamedTag() ?? new CompoundTag("", []); | |
$nbt->test = new StringTag("test", "hey"); | |
$item->setNamedTag($nbt); | |
#If item has NBT tag "test", do something | |
/** @var Item $item */ |
<?php | |
/** | |
* This file is an example of a compressed plaintext plugin format for PocketMine | |
* It's aimed towards easy scripting, but not for normal plugin development. | |
* | |
* This kind of plugin won't be able to embed/load resources, | |
* nor have access to some features like fast permission/command integration. | |
* | |
* This first comment is used to define the properties like on plugin.yml, |
<?php | |
/** | |
* @name WorldShift | |
* @main jasonwynn10\WorldShift\MainClass | |
* @version 0.1.0 | |
* @api 3.0.0-ALPHA5 | |
* @description A script to allow teleportation across worlds | |
* @author jasonwynn10 | |
*/ |
<?php | |
public function fixBlockIds() { | |
foreach($this->blocks as $k => $block) { | |
$replace = null; | |
switch($block->getId()) { | |
case 126: | |
$replace = Block::get(Block::WOOD_SLAB, $block->getDamage()); | |
break; | |
case 95: | |
$replace = Block::get(Block::GLASS); |
<?php | |
declare('KEY','insert google API key here'); | |
function translate($langA, $langB, $text){ | |
$json = json_decode(file_get_contents('https://translation.googleapis.com/language/translate/v2?key='.KEY.'&q=' . urlencode($text) . '&target=' . $langB . '&format=text')); | |
$translated_text = $json->data->translations[0]->translatedText; | |
return $translated_text; | |
} | |
public function foo(){ |