Closed GabBiswajit closed 7 months ago
@DavyCraft648
This crash is because the deprecated features in PM5 have been removed in PM6, so this is normal
to fix it, you can use php native enums (remove ()
in that code)
DyeColor::ORANGE
ToolTier::WOOD
@DavyCraft648 what about this :??
Error: Cannot make non static method pocketmine\entity\Entity::getNetworkTypeId() static in class muqsit\pmarmorstand\entity\ArmorStandEntity
File: plugins/PMArmorStand-master/src/muqsit/pmarmorstand/entity/ArmorStandEntity
Line: 40
Type: E_COMPILE_ERROR
Backtrace:
Code:
[31] use pocketmine\network\mcpe\protocol\types\inventory\ItemStackWrapper;
[32] use pocketmine\player\Player;
[33]
[34] class ArmorStandEntity extends Living{
[35]
[36] private const TAG_ARMOR_INVENTORY = "ArmorInventory";
[37] private const TAG_HELD_ITEM = "HeldItem";
[38] private const TAG_POSE = "Pose";
[39]
[40] public static function getNetworkTypeId() : string{
[41] return EntityIds::ARMOR_STAND;
[42] }
[43]
[44] protected int $maxDeadTicks = 0;
[45]
[46] private ArmorStandPose $pose;
[47] protected Item $item_in_hand;
[48] protected bool $can_be_moved_by_currents = true;
[49]
[50] /** @var ArmorStandEntityTicker[] */
There is any Changelogs .?
Error: Cannot make non static method pocketmine\entity\Entity::getNetworkTypeId() static in class muqsit\pmarmorstand\entity\ArmorStandEntity
like what the error says, you have to make getNetworkTypeId() method non static
public function getNetworkTypeId() : string{
return EntityIds::ARMOR_STAND;
}
I did it but I want to know what is new in this fork like new Coammnds and functions?
There is any Changelogs .?
there isn't really an officially written changelog for the version. all you can do is look for it from the commit history
Ohk but i like this fork thanks for this fork I hope you update this in future also ♥️
Ahh @DavyCraft648 one more question What should I do now ?? Code : $resource = $plugin->getResource($file);
Error :
Error: Call to undefined method JaxkDev\DiscordAccount\Main::getResource()
File: plugins/FrostDiscord/src/libs/poggit/libasynql/libasynql
Line: 149
Type: Error
Backtrace:
#0 plugins/FrostDiscord/src/Main(51): JaxkDev\DiscordAccount\libs\poggit\libasynql\libasynql::create(object JaxkDev\DiscordAccount\Main#59206, array[4], array[2])
#1 pmsrc/src/plugin/PluginBase(122): JaxkDev\DiscordAccount\Main->onEnable()
#2 pmsrc/src/plugin/PluginManager(454): pocketmine\plugin\PluginBase->onEnableStateChange(true)
#3 pmsrc/src/Server(1450): pocketmine\plugin\PluginManager->enablePlugin(object JaxkDev\DiscordAccount\Main#59206)
#4 pmsrc/src/Server(1081): pocketmine\Server->enablePlugins(object pocketmine\plugin\PluginEnableOrder#45616)
#5 pmsrc/src/PocketMine(350): pocketmine\Server->__construct(object pocketmine\thread\ThreadSafeClassLoader#5, object pocketmine\utils\MainLogger#4, string[16] /home/container/, string[24] /home/container/plugins/)
#6 pmsrc/src/PocketMine(373): pocketmine\server()
#7 pmsrc(11): require(string[60] phar:///home/container/PocketMine-MP.phar/src/PocketMine.php)
You can read the description in this commit 97700636c6692f65afd2f4f91e3bede7fe7ed45b
Can you give me libasynql which work with this fork ??
$resource = $plugin->getResourcePath("RankSystem/database/RankSystem.db");
if($resource===null){
throw new InvalidArgumentException("resources/$file does not exist");
}
$connector->loadQueryFile($resource);
}
Like this ?? It's also not work
um.. no...
depending on the code, you can use fopen() or file_get_contents()
Can you explain?? Like this : $plugin->file_get_contents($file);
$path = $plugin->getResourcePath($file);
if(!file_exist($path)){
throw new InvalidArgumentException("resources/$file does not exist");
}
$resource = fopen($path);
$connector->loadQueryFile($resource);
fclose($resource);
check this code
file_exist() method is unfined 😐
And also this not work ☠️
Thread: Main
Error: fopen() expects at least 2 arguments, 1 given
File: plugins/FrostVaults/src/muqsit/playervaults/libs/poggit/libasynql/libasynql
you just need to fix it without waiting for a spoonfed
☠️ i don't understand what is happening my pc is also dead if you have the libasynql which compatible with this fork than please provide me.
Sorry for distributing @DavyCraft648 maybe this is the last issue with my plugin help me to slove it.
try $resource = fopen($path, "rb");
Bro ☠️
Thread: Main
Error: fclose(): supplied resource is not a valid stream resource
File: plugins/FrostDiscord/src/libs/poggit/libasynql/libasynql
Line: 152
Type: TypeError
You don't use libasynql in your server ??
you can remove fclose() in that code because libasynql already closes it here
You don't use libasynql in your server ??
From the start, we didn't discuss how to fix libasynql, but how to use getResourcePath() in a plugin
so I'm just giving you an example of how to use it
Ahhh
Thread: Main
Error: Class "pocketmine\item\enchantment\ItemFlags" not found
File: plugins/PiggyCustomEnchants-PM5/src/DaPigGuy/PiggyCustomEnchants/enchants/CustomEnchant
Line: 74
Type: Error
Why ItemFlags is removed @DavyCraft648 ?
Why ItemFlags is removed
because it's useless. We already have a better enchantment tags system you should be able to safely delete that code, I think
Code : parent::__construct($this->name, $this->rarity, ItemFlags::ALL, ItemFlags::ALL, $this->maxLevel);
I removed the ItemFlags::ALL??
I removed the ItemFlags::ALL
yes
Almost done last issue:
Thread: Main
Error: Declaration of diamondgold\DummyItemsBlocks\tile\DummyTile::addAdditionalSpawnData(pocketmine\nbt\tag\CompoundTag $nbt): void must be compatible with pocketmine\block\tile\Spawnable::addAdditionalSpawnData(pocketmine\nbt\tag\CompoundTag $nbt, pocketmine\network\mcpe\convert\TypeConverter $typeConverter): void
File: plugins/FrostFakeItems/src/diamondgold/DummyItemsBlocks/tile/DummyTile
Line: 14
Type: E_COMPILE_ERROR
Backtrace:
@DavyCraft648
Frist error : THIS CRASH WAS CAUSED BY A PLUGIN
Thread: Main Error: Call to undefined method pocketmine\block\utils\DyeColor::ORANGE() File: plugins/MultiWorld (1).phar/src/czechpmdevs/multiworld/libs/muqsit/vanillagenerator/generator/ground/MesaGroundGenerator Line: 43
Second: Thread: Main Error: Call to undefined method pocketmine\item\ToolTier::WOOD() File: plugins/BuilderTools (1).phar/src/czechpmdevs/buildertools/BuilderTools Line: 239