Created
March 21, 2016 07:59
-
-
Save tomocrafter/2ca4eb4d92d740a5d8eb to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<?php | |
public function onPacketSend(DataPacketSendEvent $e){ | |
$pk = $e->getPacket(); | |
$p = $e->getPlayer(); | |
if($pk->pid() == 0xbf){ | |
list($minX, $minZ, $maxX, $maxZ) = [0, 100, 0, 100];//これだと、0から100chunkだけ読み込まれるようになる | |
if($pk->chunkX < $minX or $pk->chunkX > $maxX or $pk->chunkZ < $minZ or $pk->chunkZ > $maxZ){ | |
$e->setCancelled(true); | |
} | |
}elseif($pk->pid() == 0x95){ | |
$pk->generator = 0; | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
👍