Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.0.0] OfflinePlayer::getFirstPlayed() does not work #3112

Closed
AndreasHGK opened this issue Sep 3, 2019 · 0 comments
Closed

[4.0.0] OfflinePlayer::getFirstPlayed() does not work #3112

AndreasHGK opened this issue Sep 3, 2019 · 0 comments
Labels
Category: Core Related to internal functionality Resolution: Fixed

Comments

@AndreasHGK
Copy link

AndreasHGK commented Sep 3, 2019

Issue description

  • Expected result: OfflinePlayer::getFirstPlayed() returns the first join date of the (offline) player
  • Actual result: OfflinePlayer::getFirstPlayed() throws an exception

Steps to reproduce the issue

  1. Call OfflinePlayer::getFirstPlayed() from any offline player.

OS and versions

  • PocketMine-MP: 4.0.0+dev (one of the latest commits in the master branch)
  • PHP: 7.3
  • Server OS: Windows 10
  • Game version: Windows 10

Plugins

Plugins (4): DevTools v1.14.0+dev, DEVirion v1.2.5-ALPHA12, Nightfall v1.0.0, FormAPI v1.3.0

  • If you remove all plugins, does the issue still occur? Yes (i didn't test this, but i'm 99.9% confident it does.

Crashdump, backtrace or other files

i use my own error catch thing in here so it looks a little different than it does normally

2019-09-03 [19:18:15.068] [Server thread/ERROR]: Expected a tag of type pocketmine\nbt\tag\IntTag, got pocketmine\nbt\tag\LongTag in file phar://C:/Users/Andreas/Desktop/prisons/PocketMine-MP.phar/vendor/pocketmine/nbt/src/tag/CompoundTag.php at line 100
#0 phar://C:/Users/Andreas/Desktop/prisons/PocketMine-MP.phar/vendor/pocketmine/nbt/src/tag/CompoundTag.php(187): pocketmine\nbt\tag\CompoundTag->getTag('firstPlayed', 'pocketmine\\nbt\\...')
#1 phar://C:/Users/Andreas/Desktop/prisons/PocketMine-MP.phar/vendor/pocketmine/nbt/src/tag/CompoundTag.php(233): pocketmine\nbt\tag\CompoundTag->getTagValue('firstPlayed', 'pocketmine\\nbt\\...', NULL, false)
#2 phar://C:/Users/Andreas/Desktop/prisons/PocketMine-MP.phar/src/player/OfflinePlayer.php(106): pocketmine\nbt\tag\CompoundTag->getInt('firstPlayed')
#3 C:\Users\Andreas\Desktop\prisons\plugins\Nightfall\src\AndreasHGK\Core\command\StatsCommand.php(51): pocketmine\player\OfflinePlayer->getFirstPlayed()
#4 C:\Users\Andreas\Desktop\prisons\plugins\Nightfall\src\AndreasHGK\Core\command\CommandBase.php(47): AndreasHGK\Core\command\StatsCommand->onCommand(Object(pocketmine\player\Player), Object(AndreasHGK\Core\command\CommandBase), 'stats', Array)
#5 phar://C:/Users/Andreas/Desktop/prisons/PocketMine-MP.phar/src/command/SimpleCommandMap.php(268): AndreasHGK\Core\command\CommandBase->execute(Object(pocketmine\player\Player), 'stats', Array)
#6 phar://C:/Users/Andreas/Desktop/prisons/PocketMine-MP.phar/src/Server.php(1540): pocketmine\command\SimpleCommandMap->dispatch(Object(pocketmine\player\Player), 'stats megadan20...')
#7 phar://C:/Users/Andreas/Desktop/prisons/PocketMine-MP.phar/src/player/Player.php(1487): pocketmine\Server->dispatchCommand(Object(pocketmine\player\Player), 'stats megadan20...')
#8 phar://C:/Users/Andreas/Desktop/prisons/PocketMine-MP.phar/src/network/mcpe/handler/InGamePacketHandler.php(594): pocketmine\player\Player->chat('/stats megadan2...')
#9 phar://C:/Users/Andreas/Desktop/prisons/PocketMine-MP.phar/src/network/mcpe/protocol/CommandRequestPacket.php(54): pocketmine\network\mcpe\handler\InGamePacketHandler->handleCommandRequest(Object(pocketmine\network\mcpe\protocol\CommandRequestPacket))
#10 phar://C:/Users/Andreas/Desktop/prisons/PocketMine-MP.phar/src/network/mcpe/NetworkSession.php(349): pocketmine\network\mcpe\protocol\CommandRequestPacket->handle(Object(pocketmine\network\mcpe\handler\InGamePacketHandler))
#11 phar://C:/Users/Andreas/Desktop/prisons/PocketMine-MP.phar/src/network/mcpe/NetworkSession.php(315): pocketmine\network\mcpe\NetworkSession->handleDataPacket(Object(pocketmine\network\mcpe\protocol\CommandRequestPacket))
#12 phar://C:/Users/Andreas/Desktop/prisons/PocketMine-MP.phar/src/network/mcpe/raklib/RakLibInterface.php(152): pocketmine\network\mcpe\NetworkSession->handleEncoded('x\xDA\xD3\xF2\x15\xD5/.I,)V\xC8MM...')
#13 phar://C:/Users/Andreas/Desktop/prisons/PocketMine-MP.phar/vendor/pocketmine/raklib/src/server/ServerHandler.php(102): pocketmine\network\mcpe\raklib\RakLibInterface->handleEncapsulated(0, Object(raklib\protocol\EncapsulatedPacket), 0)
#14 phar://C:/Users/Andreas/Desktop/prisons/PocketMine-MP.phar/src/network/mcpe/raklib/RakLibInterface.php(96): raklib\server\ServerHandler->handlePacket()
#15 phar://C:/Users/Andreas/Desktop/prisons/PocketMine-MP.phar/vendor/pocketmine/snooze/src/SleeperHandler.php(123): pocketmine\network\mcpe\raklib\RakLibInterface->pocketmine\network\mcpe\raklib\{closure}()
#16 phar://C:/Users/Andreas/Desktop/prisons/PocketMine-MP.phar/vendor/pocketmine/snooze/src/SleeperHandler.php(85): pocketmine\snooze\SleeperHandler->processNotifications()
#17 phar://C:/Users/Andreas/Desktop/prisons/PocketMine-MP.phar/src/Server.php(1765): pocketmine\snooze\SleeperHandler->sleepUntil(1567534695.0823)
#18 phar://C:/Users/Andreas/Desktop/prisons/PocketMine-MP.phar/src/Server.php(1308): pocketmine\Server->tickProcessor()
#19 phar://C:/Users/Andreas/Desktop/prisons/PocketMine-MP.phar/src/PocketMine.php(268): pocketmine\Server->__construct(Object(BaseClassLoader), Object(pocketmine\utils\MainLogger), 'C:\\Users\\Andrea...', 'C:\\Users\\Andrea...')
#20 phar://C:/Users/Andreas/Desktop/prisons/PocketMine-MP.phar/src/PocketMine.php(290): pocketmine\server()
#21 C:\Users\Andreas\Desktop\prisons\PocketMine-MP.phar(1): require('phar://C:/Users...')
#22 {main}
dktapps added a commit that referenced this issue Sep 4, 2019
@dktapps dktapps added Category: Core Related to internal functionality Resolution: Fixed labels Sep 4, 2019
@dktapps dktapps closed this as completed Sep 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Core Related to internal functionality Resolution: Fixed
Projects
None yet
Development

No branches or pull requests

2 participants