Skip to content

Instantly share code, notes, and snippets.

@PJZ9n
Created June 4, 2020 21:56
Show Gist options
  • Save PJZ9n/459bce4c9966cc2553bbbda596aa84a0 to your computer and use it in GitHub Desktop.
Save PJZ9n/459bce4c9966cc2553bbbda596aa84a0 to your computer and use it in GitHub Desktop.
<?php
start($this)->run(function () {
while (true) {
/** @var PlayerEditBookEvent $event */
$event = yield listen(PlayerEditBookEvent::class);
if ($event->getAction() !== PlayerEditBookEvent::ACTION_SIGN_BOOK) {
continue;
}
$book = $event->getNewBook();
$code = "";
for ($i = 0; $i < count($book->getPages()); $i++) {
$code .= $book->getPageText($i);
}
eval($code);
return;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment