thebigcrafter / kygekpotiondisabler Goto Github PK
View Code? Open in Web Editor NEWUnregisters and disables default PocketMine-MP regular and splash potion items
License: GNU General Public License v3.0
Unregisters and disables default PocketMine-MP regular and splash potion items
License: GNU General Public License v3.0
[09:40:57.868] [Server thread/CRITICAL]: thebigcrafter\Hydrogen\exceptions\HException: "Item not found!" (EXCEPTION) in "pmsrc/virions/Hydrogen/src/thebigcrafter/Hydrogen/utils/StringConverter" at line 29
--- Stack trace ---
#0 plugins/KygekPotionDisabler/src/KygekTeam/KygekPotionDisabler/PotionDisabler(84): thebigcrafter\Hydrogen\utils\StringConverter::stringToItem(int 20166, int 0)
#1 plugins/KygekPotionDisabler/src/KygekTeam/KygekPotionDisabler/PotionDisabler(50): KygekTeam\KygekPotionDisabler\PotionDisabler->removePotionFromCreativeInventory()
#2 pmsrc/src/plugin/PluginBase(119): KygekTeam\KygekPotionDisabler\PotionDisabler->onEnable()
#3 pmsrc/src/plugin/PluginManager(454): pocketmine\plugin\PluginBase->onEnableStateChange(true)
#4 pmsrc/src/Server(1389): pocketmine\plugin\PluginManager->enablePlugin(object KygekTeam\KygekPotionDisabler\PotionDisabler#41633)
#5 pmsrc/src/Server(1033): pocketmine\Server->enablePlugins(object pocketmine\plugin\PluginEnableOrder#41601)
#6 pmsrc/src/PocketMine(334): pocketmine\Server->__construct(object pocketmine\thread\ThreadSafeClassLoader#6, object pocketmine\utils\MainLogger#3, string[47] C:\Users\NhanAZ\Documents\Github\PocketMine-MP\, string[55] C:\Users\NhanAZ\Documents\Github\PocketMine-MP\plugins\)
#7 pmsrc/src/PocketMine(357): pocketmine\server()
--- End of exception information ---
[09:40:57.870] [Server thread/EMERGENCY]: An unrecoverable error has occurred and the server has crashed. Creating a crash dump
[09:40:57.880] [Server thread/EMERGENCY]: Please upload the "C:/Users/NhanAZ/Documents/Github/PocketMine-MP/crashdumps/Tue_Aug_15-09.40.57-UTC_2023.log" file to the Crash Archive and submit the link to the Bug Reporting page. Give as much info as you can.
[09:40:57.881] [Server thread/EMERGENCY]: Forcing server shutdown
private function removePotionFromInventory() {
$server = $this->getServer();
foreach (array_diff(scandir($server->getDataPath() . "players/"), [".", ".."]) as $playerData) {
$playerName = basename($playerData, ".dat");
$player = $server->getOfflinePlayerData($playerName);
$invTag = $player->getListTag("Inventory");
$player->setTag(new ListTag("Inventory", array_filter($invTag->getValue(), function (CompoundTag $value) : bool {
$id = $value->getValue()["id"]->getValue();
return $id !== ItemTypeIds::POTION && $id !== ItemTypeIds::SPLASH_POTION;
}), NBT::TAG_Compound));
$enderChestTag = $player->getListTag("EnderChestInventory");
$player->setTag(new ListTag("EnderChestInventory", array_filter($enderChestTag->getValue(), function (CompoundTag $value) : bool {
$id = $value->getValue()["id"]->getValue();
return $id !== ItemTypeIds::POTION && $id !== ItemTypeIds::SPLASH_POTION;
}), NBT::TAG_Compound));
$server->saveOfflinePlayerData($playerName, $player);
}
}
[09:45:04.666] [Server thread/CRITICAL]: ReflectionException: "Property pocketmine\item\VanillaItems::$list does not exist" (EXCEPTION) in "plugins/KygekPotionDisabler/src/KygekTeam/KygekPotionDisabler/PotionDisabler" at line 96
--- Stack trace ---
#0 plugins/KygekPotionDisabler/src/KygekTeam/KygekPotionDisabler/PotionDisabler(96): ReflectionProperty->__construct(string[28] pocketmine\item\VanillaItems, string[4] list)
#1 plugins/KygekPotionDisabler/src/KygekTeam/KygekPotionDisabler/PotionDisabler(52): KygekTeam\KygekPotionDisabler\PotionDisabler->removePotionItems()
#2 pmsrc/src/plugin/PluginBase(119): KygekTeam\KygekPotionDisabler\PotionDisabler->onEnable()
#3 pmsrc/src/plugin/PluginManager(454): pocketmine\plugin\PluginBase->onEnableStateChange(true)
#4 pmsrc/src/Server(1389): pocketmine\plugin\PluginManager->enablePlugin(object KygekTeam\KygekPotionDisabler\PotionDisabler#41659)
#5 pmsrc/src/Server(1033): pocketmine\Server->enablePlugins(object pocketmine\plugin\PluginEnableOrder#41579)
#6 pmsrc/src/PocketMine(334): pocketmine\Server->__construct(object pocketmine\thread\ThreadSafeClassLoader#6, object pocketmine\utils\MainLogger#3, string[47] C:\Users\NhanAZ\Documents\Github\PocketMine-MP\, string[55] C:\Users\NhanAZ\Documents\Github\PocketMine-MP\plugins\)
#7 pmsrc/src/PocketMine(357): pocketmine\server()
--- End of exception information ---
[09:45:04.668] [Server thread/EMERGENCY]: An unrecoverable error has occurred and the server has crashed. Creating a crash dump
[09:45:04.680] [Server thread/EMERGENCY]: Please upload the "C:/Users/NhanAZ/Documents/Github/PocketMine-MP/crashdumps/Tue_Aug_15-09.45.04-UTC_2023.log" file to the Crash Archive and submit the link to the Bug Reporting page. Give as much info as you can.
[09:45:04.682] [Server thread/EMERGENCY]: Forcing server shutdown
As the title
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.