This repository has been archived by the owner on Dec 30, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
38 changed files
with
1,850 additions
and
1,831 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,64 @@ | ||
name: lmao | ||
main: NgLam2911\lmao\Lmao | ||
api: 4.0.0 | ||
version: 0.1.0 | ||
authors: | ||
- NgLamVN | ||
description: An Ultimate Troll plugin for PocketMine-MP | ||
|
||
virions: | ||
- Commando | ||
|
||
permissions: | ||
lmao: | ||
default: op | ||
lmao.burn: | ||
default: op | ||
lmao.fakeop: | ||
default: op | ||
lmao.launch: | ||
default: op | ||
lmao.alone: | ||
default: op | ||
lmao.bolt: | ||
default: op | ||
lmao.boom: | ||
default: op | ||
lmao.crash: | ||
default: op | ||
lmao.fakedeop: | ||
default: op | ||
lmao.shuffle: | ||
default: op | ||
lmao.push: | ||
default: op | ||
lmao.dropinv: | ||
default: op | ||
lmao.chat: | ||
default: op | ||
lmao.fakeban: | ||
default: op | ||
lmao.flip: | ||
default: op | ||
lmao.spin: | ||
default: op | ||
lmao.spam: | ||
default: op | ||
lmao.swap: | ||
default: op | ||
lmao.creeper: | ||
default: op | ||
lmao.nomine: | ||
default: op | ||
lmao.noplace: | ||
default: op | ||
lmao.nopick: | ||
default: op | ||
lmao.rickroll: | ||
default: op | ||
lmao.pumpkinhead: | ||
default: op | ||
lmao.starve: | ||
default: op | ||
lmao.infinitedeath: | ||
name: lmao | ||
main: NgLam2911\lmao\Lmao | ||
api: 5.0.0 | ||
version: 0.2.0 | ||
authors: | ||
- NgLamVN | ||
description: An Ultimate Troll plugin for PocketMine-MP | ||
|
||
virions: | ||
- Commando | ||
|
||
permissions: | ||
lmao: | ||
default: op | ||
lmao.burn: | ||
default: op | ||
lmao.fakeop: | ||
default: op | ||
lmao.launch: | ||
default: op | ||
lmao.alone: | ||
default: op | ||
lmao.bolt: | ||
default: op | ||
lmao.boom: | ||
default: op | ||
lmao.crash: | ||
default: op | ||
lmao.fakedeop: | ||
default: op | ||
lmao.shuffle: | ||
default: op | ||
lmao.push: | ||
default: op | ||
lmao.dropinv: | ||
default: op | ||
lmao.chat: | ||
default: op | ||
lmao.fakeban: | ||
default: op | ||
lmao.flip: | ||
default: op | ||
lmao.spin: | ||
default: op | ||
lmao.spam: | ||
default: op | ||
lmao.swap: | ||
default: op | ||
lmao.creeper: | ||
default: op | ||
lmao.nomine: | ||
default: op | ||
lmao.noplace: | ||
default: op | ||
lmao.nopick: | ||
default: op | ||
lmao.rickroll: | ||
default: op | ||
lmao.pumpkinhead: | ||
default: op | ||
lmao.starve: | ||
default: op | ||
lmao.infinitedeath: | ||
default: op |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,103 +1,105 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
namespace NgLam2911\lmao; | ||
|
||
use NgLam2911\lmao\session\Session; | ||
use pocketmine\event\block\BlockBreakEvent; | ||
use pocketmine\event\block\BlockPlaceEvent; | ||
use pocketmine\event\entity\EntityItemPickupEvent; | ||
use pocketmine\event\Listener; | ||
use pocketmine\event\player\PlayerJoinEvent; | ||
use pocketmine\event\player\PlayerQuitEvent; | ||
use pocketmine\event\player\PlayerRespawnEvent; | ||
use pocketmine\player\Player; | ||
use pocketmine\scheduler\ClosureTask; | ||
|
||
class EventListener implements Listener{ | ||
|
||
/** | ||
* @param PlayerJoinEvent $event | ||
* @priority HIGHEST | ||
*/ | ||
public function onJoin(PlayerJoinEvent $event) : void{ | ||
$player = $event->getPlayer(); | ||
Lmao::getInstance()->getSessionManager()->registerSession(new Session($player)); | ||
} | ||
|
||
/** | ||
* @param PlayerQuitEvent $event | ||
* @priority HIGHEST | ||
*/ | ||
public function onQuit(PlayerQuitEvent $event) : void{ | ||
$player = $event->getPlayer(); | ||
Lmao::getInstance()->getSessionManager()->removeSession(new Session($player)); | ||
} | ||
|
||
/** | ||
* @param BlockBreakEvent $event | ||
* @priority LOW | ||
* @handleCancelled FALSE | ||
*/ | ||
public function onBreak(BlockBreakEvent $event) : void{ | ||
$player = $event->getPlayer(); | ||
$session = Lmao::getInstance()->getSessionManager()->getSession($player); | ||
if (is_null($session)){ | ||
return; | ||
} | ||
if ($session->isNoMine()){ | ||
$event->cancel(); | ||
} | ||
} | ||
|
||
/** | ||
* @param BlockPlaceEvent $event | ||
* @priority LOW | ||
* @handleCancelled FALSE | ||
*/ | ||
public function onPlace(BlockPlaceEvent $event){ | ||
$player = $event->getPlayer(); | ||
$session = Lmao::getInstance()->getSessionManager()->getSession($player); | ||
if (is_null($session)){ | ||
return; | ||
} | ||
if ($session->isNoPlace()){ | ||
$event->cancel(); | ||
} | ||
} | ||
|
||
/** | ||
* @param EntityItemPickupEvent $event | ||
* @priority LOW | ||
* @handleCancelled FALSE | ||
*/ | ||
public function onPickup(EntityItemPickupEvent $event){ | ||
$entity = $event->getEntity(); | ||
if (!$entity instanceof Player){ | ||
return; | ||
} | ||
$session = Lmao::getInstance()->getSessionManager()->getSession($entity); | ||
if (is_null($session)){ | ||
return; | ||
} | ||
if ($session->isNoPick()){ | ||
$event->cancel(); | ||
} | ||
} | ||
|
||
/** | ||
* @param PlayerRespawnEvent $event | ||
* @priority LOW | ||
*/ | ||
public function onRespawn(PlayerRespawnEvent $event){ | ||
$session = Lmao::getInstance()->getSessionManager()->getSession($event->getPlayer()); | ||
if (is_null($session)){ | ||
return; | ||
} | ||
if ($session->isInfiniteDeath()){ | ||
Lmao::getInstance()->getScheduler()->scheduleDelayedTask(new ClosureTask(function() use ($session) : void { | ||
$session->getPlayer()->kill(); | ||
}), 3); | ||
} | ||
} | ||
<?php | ||
declare(strict_types=1); | ||
|
||
namespace NgLam2911\lmao; | ||
|
||
use NgLam2911\lmao\session\Session; | ||
use pocketmine\block\tile\Chest as ChestTile; | ||
use pocketmine\event\block\BlockBreakEvent; | ||
use pocketmine\event\block\BlockPlaceEvent; | ||
use pocketmine\event\entity\EntityItemPickupEvent; | ||
use pocketmine\event\Listener; | ||
use pocketmine\event\player\PlayerInteractEvent; | ||
use pocketmine\event\player\PlayerJoinEvent; | ||
use pocketmine\event\player\PlayerQuitEvent; | ||
use pocketmine\event\player\PlayerRespawnEvent; | ||
use pocketmine\player\Player; | ||
use pocketmine\scheduler\ClosureTask; | ||
|
||
class EventListener implements Listener{ | ||
|
||
/** | ||
* @param PlayerJoinEvent $event | ||
* @priority HIGHEST | ||
*/ | ||
public function onJoin(PlayerJoinEvent $event) : void{ | ||
$player = $event->getPlayer(); | ||
Lmao::getInstance()->getSessionManager()->registerSession(new Session($player)); | ||
} | ||
|
||
/** | ||
* @param PlayerQuitEvent $event | ||
* @priority HIGHEST | ||
*/ | ||
public function onQuit(PlayerQuitEvent $event) : void{ | ||
$player = $event->getPlayer(); | ||
Lmao::getInstance()->getSessionManager()->removeSession(new Session($player)); | ||
} | ||
|
||
/** | ||
* @param BlockBreakEvent $event | ||
* @priority LOW | ||
* @handleCancelled FALSE | ||
*/ | ||
public function onBreak(BlockBreakEvent $event) : void{ | ||
$player = $event->getPlayer(); | ||
$session = Lmao::getInstance()->getSessionManager()->getSession($player); | ||
if (is_null($session)){ | ||
return; | ||
} | ||
if ($session->isNoMine()){ | ||
$event->cancel(); | ||
} | ||
} | ||
|
||
/** | ||
* @param BlockPlaceEvent $event | ||
* @priority LOW | ||
* @handleCancelled FALSE | ||
*/ | ||
public function onPlace(BlockPlaceEvent $event) : void{ | ||
$player = $event->getPlayer(); | ||
$session = Lmao::getInstance()->getSessionManager()->getSession($player); | ||
if (is_null($session)){ | ||
return; | ||
} | ||
if ($session->isNoPlace()){ | ||
$event->cancel(); | ||
} | ||
} | ||
|
||
/** | ||
* @param EntityItemPickupEvent $event | ||
* @priority LOW | ||
* @handleCancelled FALSE | ||
*/ | ||
public function onPickup(EntityItemPickupEvent $event) : void{ | ||
$entity = $event->getEntity(); | ||
if (!$entity instanceof Player){ | ||
return; | ||
} | ||
$session = Lmao::getInstance()->getSessionManager()->getSession($entity); | ||
if (is_null($session)){ | ||
return; | ||
} | ||
if ($session->isNoPick()){ | ||
$event->cancel(); | ||
} | ||
} | ||
|
||
/** | ||
* @param PlayerRespawnEvent $event | ||
* @priority LOW | ||
*/ | ||
public function onRespawn(PlayerRespawnEvent $event) : void{ | ||
$session = Lmao::getInstance()->getSessionManager()->getSession($event->getPlayer()); | ||
if (is_null($session)){ | ||
return; | ||
} | ||
if ($session->isInfiniteDeath()){ | ||
Lmao::getInstance()->getScheduler()->scheduleDelayedTask(new ClosureTask(function() use ($session) : void { | ||
$session->getPlayer()->kill(); | ||
}), 3); | ||
} | ||
} | ||
} |
Oops, something went wrong.