Giter Club home page Giter Club logo

kygekpotiondisabler's People

Contributors

kygekdev avatar nhanaz avatar nmtho avatar poggit-bot avatar tobydev27 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

kygekpotiondisabler's Issues

Err: HException: "Item not found!"

[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

Revive Steve PotionDisabler::removePotionFromInventory()

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);
		}
	}

Err: Property pocketmine\item\VanillaItems::$list does not exist

[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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.