Skip to content

Instantly share code, notes, and snippets.

name: BlockedIP
author: PEMapModder
version: 1.0.0
api: [1.0.0]
main: BlcokedIP\BlockedIP
public void run(){
List<Release> releases = new ArrayList<>();
try{
URL url = new URL("https://api.github.com/repos/PocketMine/PocketMine-MP/releases");
try{
String jsonString = IOUtils.toString(url);
try{
JSONArray releasesArray = new JSONArray(jsonString);
for(Object object : releasesArray){
if(object instanceof JSONObject){
<?php
class WithSubcommands extends Command{
public function __construct(Server $server){
parent::__construct(blah, blah, blah);
$this->map = new MySimpleCommandMap($server);
}
public function execute(CommandSender $sender, $label, $args){
$this->map->dispatch($sender, implode(" ", $args));
}
<?php
if(!$this->testPermission($sender)){
return true;
}
if(!isset($args[0])){
$this->sendUsage($sender);
return true;
}
$player = array_shift($args);
$ses = $this->getSession($player);
@PEMapModder
PEMapModder / Translate.md
Created September 26, 2015 15:43
Guidelines for contributing to LegionPE translations

Translating LegionPE plugin

# RedstoneLamp Protocol Documentation File
# In this way you can make comments with the # sign
# Just indent this file in any sizes and we still accept it!
# Note that you may not use # as the comment sign at the middle of a line!
ProtocolName Minecraft NokiaEdition V01
# ProtocolName <protocol name ...>
ProtocolDescription this is an example protocol.\
import static FieldType.*;
public enum MCPEProtocolInfoV27{
LOGIN_PACKET(
LoginRequest.class,
new PF(STRING, "username"),
new PF(LONG, "clientId")
);
MCPEProtocolInfoV27(Class<? extends Request> requestClass, PF... fields){
// initialize fields
}

Timeline for coding LegionPE Muting

May 2015 - adding initial sessions system - check warning points upon login, // TODO execute mute

June 2015 - adding commands - added warning command with an ugly system of posting warning point changes, // TODO check warning consequences

July 2015 - adding network endocrine system - added a mute hormone, // TODO release hormone upon warnings

August 2015 - properly implemented mute hormone, // TODO testing

<?php
use pocketmine\Player;
use pocketmine\entity\Arrow;
use pocketmine\item\Item as StructItem;
use pocketmine\level\Position;
use pocketmine\nbt\tag;
use pocketmine\network\protocol;
class DamagingItem extends Arrow{
<?php
/*
* libtheta
*
* Copyright (C) 2015 PEMapModder and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or