MiningLevelSystem

MiningLevelSystem 1.0.0

deceitya

Member
7月 20, 2019
18
10
3
deceityaの新しいコンテンツ:

MiningLevelSystem - 採掘レベルシステム

採掘レベル要素を追加します。
/milevel status [名前] でステータスが見れます。[名前]の欄に何も入力しなかった場合はプレイヤー自身のステータスが表示されます。
また、レベルに比例して次のレベルへの必要な経験値が増えます。

APIも用意していますので、外部からの情報取得も可能となっています。
PHP:
// use文
use Deceitya\MiningLevel\MiningLevelAPI;

// $playerにはPlayerオブジェクトまたはプレイヤー名を入れてください。
// レベルを取得
MiningLevelAPI::getInstance()->getLevel($player);

// 経験値を取得
MiningLevelAPI::getInstance()->getExp($player);

//レベルアップに必要な経験値を取得
MiningLevelAPI::getInstance()->getLevelUpExp($player);
このコンテンツの詳細を読む...
 

deceitya

Member
7月 20, 2019
18
10
3
改造は構いませんが改造後のコードは必ずGitHubのリポジトリ等で公開しなければなりません。
 

yuiful

Member
12 月 1, 2019
75
16
8
MIningLevelUpEventでgetLevel()でレベルを取得したときにレベルアップした前のレベルを取得するときがあるバグ?を直して欲しいです
 

deceitya

Member
7月 20, 2019
18
10
3
MIningLevelUpEventでgetLevel()でレベルを取得したときにレベルアップした前のレベルを取得するときがあるバグ?を直して欲しいです
(MiningLevelUpEvent)->getTo()でレベルアップ後のレベルを取得できますのでそちらを使ってください。
仕様書いてなくてすみません。
 

yuiful

Member
12 月 1, 2019
75
16
8
新規のプレイヤーが参加した場合にエラーが起こる模様です

[Server thread/CRITICAL]: ErrorException: "Trying to access array offset on value of type bool" (EXCEPTION) in "plugins/MiningLevelSystem/src/Deceitya/MiningLevel/Database/SQLiteDatabase" at line 58
[20:00:08] [Server thread/CRITICAL]: #0 plugins/MiningLevelSystem/src/Deceitya/MiningLevel/Database/SQLiteDatabase(58): pocketmine\utils\Utils::errorExceptionHandler(integer 8, string[51] Trying to access array offset on value of type bool, string[175] C:\Users\yuiful\vmlogs\OneDrive\..................\Minecraft Server\Minecraft Pock, integer 58, array[3])
[20:00:08] [Server thread/CRITICAL]: #1 plugins/MiningLevelSystem/src/Deceitya/MiningLevel/MiningLevelAPI(71): Deceitya\MiningLevel\Database\SQLiteDatabase->getLevel(string[10] yuiful7772)
[20:00:08] [Server thread/CRITICAL]: #2 plugins/MiningLevelSystem/src/Deceitya/MiningLevel/MiningLevelAPI(60): Deceitya\MiningLevel\MiningLevelAPI->getLevel(string[10] yuiful7772)
[20:00:08] [Server thread/CRITICAL]: #3 plugins/MiningLevelSystem/src/Deceitya/MiningLevel/Event/EventListener(28): Deceitya\MiningLevel\MiningLevelAPI->playerDataExists(object pocketmine\Player)
[20:00:08] [Server thread/CRITICAL]: #4 pmsrc/src/pocketmine/plugin/MethodEventExecutor(42): Deceitya\MiningLevel\Event\EventListener->onPlayerJoin(object pocketmine\event\player\PlayerJoinEvent)
[20:00:08] [Server thread/CRITICAL]: #5 pmsrc/src/pocketmine/plugin/RegisteredListener(80): pocketmine\plugin\MethodEventExecutor->execute(object Deceitya\MiningLevel\Event\EventListener, object pocketmine\event\player\PlayerJoinEvent)
[20:00:08] [Server thread/CRITICAL]: #6 pmsrc/src/pocketmine/event/Event(88): pocketmine\plugin\RegisteredListener->callEvent(object pocketmine\event\player\PlayerJoinEvent)
[20:00:08] [Server thread/CRITICAL]: #7 pmsrc/src/pocketmine/Player(1098): pocketmine\event\Event->call()
[20:00:08] [Server thread/CRITICAL]: #8 pmsrc/src/pocketmine/network/mcpe/PlayerNetworkSessionAdapter(310): pocketmine\Player->doFirstSpawn()
[20:00:08] [Server thread/CRITICAL]: #9 pmsrc/src/pocketmine/network/mcpe/protocol/SetLocalPlayerAsInitializedPacket(45): pocketmine\network\mcpe\PlayerNetworkSessionAdapter->handleSetLocalPlayerAsInitialized(object pocketmine\network\mcpe\protocol\SetLocalPlayerAsInitializedPacket)
[20:00:08] [Server thread/CRITICAL]: #10 pmsrc/src/pocketmine/network/mcpe/PlayerNetworkSessionAdapter(109): pocketmine\network\mcpe\protocol\SetLocalPlayerAsInitializedPacket->handle(object pocketmine\network\mcpe\PlayerNetworkSessionAdapter)
[20:00:08] [Server thread/CRITICAL]: #11 pmsrc/src/pocketmine/network/mcpe/protocol/BatchPacket(130): pocketmine\network\mcpe\PlayerNetworkSessionAdapter->handleDataPacket(object pocketmine\network\mcpe\protocol\SetLocalPlayerAsInitializedPacket)
[20:00:08] [Server thread/CRITICAL]: #12 pmsrc/src/pocketmine/network/mcpe/PlayerNetworkSessionAdapter(109): pocketmine\network\mcpe\protocol\BatchPacket->handle(object pocketmine\network\mcpe\PlayerNetworkSessionAdapter)
[20:00:08] [Server thread/CRITICAL]: #13 pmsrc/src/pocketmine/Player(3311): pocketmine\network\mcpe\PlayerNetworkSessionAdapter->handleDataPacket(object pocketmine\network\mcpe\protocol\BatchPacket)
[20:00:08] [Server thread/CRITICAL]: #14 pmsrc/src/pocketmine/network/mcpe/RakLibInterface(169): pocketmine\Player->handleDataPacket(object pocketmine\network\mcpe\protocol\BatchPacket)
[20:00:08] [Server thread/CRITICAL]: #15 pmsrc/vendor/pocketmine/raklib/src/server/ServerHandler(95): pocketmine\network\mcpe\RakLibInterface->handleEncapsulated(string[18] 192.168.1.33 62027, object raklib\protocol\EncapsulatedPacket, integer 0)
[20:00:08] [Server thread/CRITICAL]: #16 pmsrc/src/pocketmine/network/mcpe/RakLibInterface(109): raklib\server\ServerHandler->handlePacket()
[20:00:08] [Server thread/CRITICAL]: #17 pmsrc/src/pocketmine/network/mcpe/RakLibInterface(99): pocketmine\network\mcpe\RakLibInterface->process()
[20:00:08] [Server thread/CRITICAL]: #18 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(113): pocketmine\network\mcpe\RakLibInterface->pocketmine\network\mcpe\{closure}()
[20:00:08] [Server thread/CRITICAL]: #19 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(75): pocketmine\snooze\SleeperHandler->processNotifications()
[20:00:08] [Server thread/CRITICAL]: #20 pmsrc/src/pocketmine/Server(2155): pocketmine\snooze\SleeperHandler->sleepUntil(double 1621944008.2065)
[20:00:08] [Server thread/CRITICAL]: #21 pmsrc/src/pocketmine/Server(1992): pocketmine\Server->tickProcessor()
[20:00:08] [Server thread/CRITICAL]: #22 pmsrc/src/pocketmine/Server(1586): pocketmine\Server->start()
[20:00:08] [Server thread/CRITICAL]: #23 pmsrc/src/pocketmine/PocketMine(291): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[97] C:\Users\yuiful\vmlogs\OneDrive\..................\Minecraft Server\Minecraft Pock, string[105] C:\Users\yuiful\vmlogs\OneDrive\..................\Minecraft Server\Minecraft Pock)
[20:00:08] [Server thread/CRITICAL]: #24 pmsrc/src/pocketmine/PocketMine(321): pocketmine\server()
[20:00:08] [Server thread/CRITICAL]: #25 pmsrc(11): require(string[152] phar://C:/Users/yuiful/vmlogs/OneDrive/................../Minecraft Server/Minecra)


databaseのgetLevel()で存在しない配列の値を指定しているためのエラーみたいです