Git Product home page Git Product logo

shopkeepers's Introduction


Add Shopkeepers to your PocketMine-MP world! Allow the creation of simple barter stores between players or create adminshops!

Created with ❤️ by FoxWorn3365


Shopkeepers v1.3 for PocketMine-MP 5


Shopkeepers stats by pmmpStats


⚠️ We are not in any way related to the Shopkeepers plugin for Bukkit!

⚠️ This plugin collect some data for pmmpStats. Read more (and how to disable) here!

Follow me on Twitter to remain updated!

Introduction video

Watch the video on YouTube

📰 Features

  • Players can create their own Shopkeepers and manage it
  • Admin Shopkeepers
  • Vanilla trade page
  • Shopkeeper inventory for non-admin Shopkeepers
  • Hit prevention for shopkeepers
  • Easy configuration with in-game GUI
  • Double trade supported
  • Custom skin support
  • Plugin APIs


Please consider to


🖥️ Compatibility

Warning As of v1.2 we no longer support PocketMine-MP 4, this however does not mean that we will remove v1.0 for PMMP4, in fact it will always remain available here on GitHub at this branch!

🛠️ Configuration

The configuration of Shopkeepers allows you to customize some values to make it suitable for all servers.

Name Type Default Description
enabled bool true Is the plugin enabled?
max-entities-for-player int 3 Max shopkeeper's entities for one player (PER SHOP)
max-entities-bypass array [] Player that can bypass this limitation
banned-shop-names array [] List of banned names
banned-item-names array [] List of banned items (can't be sold)
banned-item-ids array [] List of banned item ids (can't be sold)
enable-remote-trade🛈 bool false Allow player to use the /sk trade command
enable-pmmpstats-datashare bool true Allow the server to share some data with pmmpStats
enable-version-checker bool true Allow the server to check the plugin version

⌨️ Commands

The base command is /shopkeepers but you can also use /sk, /skeepers and /shopk as aliases. Here a list of all commands that you can use:

Command Args Description
info none Show the plugin's informations
info SHOP NAME Show the shop configuration page
edit SHOP NAME Edit the shop recepies
create SHOP NAME / NULL Create a new shop, if the name is leaved empty will be generated
summon SHOP NAME Summon a Shopkeeper entity (as a Villager) for your Shop
rename SHOP NAME and NEW NAME [NOT AVAILABLE] Rename a current shop
list none Show all of your shops
history SHOP NAME and PAGE Show the trade history for the shopkeeper
trade SHOP AUTHOR NAME and SHOP NAME Remotely trade with a shopkeeper

🔸 pmmpStats implementation

This plugin makes use of pmmpStats to create and process plugin statistics, which then includes a continuous sending of the following information to the service servers:

  • Server IP and port
  • Server OS version
  • Server PHP version
  • Server cores
  • Server PocketMine-MP version
  • Server version (minecraft)
  • Online players
  • Server Xbox auth status

The Terms of Service of pmmpStats are available here, instead the privacy polici is at this link.
You can disable information sharing with pmmpStats by setting the enable-pmmpstats-datashare value to false, by default (so even if the value is not present) it is enabled.

Shopkeepers Skin System (SSS)

Yes, the v1.0 brought an epic function: now you can set a skin of a Shopkeeper.
Unfortunately players can't add a skin of a Shopkeeper for multiple reasons:

  • Memory
  • Memory
  • Memory
  • Hmm, Memory?

Anyways, to avoid abuse of this system we have made this feature usable only by the server administrator.

How to add a skin of a Shopkeeper

You should have seen something new in the Shopkeepers folder, the skins folder, and that is where all the skins should be put.

Warning
Skins MUST BE in a .png file!

The file name should be composed as follows: <PLAYER NAME>_<SHOP NAME>.png, for example FoxWorn3365_Fox.png is valid and will be used by the plugin.

I don't want to select skins

Well, if no skin is provided the classic villager is spawned. yeee

API Documentation

Shopkeepers from the v1.3 implements the APIs.

$api = FoxWorn3365\Shopkeepers\Core::$api;

Get the config manager of a player

$api->getConfigManager(Player $player) : FoxWorn3365\Shopkeepers\ConfigManager

Get the Shopkeeper config of a player

$api->getConfig(Player $player, string $shopName) : object|array|bool

Open the trade page to a player from the shopkeeper author and name

$api->openTradeInventoryForPlayer(Player $player, string $shopOwner, string $shopName) : void

Update a Shopkeeper config

$api->setConfig(Player $player, string $shopName, object $config) : void

Summon a Shopkeeper

$api->summonShopkeeper(Player $player, string $shopName) : void

F.A.Q.

How to create an Admin shop

There is not really an Admin shop but you can activate this function by using the command /sk info <SHOP NAME> and then clicking on the Blaze Powder and then clicking on the red wool block that has "Admin shop" as its name

How to see a Shopkeeper's inventory

There are two ways:

  • Use the command /sk info <SHOP NAME> and then click on the chest!
  • Click on the Shopkeeper (Villager) entity and then click on the chest!

I want to access to the Shopkeeper's trade page but if i click the entity i access the shopkeeper's info page!

Easy: shift and click on the Shopkeeper

How to despawn a Shopkeeper

More easy: just hit it, it will die in only one hit!

I have ClearLag and it removes the Shopkeepers entites!

Edit the config of ClearLag changing to false this option.

How can I change the skin of a Shopkeeper

We actually support a Skin System, please see here!

OMG I CAN'T ACCESS TO THE INVENTORYM uyigqwieduwefibef

If the Shopkeeper is an Admin Shop it does not have an inventory!

Maximum level of customization: program the plugin!

The v1.2 implements an incredible customization system: 🎉__programming!__🎉

So, from now you can handle some Shopkeeper event! but how?
Simple, you can code inside the config with the new parser YAMLPower!

Feel free to contact me with no problem for any questions, I'll respond within a day!

⚠️ Unsable (BETA) features.

Here will be listed every feature of the plugin who's not stable (so is in a BETA phase).
These features aren't active by default, you must edit the config to enable!

Remote trade

Remote trade is in a BETA phase because can use a lot of memory and CPU and can slow down the server. Enable the enable-remote-trade at your own risk!

Bug reporting

Reporting bugs to developers to the developer😢 is very important to ensure the stability of the plugin, so in order to better track and manage all reports it is incredibly necessary that they are reported via GitHub Issues.
Here is what to include in the reporting to make it perfect:

  1. The complete crash error

If it is not complete how do we know how it all happened?

  1. All files from the plugin_data/Shopkeepers folder

This way we can compare the error with those files to find a possible transcription error

  1. The plugin's version

It changes a lot from version to version, and this would help us a lot to understand where to look for

  1. (OPTIONAL) The plugin download source

Knowing where you downloaded the plugin from might help, always better to know some information

  1. (OPTIONAL) The Shopkeepers.phar

"Last wade", in case we can analyze the source

Contribution guide

Any contribution is greatly appreciated because you help me to lighten my workload, so here are some small guidelines to follow when you want to contribute:

  • Clear code

I don't want to see things like this:

class Fox {
    protected $fox;  // WHAT'S THE TYPE?????'?'Q'2'wqiadw sdfbuhwhwrf jhs

    function create($int, $bruh) { $bruh = 10-$int+$bruh; // AAAAAAAAAA. IT'S A PUBLIC, PRIVATE OR PROTECTED FUNCTION?!?!??!?
    return $bruh;                                       // AND WHAT'S THE RETURN TYPE???? AND WHY THE CODE IS IN THE FIRST LINE????????
    }
}
  • Update the "headers" of the file correctly

They allow new contributors to understand what the file is for without having them parse 250 lines, so update them with the true purpose of the file!

// CORRECT: 
/*
 * Shopkeepers for PocketMine-MP
 * Add custom shopkeepers to your PocketMine-MP server!
 * 
 * Copyright (C) 2023-now FoxWorn3365
 * Relased under GNU General Public License v3.0 (https://github.com/FoxWorn3365/Shopkeepers/blob/main/LICENSE)
 * You can find the license file in the root folder of the project inside the LICENSE file!
 * If not, see https://www.gnu.org/licenses/
 * 
 * Useful links:
 * - GitHub: https://github.com/FoxWorn3365/Shopkeepers
 * - Contribution guidelines: https://github.com/FoxWorn3365/Shopkeepers#contributing
 * - Author GitHub: https://github.com/FoxWorn3365
 * 
 * Current file: /EntityManager.php
 * Description: Load and save custom entities into and from a simple string
 */


 // WRONG:
 /*
 * Shopkeepers for PocketMine-MP
 * Add custom shopkeepers to your PocketMine-MP server!
 * 
 * Copyright (C) 2023-now FoxWorn3365
 * Relased under GNU General Public License v3.0 (https://github.com/FoxWorn3365/Shopkeepers/blob/main/LICENSE)
 * You can find the license file in the root folder of the project inside the LICENSE file!
 * If not, see https://www.gnu.org/licenses/
 * 
 * Useful links:
 * - GitHub: https://github.com/FoxWorn3365/Shopkeepers
 * - Contribution guidelines: https://github.com/FoxWorn3365/Shopkeepers#contributing
 * - Author GitHub: https://github.com/FoxWorn3365
 * 
 * Current file: /EntityManager.php
 * Description: Idk make entites ez
 */
  • utils is reserved for Static functions and final classes

All functions in utils must have all static methods and all static classes must be in that directory and namespace

  • Please DESCRIBE your changes in the pull request!

I want to understand it

Permissions

permissions:
  shopkeepers.base:
    description: "Allows users to use the base command"
    default: true
  shopkeepers.shop.summon:
    description: "Allows users to summon player's shop"
    default: true
  shopkeepers.shop.create:
    description: "Allow users to create a shop"
    default: true
  shopkeepers.shop.edit:
    description: "Allow users to edit they'r shop"
    default: true
  shopkeepers.shop.list:
    description: "Allow users to see a list of their shops"
    default: true
  shopkeepers.shop.remove:
    description: "Allow users to despawn they'r Villager shops"
    default: true
  shopkeepers.shop.rename:
    descritpion: "Allow users to rename they'r shops"
    default: true
  shopkeepers.shop.namevisible:
    description: "Allow users to decide if the shopkepeer's name should be visible or no"
    default: true
  shopkeepers.shop.history:
    description: "Allow users to view the trade history of his Shopkeepers"
    default: true
  shopkeepers.shop.enableDisable:
    description: "Allow users to enable and disable their own Shopkeepers from the menu"
    default: true
  shopkeepers.shop.admin:
    description: "Allows users to decide if the shopkeepers should be admin or none"
    default: op
  shopkeepers.shop.kill:
    description: "Allow users to kill every shopkeepers, also of other players"
    default: op
  shopkeepers.shop.defaultGUI:
    description: "Allow users to see and use the /sk command without args to open the base GUI"
    default: true
  shopkeepers.shop.use:
    description: "Allow users to use a shopkeeper when they touch it"
    default: true
  shopkeepers.shop.allowRemoteInventoryOpen:
    description: "Allow users to open a shopkeeper's inventory with the command /sk inventory"
    default: op
  shopkeepers.shop.allowRemoteTrade:
    description: "Allow users to remotely trade with a shopkeeper with the command /sk trade <author> <shop>"
    default: true

Developers: shop object

The plugin needs to save store data, and unlike other plugins, it uses .json files so they are more accessible to server owners, so here is the structure.
As a reminder, the plugin saves each player's data in separate files, so there will be a PlayerName.json for each player that creates a shop.
Now, let's see the object:

{
    "author":"<PlayerNAME>",
    "enabled":true,
    "admin":false,
    "title":"<ShopNAME>",
    "namevisible":false,
    "history":base64EncodedHistoryOfTransactions,
    "inventory":[],
    "items":[
        {
            "buy":nbtSerializedItem,
            "buy2":?nbtSerializedItem,
            "sell":nbtSerializedItem
        }
    ]
}
Name Type Description
author string The username of the shop author
enabled bool Is the shop enabled? This option can be changed by the player in the menu config
admin bool If the shop is an Admin shop, so you don't have to put items in the inventory and you won't earn anything
title string The real name of the shop
namevisible bool Should the shop name be visible when summoned?
history string A base64 encoded string with all the transactions
inventory array The inventory of the shop
items array A list of all recepies (max 9)

Special thanks

Thanks to Muqsit for the InvMenu virion who have contributed to the creation for this plugin!
Also this plugin helped me!

Contacts

You can contact me via:

shopkeepers's People

Contributors

foxworn3365 avatar poggit-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

shopkeepers's Issues

Unresponsive?

Sun_Jul_16-21.58.42-UTC_2023.log

Running PocketMine-MP 5.3.1

Untitled.video.mp4

I can run /shopkeepers command and see the UI menu. If I click config, nothing happens.
If I do /shopkeepers create NAME, /shopkeepers summon NAME and right click on it - nothing happens. If I shift and click I can see the trades menu but nothing has been set up. If I shift and click a second time, nothing happens.
If you run a command like "/shopkeepers create" the server just crashes.

Bug, server crashes.

Once install new verison #dev51, server crashes on start up, gives no error codes, just server goes into a throttle restart.

Thanks
Andrew

customitemloader

The items we made with the customItemLoader plugin do not appear in the trade.

Crash

https://crash.pmmp.io/view/9377035

version latest

config.txt

(txt so i can upload it)
Sat_Oct_7-23.38.56-UTC_2023.txt

HIS CRASH WAS CAUSED BY A PLUGIN
BAD PLUGIN: Shopkeepers

Thread: AsyncWorker#3
Error: Attempt to read property "status" on null
File: plugins/Shopkeepers.phar/src/FoxWorn3365/Shopkeepers/pmmpStats/pmmpStatsAsync
Line: 25
Type: ErrorException
Backtrace:
#0 /home/container/plugins/Shopkeepers.phar/src/FoxWorn3365/Shopkeepers/pmmpStats/pmmpStatsAsync(25): pocketmine\errorhandler\ErrorToExceptionHandler::handle(int 2, string[41] Attempt to read property "status" on null, string[104] phar:///home/container/plugins/Shopkeepers.phar/src/FoxWorn3365/Shopkeepers/pmmp, int 25)
#1 pmsrc/src/scheduler/AsyncTask(82): FoxWorn3365\Shopkeepers\pmmpStats\pmmpStatsAsync->onRun()
#2 (): pocketmine\scheduler\AsyncTask->run()

Code:
[16]
[17] public function onRun() : void {
[18] // Send the http request
[19] $ch = curl_init();
[20] curl_setopt($ch, CURLOPT_URL, $this->url);
[21] curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
[22] $data = curl_exec($ch);
[23] curl_close($ch);
[24] $data = json_decode($data);
[25] if ($data->status !== 200) {
[26] var_dump("ERROR WHILE PUTTING DATA ON pmmpStats, server says: '{$data->message}'\n");
[27] }
[28] }
[29] }

Loaded plugins:
MCPEToDiscord 2.4.0 by JaxkDev, GamerMJay for API(s) 5.0.0
Shopkeepers 1.3.0 by FoxWorn3365 for API(s) 5.0.0
oh-my-pmmp 2.0.0-alpha by thebigcrafter for API(s) 5.0.0

uname -a: Linux 61f84316-a846-4dd7-9ec9-d3256baf70f8 5.15.0-60-generic #66-Ubuntu SMP Fri Jan 20 14:29:49 UTC 2023 x86_64
Zend version: 4.1.23
Composer libraries:

  • adhocore/json-comment 1.2.1@651023f9fe52e9efa2198cbaf6e481d1968e2377
  • brick/math 0.11.0@0ad82ce168c82ba30d1c01ec86116ab52f589478
  • daverandom/callback-validator unknown@unknown
  • netresearch/jsonmapper unknown@unknown
  • pocketmine/bedrock-block-upgrade-schema 3.2.0@874e1c0c9b7b620744d08b59c78354fe9f028dfa
  • pocketmine/bedrock-data 2.5.0+bedrock-1.20.30@e920209393a8bf6cb15fb40c3f3149aaf8e1a2b9
  • pocketmine/bedrock-item-upgrade-schema 1.5.0@3edc9ebbad9a4f2d9c8f53b3a5ba44d4a792ad93
  • pocketmine/bedrock-protocol 24.0.0+bedrock-1.20.30@38a516274aa6641b0da38011af35a5587fc87895
  • pocketmine/binaryutils 0.2.4@5ac7eea91afbad8dc498f5ce34ce6297d5e6ea9a
  • pocketmine/callback-validator 1.0.3@64787469766bcaa7e5885242e85c23c25e8c55a2
  • pocketmine/color 0.3.1@a0421f1e9e0b0c619300fb92d593283378f6a5e1
  • pocketmine/errorhandler 0.6.0@dae214a04348b911e8219ebf125ff1c5589cc878
  • pocketmine/locale-data 2.19.6@93e473e20e7f4515ecf45c5ef0f9155b9247a86e
  • pocketmine/log 0.4.0@e6c912c0f9055c81d23108ec2d179b96f404c043
  • pocketmine/math 1.0.0@dc132d93595b32e9f210d78b3c8d43c662a5edbf
  • pocketmine/nbt 1.0.0@20540271cb59e04672cb163dca73366f207974f1
  • pocketmine/netresearch-jsonmapper v4.2.1000@078764e869e9b732f97206ec9363480a77c35532
  • pocketmine/pocketmine-mp 5.6.0@338bb3fe6d70f093fc8dc01d1d3c3b4b3656fcf8
  • pocketmine/raklib 0.15.1@79b7b4d1d7516dc6e322514453645ad9452b20ca
  • pocketmine/raklib-ipc 0.2.0@26ed56fa9db06e4ca6e8920c0ede2e01e219bb9c
  • pocketmine/snooze 0.5.0@a86d9ee60ce44755d166d3c7ba4b8b8be8360915
  • ramsey/collection 2.0.0@a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5
  • ramsey/uuid 4.7.4@60a4c63ab724854332900504274f6150ff26d286
  • rhumsaa/uuid unknown@unknown
  • symfony/filesystem v6.3.1@edd36776956f2a6fcf577edb5b05eb0e3bdc52ae
  • symfony/polyfill-ctype v1.28.0@ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb
  • symfony/polyfill-mbstring v1.28.0@42292d99c55abe617799667f454222c54c60e229
    HIS CRASH WAS CAUSED BY A PLUGIN
    BAD PLUGIN: Shopkeepers

Thread: AsyncWorker#3
Error: Attempt to read property "status" on null
File: plugins/Shopkeepers.phar/src/FoxWorn3365/Shopkeepers/pmmpStats/pmmpStatsAsync
Line: 25
Type: ErrorException
Backtrace:
#0 /home/container/plugins/Shopkeepers.phar/src/FoxWorn3365/Shopkeepers/pmmpStats/pmmpStatsAsync(25): pocketmine\errorhandler\ErrorToExceptionHandler::handle(int 2, string[41] Attempt to read property "status" on null, string[104] phar:///home/container/plugins/Shopkeepers.phar/src/FoxWorn3365/Shopkeepers/pmmp, int 25)
#1 pmsrc/src/scheduler/AsyncTask(82): FoxWorn3365\Shopkeepers\pmmpStats\pmmpStatsAsync->onRun()
#2 (): pocketmine\scheduler\AsyncTask->run()

Code:
[16]
[17] public function onRun() : void {
[18] // Send the http request
[19] $ch = curl_init();
[20] curl_setopt($ch, CURLOPT_URL, $this->url);
[21] curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
[22] $data = curl_exec($ch);
[23] curl_close($ch);
[24] $data = json_decode($data);
[25] if ($data->status !== 200) {
[26] var_dump("ERROR WHILE PUTTING DATA ON pmmpStats, server says: '{$data->message}'\n");
[27] }
[28] }
[29] }

Loaded plugins:
MCPEToDiscord 2.4.0 by JaxkDev, GamerMJay for API(s) 5.0.0
Shopkeepers 1.3.0 by FoxWorn3365 for API(s) 5.0.0
oh-my-pmmp 2.0.0-alpha by thebigcrafter for API(s) 5.0.0

uname -a: Linux 61f84316-a846-4dd7-9ec9-d3256baf70f8 5.15.0-60-generic #66-Ubuntu SMP Fri Jan 20 14:29:49 UTC 2023 x86_64
Zend version: 4.1.23
Composer libraries:

  • adhocore/json-comment 1.2.1@651023f9fe52e9efa2198cbaf6e481d1968e2377
  • brick/math 0.11.0@0ad82ce168c82ba30d1c01ec86116ab52f589478
  • daverandom/callback-validator unknown@unknown
  • netresearch/jsonmapper unknown@unknown
  • pocketmine/bedrock-block-upgrade-schema 3.2.0@874e1c0c9b7b620744d08b59c78354fe9f028dfa
  • pocketmine/bedrock-data 2.5.0+bedrock-1.20.30@e920209393a8bf6cb15fb40c3f3149aaf8e1a2b9
  • pocketmine/bedrock-item-upgrade-schema 1.5.0@3edc9ebbad9a4f2d9c8f53b3a5ba44d4a792ad93
  • pocketmine/bedrock-protocol 24.0.0+bedrock-1.20.30@38a516274aa6641b0da38011af35a5587fc87895
  • pocketmine/binaryutils 0.2.4@5ac7eea91afbad8dc498f5ce34ce6297d5e6ea9a
  • pocketmine/callback-validator 1.0.3@64787469766bcaa7e5885242e85c23c25e8c55a2
  • pocketmine/color 0.3.1@a0421f1e9e0b0c619300fb92d593283378f6a5e1
  • pocketmine/errorhandler 0.6.0@dae214a04348b911e8219ebf125ff1c5589cc878
  • pocketmine/locale-data 2.19.6@93e473e20e7f4515ecf45c5ef0f9155b9247a86e
  • pocketmine/log 0.4.0@e6c912c0f9055c81d23108ec2d179b96f404c043
  • pocketmine/math 1.0.0@dc132d93595b32e9f210d78b3c8d43c662a5edbf
  • pocketmine/nbt 1.0.0@20540271cb59e04672cb163dca73366f207974f1
  • pocketmine/netresearch-jsonmapper v4.2.1000@078764e869e9b732f97206ec9363480a77c35532
  • pocketmine/pocketmine-mp 5.6.0@338bb3fe6d70f093fc8dc01d1d3c3b4b3656fcf8
  • pocketmine/raklib 0.15.1@79b7b4d1d7516dc6e322514453645ad9452b20ca
  • pocketmine/raklib-ipc 0.2.0@26ed56fa9db06e4ca6e8920c0ede2e01e219bb9c
  • pocketmine/snooze 0.5.0@a86d9ee60ce44755d166d3c7ba4b8b8be8360915
  • ramsey/collection 2.0.0@a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5
  • ramsey/uuid 4.7.4@60a4c63ab724854332900504274f6150ff26d286
  • rhumsaa/uuid unknown@unknown
  • symfony/filesystem v6.3.1@edd36776956f2a6fcf577edb5b05eb0e3bdc52ae
  • symfony/polyfill-ctype v1.28.0@ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb
  • symfony/polyfill-mbstring v1.28.0@42292d99c55abe617799667f454222c54c60e229

Crash pmmpstats:

[AsyncWorker#2 thread/CRITICAL]: ErrorException: "Attempt to read property "status" on null" (EXCEPTION) in "/home/serveurbe/lobby/plugins/Shopkeepers (6).phar/src/FoxWorn3365/Shopkeepers/pmmpStats/pmmpStatsAsync" at line 25
--- Stack trace ---
#0 /home/serveurbe/lobby/plugins/Shopkeepers (6).phar/src/FoxWorn3365/Shopkeepers/pmmpStats/pmmpStatsAsync(25): pocketmine\errorhandler\ErrorToExceptionHandler::handle(int 2, string[41] Attempt to read property "status" on null, string[114] phar:///home/serveurbe/lobby/plugins/Shopkeepers (6).phar/src/FoxWorn3365/Shopke, int 25)
#1 pmsrc/src/scheduler/AsyncTask(83): FoxWorn3365\Shopkeepers\pmmpStats\pmmpStatsAsync->onRun()
#2 (): pocketmine\scheduler\AsyncTask->run()
--- End of exception information ---
[08:47:20.239] [Server thread/CRITICAL]: pocketmine\thread\ThreadCrashException: "Worker 2 crashed while running task FoxWorn3365\Shopkeepers\pmmpStats\pmmpStatsAsync#180426" (EXCEPTION) in "pmsrc/src/scheduler/AsyncPool" at line 226
--- Stack trace ---
#0 pmsrc/src/scheduler/AsyncPool(266): pocketmine\scheduler\AsyncPool->checkCrashedWorker(int 2, object FoxWorn3365\Shopkeepers\pmmpStats\pmmpStatsAsync#180426)
#1 pmsrc/src/scheduler/AsyncPool(241): pocketmine\scheduler\AsyncPool->collectTasksFromWorker(int 2)
#2 pmsrc/src/Server(1802): pocketmine\scheduler\AsyncPool->collectTasks()
#3 pmsrc/src/Server(1687): pocketmine\Server->tick()
#4 pmsrc/src/Server(1065): pocketmine\Server->tickProcessor()
#5 pmsrc/src/PocketMine(341): pocketmine\Server->__construct(object pocketmine\thread\ThreadSafeClassLoader#3, object pocketmine\utils\MainLogger#6, string[22] /home/serveurbe/lobby/, string[30] /home/serveurbe/lobby/plugins/)
#6 pmsrc/src/PocketMine(364): pocketmine\server()
#7 pmsrc(11): require(string[66] phar:///home/serveurbe/lobby/PocketMine-MP.phar/src/PocketMine.php)
--- End of exception information ---

fix itttttttttttttt

[19:05:53.308] [Server thread/CRITICAL]: ErrorException: "Creation of dynamic property FoxWorn3365\Shopkeepers\Core::$config is deprecated" (EXCEPTION) in "plugins/Shopkeepers (4).phar/src/FoxWorn3365/Shopkeepers/Core" at line 157
--- Stack trace ---
#0 plugins/Shopkeepers (4).phar/src/FoxWorn3365/Shopkeepers/Core(157): pocketmine\errorhandler\ErrorToExceptionHandler::handle(int 8192, string[80] Creation of dynamic property FoxWorn3365\Shopkeepers\Core::$config is deprecated, string[88] phar:///home/container/plugins/Shopkeepers (4).phar/src/FoxWorn3365/Shopkeepers/, int 157)
#1 pmsrc/src/plugin/PluginBase(119): FoxWorn3365\Shopkeepers\Core->onEnable()
#2 pmsrc/src/plugin/PluginManager(454): pocketmine\plugin\PluginBase->onEnableStateChange(true)
#3 pmsrc/src/Server(1398): pocketmine\plugin\PluginManager->enablePlugin(object FoxWorn3365\Shopkeepers\Core#62471)
#4 pmsrc/src/Server(1034): pocketmine\Server->enablePlugins(object pocketmine\plugin\PluginEnableOrder#45219)
#5 pmsrc/src/PocketMine(341): pocketmine\Server->__construct(object pocketmine\thread\ThreadSafeClassLoader#6, object pocketmine\utils\MainLogger#3, string[16] /home/container/, string[24] /home/container/plugins/)
#6 pmsrc/src/PocketMine(364): pocketmine\server()
#7 pmsrc(11): require(string[60] phar:///home/container/PocketMine-MP.phar/src/PocketMine.php)

Bug

[13:18:09.458] [Server thread/EMERGENCY]: Crash occurred while handling a packet from session: plug Plugins
[13:18:09.458] [Server thread/CRITICAL]: Error: "Cannot use object of type stdClass as array" (EXCEPTION) in "plugins/Shopkeepers.phar/src/FoxWorn3365/Shopkeepers/Menu/EditMenu" at line 64

bug

[Server thread/CRITICAL]: ErrorException: "Creation of dynamic property FoxWorn3365\Shopkeepers\Core::$config is deprecated" (EXCEPTION) in "plugins/Shopkeepers.phar/src/FoxWorn3365/Shopkeepers/Core" at line 157

Crsh

ErrorException: "Creation of dynamic property FoxWorn3365\Shopkeepers\Core::$config is deprecated" (EXCEPTION) in "plugins/Shopkeepers.phar/src/FoxWorn3365/Shopkeepers/Core" at line 157
--- Stack trace ---
#0 plugins/Shopkeepers.phar/src/FoxWorn3365/Shopkeepers/Core(157): pocketmine\errorhandler\ErrorToExceptionHandler::handle(int 8192, string[80] Creation of dynamic property FoxWorn3365\Shopkeepers\Core::$config is deprecated, string[81] phar:///root/Server/plugins/Shopkeepers.phar/src/FoxWorn3365/Shopkeepers/Core.ph, int 157)
#1 pmsrc/src/plugin/PluginBase(119): FoxWorn3365\Shopkeepers\Core->onEnable()
#2 pmsrc/src/plugin/PluginManager(454): pocketmine\plugin\PluginBase->onEnableStateChange(true)
#3 pmsrc/src/Server(1389): pocketmine\plugin\PluginManager->enablePlugin(object FoxWorn3365\Shopkeepers\Core#41845)
#4 pmsrc/src/Server(1033): pocketmine\Server->enablePlugins(object pocketmine\plugin\PluginEnableOrder#41630)
#5 pmsrc/src/PocketMine(334): pocketmine\Server->__construct(object pocketmine\thread\ThreadSafeClassLoader#3, object pocketmine\utils\MainLogger#6, string[13] /root/Server/, string[21] /root/Server/plugins/)
#6 pmsrc/src/PocketMine(357): pocketmine\server()
#7 pmsrc(11): require(string[57] phar:///root/Server/PocketMine-MP.phar/src/PocketMine.php)
--- End of exception information ---

Bug

Bug When I Type Command /sk edit

Plugin error

[12:39:54.275] [Server thread/CRITICAL]: ErrorException: "Undefined array key 1" (EXCEPTION) in "plugins/Shopkeepers.phar/src/FoxWorn3365/Shopkeepers/Core" at line 232
--- Stack trace ---
#0 plugins/Shopkeepers.phar/src/FoxWorn3365/Shopkeepers/Core(232): pocketmine\errorhandler\ErrorToExceptionHandler::handle(int 2, string[21] Undefined array key 1, string[84] phar:///home/container/plugins/Shopkeepers.phar/src/FoxWorn3365/Shopkeepers/Core, int 232)
#1 pmsrc/src/command/PluginCommand(46): FoxWorn3365\Shopkeepers\Core->onCommand(object pocketmine\player\Player#167741, object pocketmine\command\PluginCommand#40741, string[2] sk, array[1])
#2 pmsrc/src/command/SimpleCommandMap(212): pocketmine\command\PluginCommand->execute(object pocketmine\player\Player#167741, string[2] sk, array[1])
#3 pmsrc/src/Server(1415): pocketmine\command\SimpleCommandMap->dispatch(object pocketmine\player\Player#167741, string[9] sk create)
#4 pmsrc/src/player/Player(1503): pocketmine\Server->dispatchCommand(object pocketmine\player\Player#167741, string[9] sk create)
#5 pmsrc/src/network/mcpe/handler/InGamePacketHandler(818): pocketmine\player\Player->chat(string[10] /sk create)
#6 pmsrc/vendor/pocketmine/bedrock-protocol/src/CommandRequestPacket(55): pocketmine\network\mcpe\handler\InGamePacketHandler->handleCommandRequest(object pocketmine\network\mcpe\protocol\CommandRequestPacket#80337)
#7 pmsrc/src/network/mcpe/NetworkSession(437): pocketmine\network\mcpe\protocol\CommandRequestPacket->handle(object pocketmine\network\mcpe\handler\InGamePacketHandler#84899)
#8 pmsrc/src/network/mcpe/NetworkSession(381): pocketmine\network\mcpe\NetworkSession->handleDataPacket(object pocketmine\network\mcpe\protocol\CommandRequestPacket#80337, string[32] M./sk create..O...f........f...D)
#9 pmsrc/src/network/mcpe/raklib/RakLibInterface(217): pocketmine\network\mcpe\NetworkSession->handleEncoded(string[81] S.../.VH.JM,Ie....{W...'g.........b3.1`o..2.o.../p..mw.]..... q.F&.u\ ....{.T.L.)
#10 pmsrc/vendor/pocketmine/raklib-ipc/src/RakLibToUserThreadMessageReceiver(40): pocketmine\network\mcpe\raklib\RakLibInterface->onPacketReceive(int 0, string[90] ..w...h.p....U.a.M.5t..C...M..5..FYH...9..L$u.M.S].o.F:[email protected]..K..2..%)
#11 pmsrc/src/network/mcpe/raklib/RakLibInterface(109): raklib\server\ipc\RakLibToUserThreadMessageReceiver->handle(object pocketmine\network\mcpe\raklib\RakLibInterface#184239)
#12 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(120): pocketmine\network\mcpe\raklib\RakLibInterface->pocketmine\network\mcpe\raklib{closure}()
#13 pmsrc/src/TimeTrackingSleeperHandler(58): pocketmine\snooze\SleeperHandler->processNotifications()
#14 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(79): pocketmine\TimeTrackingSleeperHandler->processNotifications()
#15 pmsrc/src/Server(1674): pocketmine\snooze\SleeperHandler->sleepUntil(float 1688474394.2832)
#16 pmsrc/src/Server(1063): pocketmine\Server->tickProcessor()
#17 pmsrc/src/PocketMine(334): pocketmine\Server->__construct(object pocketmine\thread\ThreadSafeClassLoader#6, object pocketmine\utils\MainLogger#3, string[16] /home/container/, string[24] /home/container/plugins/)
#18 pmsrc/src/PocketMine(357): pocketmine\server()
#19 pmsrc(11): require(string[60] phar:///home/container/PocketMine-MP.phar/src/PocketMine.php)
--- End of exception information ---
[12:39:54.276] [Server thread/EMERGENCY]: An unrecoverable error has occurred and the server has crashed. Creating a crash dump
[12:39:54.281] [Server thread/EMERGENCY]: Please upload the "/home/container/crashdumps/Tue_Jul_4-12.39.54-UTC_2023.log" file to the Crash Archive and submit the link to the Bug Reporting page. Give as much info as you can.
[12:39:54.368] [Server thread/EMERGENCY]: The crash dump has been automatically submitted to the Crash Archive. You can view it on https://crash.pmmp.io/view/8914312 or use the ID #8914312.
[12:39:54.368] [Server thread/EMERGENCY]: Forcing server shutdown
[12:39:54.368] [Server thread/INFO]: Disabling Shopkeepers v0.9.1-pre

ErrorException: "Creation of dynamic property"

[17:10:54.436] [Server thread/CRITICAL]: ErrorException: "Creation of dynamic property FoxWorn3365\Shopkeepers\Core::$server is deprecated" (EXCEPTION) in "plugins/Shopkeepers/src/FoxWorn3365/Shopkeepers/Core" at line 116
--- Stack trace ---
  #0 plugins/Shopkeepers/src/FoxWorn3365/Shopkeepers/Core(116): pocketmine\errorhandler\ErrorToExceptionHandler::handle(int 8192, string[80] Creation of dynamic property FoxWorn3365\Shopkeepers\Core::$server is deprecated, string[103] C:\Users\NhanAZ\Documents\Github\PocketMine-MP\plugins\Shopkeepers\src\FoxWorn33, int 116)
  #1 pmsrc/src/plugin/PluginBase(118): FoxWorn3365\Shopkeepers\Core->onEnable()
  #2 pmsrc/src/plugin/PluginManager(454): pocketmine\plugin\PluginBase->onEnableStateChange(true)
  #3 pmsrc/src/Server(1389): pocketmine\plugin\PluginManager->enablePlugin(object FoxWorn3365\Shopkeepers\Core#41640)
  #4 pmsrc/src/Server(1033): pocketmine\Server->enablePlugins(object pocketmine\plugin\PluginEnableOrder#41537)
  #5 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\)
  #6 pmsrc/src/PocketMine(357): pocketmine\server()
--- End of exception information ---
[17:10:54.438] [Server thread/EMERGENCY]: An unrecoverable error has occurred and the server has crashed. Creating a crash dump
[17:10:54.448] [Server thread/EMERGENCY]: Please upload the "C:/Users/NhanAZ/Documents/Github/PocketMine-MP/crashdumps/Mon_Jul_31-17.10.54-UTC_2023.log" file to the Crash Archive and submit the link to the Bug Reporting page. Give as much info as you can.
[17:10:54.449] [Server thread/EMERGENCY]: Forcing server shutdown

Crahs

Thread: Main
Error: Position world is null or has been unloaded
File: pmsrc/src/world/Position
Line: 63
Type: pocketmine\utils\AssumptionFailedError
Backtrace:
#0 pmsrc/src/entity/Entity(197): pocketmine\world\Position->getWorld()
#1 plugins/Shopkeepers-main/src/FoxWorn3365/Shopkeepers/entity/Shopkeeper(33): pocketmine\entity\Entity->__construct(object pocketmine\entity\Location#106740, null)
#2 plugins/Shopkeepers-main/src/FoxWorn3365/Shopkeepers/EntityManager(130): FoxWorn3365\Shopkeepers\entity\Shopkeeper->__construct(object pocketmine\entity\Location#106740, object stdClass#106731, int 3815357194)
#3 plugins/Shopkeepers-main/src/FoxWorn3365/Shopkeepers/EntityManager(107): FoxWorn3365\Shopkeepers\EntityManager::createEntity(string[292] eyJ4IjozMjcuNTU3MiwieSI6NCwieWF3Ijo2Ni40NzA3MDMxMjUsInoiOjQzMy41NDQxLCJwaXRjaCI6, object pocketmine\Server#13)
#4 plugins/Shopkeepers-main/src/FoxWorn3365/Shopkeepers/Core(174): FoxWorn3365\Shopkeepers\EntityManager->loadPlayer(object pocketmine\player\Player#91281)

Crash

A PLUGIN WAS INVOLVED IN THIS CRASH
BAD PLUGIN: Shopkeepers

Thread: Main
Error: Tried to schedule task to disabled scheduler
File: pmsrc/src/scheduler/TaskScheduler
Line: 86
Type: LogicException
Backtrace:
#0 pmsrc/src/scheduler/TaskScheduler(63): pocketmine\scheduler\TaskScheduler->addTask(object FoxWorn3365\Shopkeepers\pmmpStats\pmmpStatsTask#148087, int -1, int 2000)
#1 plugins/Shopkeepers.phar/src/FoxWorn3365/Shopkeepers/Core(182): pocketmine\scheduler\TaskScheduler->scheduleRepeatingTask(object FoxWorn3365\Shopkeepers\pmmpStats\pmmpStatsTask#148087, int 2000)
#2 pmsrc/src/plugin/PluginBase(119): FoxWorn3365\Shopkeepers\Core->onEnable()
#3 pmsrc/src/plugin/PluginManager(454): pocketmine\plugin\PluginBase->onEnableStateChange(true)
#4 pmsrc/src/Server(1389): pocketmine\plugin\PluginManager->enablePlugin(object FoxWorn3365\Shopkeepers\Core#48987)
#5 pmsrc/src/Server(1033): pocketmine\Server->enablePlugins(object pocketmine\plugin\PluginEnableOrder#41674)
#6 pmsrc/src/PocketMine(334): pocketmine\Server->__construct(object pocketmine\thread\ThreadSafeClassLoader#6, object pocketmine\utils\MainLogger#3, string[16] /home/container/, string[24] /home/container/plugins/)
#7 pmsrc/src/PocketMine(357): pocketmine\server()
#8 pmsrc(11): require(string[60] phar:///home/container/PocketMine-MP.phar/src/PocketMine.php)

Code:
[77] }
[78] }
[79]
[80] public function isQueued(TaskHandler $task) : bool{
[81] return $this->tasks->contains($task);
[82] }
[83]
[84] private function addTask(Task $task, int $delay, int $period) : TaskHandler{
[85] if(!$this->enabled){
[86] throw new \LogicException("Tried to schedule task to disabled scheduler");
[87] }
[88]
[89] if($delay <= 0){
[90] $delay = -1;
[91] }
[92]
[93] if($period <= -1){
[94] $period = -1;
[95] }elseif($period < 1){
[96] $period = 1;

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.