Fixed wrong paths

This commit is contained in:
Shoghi Cervantes
2014-04-01 05:06:12 +02:00
parent 05a42712bf
commit dd17652aca
437 changed files with 41109 additions and 0 deletions

View File

@ -0,0 +1,48 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* 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
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
namespace pocketmine\event\player;
use pocketmine\event\Cancellable;
use pocketmine\Player;
/**
* Called when a player is awarded an achievement
*/
class PlayerAchievementAwardedEvent extends PlayerEvent implements Cancellable{
public static $handlerList = null;
/** @var string */
protected $achievement;
/**
* @param Player $player
* @param string $achievementId
*/
public function __construct(Player $player, $achievementId){
$this->player = $player;
$this->achievement = $achievementId;
}
public function getAchievement(){
return $this->achievement;
}
}

View File

@ -0,0 +1,90 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* 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
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
namespace pocketmine\event\player;
use pocketmine\event\Cancellable;
use pocketmine\Player;
use pocketmine\Server;
/**
* Called when a player chats something
*/
class PlayerChatEvent extends PlayerEvent implements Cancellable{
public static $handlerList = null;
/** @var string */
protected $message;
/** @var string */
protected $format;
/**
* @var Player[]
*/
protected $recipients = array();
public function __construct(Player $player, $message, $format = "<%s> %s", array $recipients = null){
$this->player = $player;
$this->message = $message;
$this->format = $format;
if($recipients === null){
$this->recipients = Server::getInstance()->getPluginManager()->getPermissionSubscriptions(Player::BROADCAST_CHANNEL_USERS);
}else{
$this->recipients = $recipients;
}
}
public function getMessage(){
return $this->message;
}
public function setMessage($message){
$this->message = $message;
}
/**
* Changes the player that is sending the message
*
* @param Player $player
*/
public function setPlayer(Player $player){
if($player instanceof Player){
$this->player = $player;
}
}
public function getFormat(){
return $this->format;
}
public function setFormat($format){
$this->format = $format;
}
public function getRecipients(){
return $this->recipients;
}
public function setRecipients(array $recipients){
$this->recipients = $recipients;
}
}

View File

@ -0,0 +1,72 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* 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
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
namespace pocketmine\event\player;
use pocketmine\event\Cancellable;
use pocketmine\Player;
/**
* Called when a player runs a command or chats, early in the process
*
* You don't want to use this except for a few cases like logging commands,
* blocking commands on certain places, or applying modifiers.
*
* The message contains a slash at the start
*/
class PlayerCommandPreprocessEvent extends PlayerEvent implements Cancellable{
public static $handlerList = null;
/** @var string */
protected $message;
/**
* @param Player $player
* @param string $message
*/
public function __construct(Player $player, $message){
$this->player = $player;
$this->message = $message;
}
/**
* @return string
*/
public function getMessage(){
return $this->message;
}
/**
* @param string $message
*/
public function setMessage($message){
$this->message = $message;
}
/**
* @param Player $player
*/
public function setPlayer(Player $player){
$this->player = $player;
}
}

View File

@ -0,0 +1,36 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* 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
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
/**
* Player-only related events
*/
namespace pocketmine\event\player;
use pocketmine\event\Event;
abstract class PlayerEvent extends Event{
/** @var \pocketmine\Player */
protected $player;
public function getPlayer(){
return $this->player;
}
}

View File

@ -0,0 +1,45 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* 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
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
namespace pocketmine\event\player;
use pocketmine\event\Cancellable;
use pocketmine\Player;
/**
* Called when a player has its gamemode changed
*/
class PlayerGameModeChangeEvent extends PlayerEvent implements Cancellable{
public static $handlerList = null;
/** @var int */
protected $gamemode;
public function __construct(Player $player, $newGamemode){
$this->player = $player;
$this->gamemode = (int) $newGamemode;
}
public function getNewGamemode(){
return $this->gamemode;
}
}

View File

@ -0,0 +1,64 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* 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
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
namespace pocketmine\event\player;
use pocketmine\block\Block;
use pocketmine\event\Cancellable;
use pocketmine\item\Item;
use pocketmine\Player;
/**
* Called when a player interacts or touches a block (including air?)
*/
class PlayerInteractEvent extends PlayerEvent implements Cancellable{
public static $handlerList = null;
/**
* @var \pocketmine\block\Block;
*/
protected $blockTouched;
/** @var int */
protected $blockFace;
/** @var \pocketmine\item\Item */
protected $item;
public function __construct(Player $player, Item $item, Block $block, $face){
$this->blockTouched = $block;
$this->player = $player;
$this->item = $item;
$this->blockFace = (int) $face;
}
public function getItem(){
return $this->item;
}
public function getBlock(){
return $this->blockTouched;
}
public function getFace(){
return $this->blockFace;
}
}

View File

@ -0,0 +1,55 @@
<?php
/**
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* 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
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
namespace pocketmine\event\player;
use pocketmine\event\Cancellable;
use pocketmine\Event;
use pocketmine\item\Item;
use pocketmine\Player;
class PlayerItemHeldEvent extends PlayerEvent implements Cancellable{
public static $handlerList = null;
private $item;
private $slot;
private $inventorySlot;
public function __construct(Player $player, Item $item, $inventorySlot, $slot){
$this->player = $player;
$this->item = $item;
$this->inventorySlot = (int) $inventorySlot;
$this->slot = (int) $slot;
}
public function getSlot(){
return $this->slot;
}
public function getInventorySlot(){
return $this->inventorySlot;
}
public function getItem(){
return $this->item;
}
}

View File

@ -0,0 +1,54 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* 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
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
namespace pocketmine\event\player;
use pocketmine\Player;
/**
* Called when a player joins the server, after sending all the spawn packets
*/
class PlayerJoinEvent extends PlayerEvent{
public static $handlerList = null;
/** @var string */
protected $joinMessage;
public function __construct(Player $player, $joinMessage){
$this->player = $player;
$this->joinMessage = $joinMessage;
}
/**
* Sets the join message. This won't work on Minecraft: PE <= 0.8.1, since the join message is client-side
* We'll see if Mojang adds this in Minecraft: PE 0.9.0 ^.^
*
* @param string $joinMessage
*/
public function setJoinMessage($joinMessage){
$this->joinMessage = $joinMessage;
}
public function getJoinMessage(){
return $this->joinMessage;
}
}

View File

@ -0,0 +1,57 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* 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
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
namespace pocketmine\event\player;
use pocketmine\event\Cancellable;
use pocketmine\Player;
/**
* Called when a player leaves the server
*/
class PlayerKickEvent extends PlayerEvent implements Cancellable{
public static $handlerList = null;
/** @var string */
protected $quitMessage;
/** @var string */
protected $reason;
public function __construct(Player $player, $reason, $quitMessage){
$this->player = $player;
$this->quitMessage = $quitMessage;
$this->reason = $reason;
}
public function getReason(){
return $this->reason;
}
public function setQuitMessage($quitMessage){
$this->quitMessage = $quitMessage;
}
public function getQuitMessage(){
return $this->quitMessage;
}
}

View File

@ -0,0 +1,49 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* 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
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
namespace pocketmine\event\player;
use pocketmine\event\Cancellable;
use pocketmine\Player;
/**
* Called when a player joins, after things have been correctly set up (you can change anything now)
*/
class PlayerLoginEvent extends PlayerEvent implements Cancellable{
public static $handlerList = null;
/** @var string */
protected $kickMessage;
public function __construct(Player $player, $kickMessage){
$this->player = $player;
$this->kickMessage = $kickMessage;
}
public function setKickMessage($kickMessage){
$this->kickMessage = $kickMessage;
}
public function getKickMessage(){
return $this->kickMessage;
}
}

View File

@ -0,0 +1,49 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* 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
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
namespace pocketmine\event\player;
use pocketmine\event\Cancellable;
use pocketmine\Player;
/**
* Called when the player logs in, before things have been set up
*/
class PlayerPreLoginEvent extends PlayerEvent implements Cancellable{
public static $handlerList = null;
/** @var string */
protected $kickMessage;
public function __construct(Player $player, $kickMessage){
$this->player = $player;
$this->kickMessage = $kickMessage;
}
public function setKickMessage($kickMessage){
$this->kickMessage = $kickMessage;
}
public function getKickMessage(){
return $this->kickMessage;
}
}

View File

@ -0,0 +1,48 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* 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
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
namespace pocketmine\event\player;
use pocketmine\Player;
/**
* Called when a player leaves the server
*/
class PlayerQuitEvent extends PlayerEvent{
public static $handlerList = null;
/** @var string */
protected $quitMessage;
public function __construct(Player $player, $quitMessage){
$this->player = $player;
$this->quitMessage = $quitMessage;
}
public function setQuitMessage($quitMessage){
$this->quitMessage = $quitMessage;
}
public function getQuitMessage(){
return $this->quitMessage;
}
}

View File

@ -0,0 +1,58 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* 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
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
namespace pocketmine\event\player;
use pocketmine\level\Position;
use pocketmine\Player;
/**
* Called when a player is respawned (or first time spawned)
*/
class PlayerRespawnEvent extends PlayerEvent{
public static $handlerList = null;
/** @var Position */
protected $position;
/**
* @param Player $player
* @param Position $position
*/
public function __construct(Player $player, Position $position){
$this->player = $player;
$this->position = $position;
}
/**
* @return Position
*/
public function getRespawnPosition(){
return $this->position;
}
/**
* @param Position $position
*/
public function setRespawnPosition(Position $position){
$this->position = $position;
}
}