boxofdevs / commandshop Goto Github PK
View Code? Open in Web Editor NEWPlayers have to pay items or money to use specific commands! A PocketMine plugin.
License: Other
Players have to pay items or money to use specific commands! A PocketMine plugin.
License: Other
This isn't an issue but a feature request. Add a separate permission node for /cshop list
so players can see what commands they can buy with /buycmd
Warning: file_put_contents(C:\PocketMine-MP\plugins\CommandShop/config.yml): failed to open stream: No such file or directory in C:\PocketMine-MP\src\pocketmine\utils\Config.php on line 190
Plugins i use:[Tesseract] [21:50:51] INFO> Plugins (34): FolderPluginLoader v1.0.1, DevTools v1.11.1, superBAR v1.6.2, AdvancedKits v5.1, AntiFly v1.0.0, AntiSpamPro v1.0.8, BetterVIPSlots v2, Broadcaster v1.16, CombatLogger v1.2.0, CommandShop v1.0.0, CosmeticMenu v1.0.0, CustomAlerts v1.6, EconomyAPI v2.0.9, EconomyAuction v2.0.2, EconomyCasino v2.0.2, EconomyJob v2.0.4, EconomyLand v2.0.9, EconomyProperty v2.0.6, EconomyPShop v2.0.2, EconomySell v2.0.7, EconomyShop v2.0.7, EconomyTax v2.0.3, EconomyUsury v1.0.1, EnderAuth v0.0.1, EssentialsPE v2.0.0, FactionsPro v1.3.7.AWZ, iProtector v3.1b, MSpawns v1.5, Neon v1.0.5, NoAdvertisingPE v1.0.1, PurePerms v1.4.0-INDEV, WorldProtect v2.2.0, EconomyAirport v2.0.4, PureChat v1.4.0
So like.... where is the how-to on how to use this ?
:P usually a link or something is in the readme... but I guess not for you guys !
Does this plugin even work yet ? I was gonna test it... but... too confusing.
Unfairly, too many items get removed.
Only one gets removed
All of them get removed
The reason for this problem is this function by Ad5001 that's supposed to remove the correct amount of items, but apparently no one ever tested it with non-stacking items lol.
Possible fix (not yet tested):
private function removeItems(Item $item, BaseInventory $inventory){
$checkDamage = !$item->hasAnyDamageValue();
$checkTags = $item->hasCompoundTag();
$checkCount = $item->getCount() === null ? false : true;
$count = $item->getCount();
foreach($inventory->getContents() as $index => $i){
if($item->equals($i, $checkDamage, $checkTags)){
if($checkCount && $i->getCount() > $count) {
$i->setCount($i->getCount() - $count);
$inventory->setItem($index, $i);
return;
} elseif($checkCount && $i->getCount() < $count) {
$count -= $i->getCount();
$inventory->clear($index);
} else {
$inventory->clear($index);
return;
}
}
}
}
Thanks to @MCPEATECH for finding this out.
Paste your CrashDump or error by replacing this text (DON'T delete the backticks!)
thread/CRITICAL ErrorException: "Undefined index: price" (EXCEPTION) in "plugins/CommandShop_dev-113.phar/src/BoxOfDevs/CommandShop/CommandShop" at line 172
When I click on the card to buy an item, I receive the same item several times
Hi, I'm asking for if you can do a RankShopUI because it's don't exist i think because i searched a lot.Bes regard
Paste your CrashDump or error by replacing this text (DON'T delete the backticks!)
Paste your CrashDump or error by replacing this text (DON'T delete the backticks!)
Hey, there is a pmmp4 version ?
Its not an issue but it would be awesome if you can dev it as UI based command shop!!
Paste your CrashDump or error by replacing this text (DON'T delete the backticks!)
Everyone I type /cshop add anyname any command
I get "An unknown error occurred while attempting to perform this command"
14.03 09:13:51 [Server] Server thread/INFO [Broadcaster] Report Hackers and trouble makers
14.03 09:13:11 [Server] Server thread/DEBUG #25 /jar/PocketMine-1.2.10-dev.phar(1): require(string phar:///jar/PocketMine-1.2.10-dev.phar/src/pocketmine/PocketMine.php)
14.03 09:13:11 [Server] Server thread/DEBUG #24 src/pocketmine/PocketMine(556): pocketmine\Server->__construct(BaseClassLoader object, pocketmine\utils\MainLogger object, string /, string /plugins/)
14.03 09:13:11 [Server] Server thread/DEBUG #23 src/pocketmine/Server(1744): pocketmine\Server->start()
14.03 09:13:11 [Server] Server thread/DEBUG #22 src/pocketmine/Server(2158): pocketmine\Server->tickProcessor()
14.03 09:13:11 [Server] Server thread/DEBUG #21 src/pocketmine/Server(2283): pocketmine\Server->tick()
14.03 09:13:11 [Server] Server thread/DEBUG #20 src/pocketmine/Server(2531): pocketmine\network\Network->processInterfaces()
14.03 09:13:11 [Server] Server thread/DEBUG #19 src/pocketmine/network/Network(89): pocketmine\network\mcpe\RakLibInterface->process()
14.03 09:13:11 [Server] Server thread/DEBUG #18 src/pocketmine/network/mcpe/RakLibInterface(88): raklib\server\ServerHandler->handlePacket()
14.03 09:13:11 [Server] Server thread/DEBUG #17 vendor/pocketmine/raklib/server/ServerHandler(103): pocketmine\network\mcpe\RakLibInterface->handleEncapsulated(string 174.232.7.160 8888, raklib\protocol\EncapsulatedPacket object, integer 0)
14.03 09:13:11 [Server] Server thread/DEBUG #16 src/pocketmine/network/mcpe/RakLibInterface(149): pocketmine\Player->handleDataPacket(pocketmine\network\mcpe\protocol\BatchPacket object)
14.03 09:13:11 [Server] Server thread/DEBUG #15 src/pocketmine/Player(2964): pocketmine\network\mcpe\PlayerNetworkSessionAdapter->handleDataPacket(pocketmine\network\mcpe\protocol\BatchPacket object)
14.03 09:13:11 [Server] Server thread/DEBUG #14 src/pocketmine/network/mcpe/PlayerNetworkSessionAdapter(92): pocketmine\network\mcpe\protocol\BatchPacket->handle(pocketmine\network\mcpe\PlayerNetworkSessionAdapter object)
14.03 09:13:11 [Server] Server thread/DEBUG #13 src/pocketmine/network/mcpe/protocol/BatchPacket(115): pocketmine\network\mcpe\PlayerNetworkSessionAdapter->handleDataPacket(pocketmine\network\mcpe\protocol\CommandRequestPacket object)
14.03 09:13:11 [Server] Server thread/DEBUG #12 src/pocketmine/network/mcpe/PlayerNetworkSessionAdapter(92): pocketmine\network\mcpe\protocol\CommandRequestPacket->handle(pocketmine\network\mcpe\PlayerNetworkSessionAdapter object)
14.03 09:13:11 [Server] Server thread/DEBUG #11 src/pocketmine/network/mcpe/protocol/CommandRequestPacket(54): pocketmine\network\mcpe\PlayerNetworkSessionAdapter->handleCommandRequest(pocketmine\network\mcpe\protocol\CommandRequestPacket object)
14.03 09:13:11 [Server] Server thread/DEBUG #10 src/pocketmine/network/mcpe/PlayerNetworkSessionAdapter(220): pocketmine\Player->chat(string /cshop add spawn spawn)
14.03 09:13:11 [Server] Server thread/DEBUG #9 src/pocketmine/Player(2117): pocketmine\Server->dispatchCommand(pocketmine\Player object, string cshop add spawn spawn)
14.03 09:13:11 [Server] Server thread/DEBUG #8 src/pocketmine/Server(1989): pocketmine\command\SimpleCommandMap->dispatch(pocketmine\Player object, string cshop add spawn spawn)
14.03 09:13:11 [Server] Server thread/DEBUG #7 src/pocketmine/command/SimpleCommandMap(258): pocketmine\command\PluginCommand->execute(pocketmine\Player object, string cshop, array Array())
14.03 09:13:11 [Server] Server thread/DEBUG #6 src/pocketmine/command/PluginCommand(58): BoxOfDevs\CommandShop\CommandShop->onCommand(pocketmine\Player object, pocketmine\command\PluginCommand object, string cshop, array Array())
14.03 09:13:11 [Server] Server thread/DEBUG #5 CommandShop_v1.0.0.phar/src/BoxOfDevs/CommandShop/CommandShop(238): pocketmine\plugin\PluginBase->getConfig()
14.03 09:13:11 [Server] Server thread/DEBUG #4 src/pocketmine/plugin/PluginBase(244): pocketmine\plugin\PluginBase->reloadConfig()
14.03 09:13:11 [Server] Server thread/DEBUG #3 src/pocketmine/plugin/PluginBase(264): pocketmine\utils\Config->__construct(string /plugins/CommandShop/config.yml)
14.03 09:13:11 [Server] Server thread/DEBUG #2 src/pocketmine/utils/Config(86): pocketmine\utils\Config->load(string /plugins/CommandShop/config.yml, integer -1, array Array())
14.03 09:13:11 [Server] Server thread/DEBUG #1 src/pocketmine/utils/Config(155): yaml_parse(string ---..buy.money.success: '{prefix}You successfully bought the command {cmd} for {amount}.. {unit}!{line}{prefix}The command has already been executed.'..buy.money.miss: '{error}You don''t have enough money to buy this command. You would.. need {amount} {unit}!'..buy.item.success: '{prefix}You successfully bought the command {cmd} with the item.. {item}!{line}{prefix}The command has already been executed.'..buy.item.miss: '{error}You don''t have enough items to buy this command, items needed:{line}Item:.. {item} Amount: {amount}'..buy.contactadmin: '{line}If you are a normal user, please contact your server administrator!'..command.notfound: '{error}Command {cmd} wasn''t found in the list of buyable commands!'..sign.confirm: '{prefix}Tap the sign again to confirm that you want to buy the command.. {cmd}!'..sign.noperm: '{error}You don''t have the permission to buy commands via signs!'..sign.nobreak: '{error}You don''t have the permission to break CommandShop signs!'..buycmd.disabled: '{error}/buycmd is disabled for this buyable command!'..commands:.. example:.. cmds:.. - tp {player} 123 123 123.. buycmd: "true".. price:.. paytype: item.. item: 1:0:64.. demon:.. cmds:.. - kit demon.. buycmd: "true".. price:5000.. paytype: item.. item: 259:0:1.......)
14.03 09:13:11 [Server] Server thread/DEBUG #0 (): pocketmine\error_handler(integer 2, string yaml_parse(): scanning error encountered during parsing: could not find expected ':' (line 30, column 14), context while scanning a simple key (line 29, column 5), string phar:///jar/PocketMine-1.2.10-dev.phar/src/pocketmine/utils/Config.php, integer 155, array Array())
14.03 09:13:11 [Server] Server thread/CRITICAL ErrorException: "yaml_parse(): scanning error encountered during parsing: could not find expected ':' (line 30, column 14), context while scanning a simple key (line 29, column 5)" (EXCEPTION) in "src/pocketmine/utils/Config" at line 155
14.03 09:13:11 [Server] Server thread/CRITICAL Unhandled exception executing command 'cshop add spawn spawn' in cshop: yaml_parse(): scanning error encountered during parsing: could not find expected ':' (line 30, column 14), context while scanning a simple key (line 29, column 5)
Whenever I add 3 new commands in the config when I do /cshop list it doesn't show up it only shows up 2 command the example and the 2nd command but the 3rd doesn't show up
It will be fix
Gonna be fix
Paste your CrashDump or error by replacing this text (DON'T delete the backticks!)
Paste your CrashDump or error by replacing this text (DON'T delete the backticks!)
``` No CD
http://imgur.com/fEaB6XB
@remotevase all we hate leet,don't worry,we should repor them to INTERPOL (Its global LICENSE, so?)
16.08 20:35:05 [Server] Server thread/CRITICAL ErrorException: "Object of class BoxOfDevs\CommandShop\CShopCommand\CShopCommand could not be converted to string" (EXCEPTION) in "plugins/CommandShop_dev-115.phar/src/BoxOfDevs/CommandShop/CommandShop" at line 109
16.08 20:35:05 [Server] Server thread/DEBUG #0 (): pocketmine\utils\Utils::errorExceptionHandler(integer 4096, string[96] Object of class BoxOfDevs\CommandShop\CShopCommand\CShopCommand could not be con, string[128] phar:///plugins/CommandShop_dev-11, integer 109, array[2])
16.08 20:35:05 [Server] Server thread/DEBUG #1 plugins/CommandShop_dev-115.phar/src/BoxOfDevs/CommandShop/CommandShop(109): str_ireplace(array[1], array[1], string[77] {prefix}Tap the sign again to confirm that you want to buy the command {cmd}!)
16.08 20:35:05 [Server] Server thread/DEBUG #2 plugins/CommandShop_dev-115.phar/src/BoxOfDevs/CommandShop/CShopListener(82): BoxOfDevs\CommandShop\CommandShop->getMessage(string[77] {prefix}Tap the sign again to confirm that you want to buy the command {cmd}!, array[1])
16.08 20:35:05 [Server] Server thread/DEBUG #3 src/pocketmine/plugin/MethodEventExecutor(38): BoxOfDevs\CommandShop\CShopListener->onSignTouch(object pocketmine\event\player\PlayerInteractEvent)
16.08 20:35:05 [Server] Server thread/DEBUG #4 src/pocketmine/plugin/RegisteredListener(98): pocketmine\plugin\MethodEventExecutor->execute(object BoxOfDevs\CommandShop\CShopListener, object pocketmine\event\player\PlayerInteractEvent)
16.08 20:35:05 [Server] Server thread/DEBUG #5 src/pocketmine/event/Event(99): pocketmine\plugin\RegisteredListener->callEvent(object pocketmine\event\player\PlayerInteractEvent)
16.08 20:35:05 [Server] Server thread/DEBUG #6 src/pocketmine/level/Level(1914): pocketmine\event\Event->call()
16.08 20:35:05 [Server] Server thread/DEBUG #7 src/pocketmine/Player(2417): pocketmine\level\Level->useItemOn(object pocketmine\math\Vector3, object pocketmine\item\ItemBlock, integer 4, object pocketmine\math\Vector3, object pocketmine\Player, boolean 1)
16.08 20:35:05 [Server] Server thread/DEBUG #8 src/pocketmine/network/mcpe/PlayerNetworkSessionAdapter(150): pocketmine\Player->handleInventoryTransaction(object CortexPE\network\InventoryTransactionPacket)
16.08 20:35:05 [Server] Server thread/DEBUG #9 src/pocketmine/network/mcpe/protocol/InventoryTransactionPacket(158): pocketmine\network\mcpe\PlayerNetworkSessionAdapter->handleInventoryTransaction(object CortexPE\network\InventoryTransactionPacket)
16.08 20:35:05 [Server] Server thread/DEBUG #10 src/pocketmine/network/mcpe/PlayerNetworkSessionAdapter(110): pocketmine\network\mcpe\protocol\InventoryTransactionPacket->handle(object pocketmine\network\mcpe\PlayerNetworkSessionAdapter)
16.08 20:35:05 [Server] Server thread/DEBUG #11 src/pocketmine/network/mcpe/protocol/BatchPacket(123): pocketmine\network\mcpe\PlayerNetworkSessionAdapter->handleDataPacket(object CortexPE\network\InventoryTransactionPacket)
16.08 20:35:05 [Server] Server thread/DEBUG #12 src/pocketmine/network/mcpe/PlayerNetworkSessionAdapter(110): pocketmine\network\mcpe\protocol\BatchPacket->handle(object pocketmine\network\mcpe\PlayerNetworkSessionAdapter)
16.08 20:35:05 [Server] Server thread/DEBUG #13 src/pocketmine/Player(3126): pocketmine\network\mcpe\PlayerNetworkSessionAdapter->handleDataPacket(object pocketmine\network\mcpe\protocol\BatchPacket)
16.08 20:35:05 [Server] Server thread/DEBUG #14 src/pocketmine/network/mcpe/RakLibInterface(169): pocketmine\Player->handleDataPacket(object pocketmine\network\mcpe\protocol\BatchPacket)
16.08 20:35:05 [Server] Server thread/DEBUG #15 vendor/pocketmine/raklib/src/server/ServerHandler(99):
LOL, SET RICE... YES, SET ALL THE RICE... SOOO MUCCCHH RIICEEEEE
Go fix that silly typo xD
And thank you guys for making this plugin ! I hope this works smoothly for me <3
2017-02-24 [Tesseract] [00:18:56] INFO> [CommandTracker] /cshop buy example
2017-02-24 [Tesseract] [00:18:56] CRITICAL> Unhandled exception executing command 'cshop buy example' in cshop: Call to undefined function BoxOfDevs\CommandShop\getItem()
2017-02-24 [Tesseract] [00:18:56] CRITICAL> Error: "Call to undefined function BoxOfDevs\CommandShop\getItem()" (EXCEPTION) in "/plugins/CommandShop-master/src/BoxOfDevs/CommandShop/main" at line 121
info about my server... running tesseract, and this plugin, I did /cshop buy example & it throws this error... perhaps a small issue ?
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.