Skip to content

Commit

Permalink
'upload'
Browse files Browse the repository at this point in the history
  • Loading branch information
Frago9876543210 committed Jul 13, 2017
1 parent 601a099 commit dab180f
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plugin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name: ChunkLightUpdate
main: ChunkLightUpdate\Main
api: [3.0.0, 3.0.1, 3.0.0-ALPHA5, 3.0.0-ALPHA6]
version: 1.0.0
23 changes: 23 additions & 0 deletions src/ChunkLightUpdate/Main.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

namespace ChunkLightUpdate;

use pocketmine\event\level\ChunkLoadEvent;
use pocketmine\event\Listener;
use pocketmine\level\generator\LightPopulationTask;
use pocketmine\plugin\PluginBase;

class Main extends PluginBase implements Listener
{

public function onEnable()
{
$this->getServer()->getPluginManager()->registerEvents($this, $this);
}

public function updateLight(ChunkLoadEvent $event)
{
$this->getServer()->getScheduler()->scheduleAsyncTask(new LightPopulationTask($event->getLevel(), $event->getChunk()));
}

}

0 comments on commit dab180f

Please sign in to comment.