Git Product home page Git Product logo

tebex's People

Contributors

muqsit avatar sn3akrr avatar xlordshadow avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

tebex's Issues

Ability to leave xbox auth deactivated

Hey, I need to have xbox auth disabled in order for the Proxy to work.
Is there a possibility to make the plugin also work with xbox auth disabled.
I made some changes in the plugin so that the plugin would work anyways, but maybe you can change it so that it works automatically.

I think this was the error I was getting after updating to the newest version of your Plugin:
2021-07-16 [15:58:21] [Server thread/CRITICAL]: ErrorException: "Undefined offset: 71064" (EXCEPTION) in "plugins/Tebex/src/muqsit/tebex/handler/due/playerslist/OfflineTebexDuePlayersList" at line 31 2021-07-16 [15:58:21] [Server thread/CRITICAL]: #0 plugins/Tebex/src/muqsit/tebex/handler/due/playerslist/OfflineTebexDuePlayersList(31): pocketmine\utils\Utils::errorExceptionHandler(integer 8, string[23] Undefined offset: 71064, string[109] /home/GameServer/CBNova/plugins/Tebex/src/muqsit/tebex/handler/due/playerslist/O, integer 31, array[2]) 2021-07-16 [15:58:21] [Server thread/CRITICAL]: #1 plugins/Tebex/src/muqsit/tebex/handler/due/playerslist/OfflineTebexDuePlayersList(44): muqsit\tebex\handler\due\playerslist\OfflineTebexDuePlayersList->get(object ManagerSystem\utils\EGPlayer) 2021-07-16 [15:58:21] [Server thread/CRITICAL]: #2 plugins/Tebex/src/muqsit/tebex/handler/due/playerslist/TebexDuePlayersListListener(25): muqsit\tebex\handler\due\playerslist\OfflineTebexDuePlayersList->onPlayerJoin(object ManagerSystem\utils\EGPlayer) 2021-07-16 [15:58:21] [Server thread/CRITICAL]: #3 pmsrc/src/pocketmine/plugin/MethodEventExecutor(42): muqsit\tebex\handler\due\playerslist\TebexDuePlayersListListener->onPlayerLogin(object pocketmine\event\player\PlayerLoginEvent) 2021-07-16 [15:58:21] [Server thread/CRITICAL]: #4 pmsrc/src/pocketmine/plugin/RegisteredListener(80): pocketmine\plugin\MethodEventExecutor->execute(object muqsit\tebex\handler\due\playerslist\TebexDuePlayersListListener, object pocketmine\event\player\PlayerLoginEvent) 2021-07-16 [15:58:21] [Server thread/CRITICAL]: #5 pmsrc/src/pocketmine/event/Event(88): pocketmine\plugin\RegisteredListener->callEvent(object pocketmine\event\player\PlayerLoginEvent)

Remove pocketmine dependencies from tebex/api

tebex/api must contain only the raw Tebex API requests and responses and code must only read the responses (and not manipulate it in any way). Any code which wishes to do so must come under tebex/handler, and methods such as TebexCommand::asOnlineFormattedString should be removed as they aren't really a part of the API that Tebex offers, but rather a result of manipulation of API responses.
This will also make the task of extracting tebex/api into a separate library/virion easier.

Did u fixed the spam issue?

I mean the issue which spams in the console the command executed when found due players, not sure if you know it. Sometimes appear sometimes doesnt thats why im asking and not testing.

Undefined offset: 98550

A player by a package on my buycraft shop.

I do the command /tebex dropall ig (at this moment the buyer was offline).
After, when the buyers want to join the server, there are Internal serveur error :

"Undefined offset: 98550" in "plugins/Tebex-master/src/muqsit/handler/due/playersList/OnlineTebexDuePlayerList" at line 35.

Crash when a player purchases a rank

All the ranges I have put have a money amount and the / setgroup of pureperms

Apparently there is a problem with EconomyAPI and it gave me an error

[18:42:34] [Server thread/INFO]: FastestSeal8851 ha sido añadido al grupo.
[18:42:34] [Server thread/INFO]: Executed online command #352011217: setgroup "FastestSeal8851" Hades
[18:42:34] [Server thread/CRITICAL]: ErrorException: "Undefined index: tebex" (EXCEPTION) in "plugins/EconomyAPI (2).phar/src/onebone/economyapi/EconomyAPI" at line 103
[18:42:34] [Server thread/CRITICAL]: #0 plugins/EconomyAPI (2).phar/src/onebone/economyapi/EconomyAPI(103): pocketmine\utils\Utils::errorExceptionHandler(integer 8, string[22] Undefined index: tebex, string[120] phar:///plugins/EconomyAPI (2).ph, integer 103, array[3])
[18:42:34] [Server thread/CRITICAL]: #1 plugins/EconomyAPI (2).phar/src/onebone/economyapi/command/GiveMoneyCommand(48): onebone\economyapi\EconomyAPI->getMessage(string[20] givemoney-gave-money, array[2], string[5] tebex)
[18:42:34] [Server thread/CRITICAL]: #2 pmsrc/src/pocketmine/command/SimpleCommandMap(248): onebone\economyapi\command\GiveMoneyCommand->execute(object muqsit\tebex\handler\command\TebexCommandSender, string[9] givemoney, array[0])
[18:42:34] [Server thread/CRITICAL]: #3 pmsrc/src/pocketmine/Server(1809): pocketmine\command\SimpleCommandMap->dispatch(object muqsit\tebex\handler\command\TebexCommandSender, string[33] givemoney "FastestSeal8851" 20000)
[18:42:34] [Server thread/CRITICAL]: #4 plugins/Tebex-master/src/muqsit/tebex/handler/due/session/TebexPlayerSession(93): pocketmine\Server->dispatchCommand(object muqsit\tebex\handler\command\TebexCommandSender, string[33] givemoney "FastestSeal8851" 20000)
[18:42:34] [Server thread/CRITICAL]: #5 plugins/Tebex-master/src/muqsit/tebex/handler/due/session/TebexPlayerSession(59): muqsit\tebex\handler\due\session\TebexPlayerSession->instantlyExecuteOnlineCommand(object muqsit\tebex\api\queue\commands\online\TebexQueuedOnlineCommand, object muqsit\tebex\api\queue\TebexDuePlayer)
[18:42:34] [Server thread/CRITICAL]: #6 plugins/Tebex-master/src/muqsit/tebex/handler/due/TebexDueCommandsHandler(100): muqsit\tebex\handler\due\session\TebexPlayerSession->executeOnlineCommand(object muqsit\tebex\api\queue\commands\online\TebexQueuedOnlineCommand, object muqsit\tebex\api\queue\TebexDuePlayer, object Closure)
[18:42:34] [Server thread/CRITICAL]: #7 plugins/Tebex-master/src/muqsit/tebex/thread/response/TebexResponseSuccessHolder(34): muqsit\tebex\handler\due\TebexDueCommandsHandler->muqsit\tebex\handler\due\{closure}(object muqsit\tebex\api\queue\commands\online\TebexQueuedOnlineCommandsInfo)
[18:42:34] [Server thread/CRITICAL]: #8 plugins/Tebex-master/src/muqsit/tebex/thread/TebexThread(233): muqsit\tebex\thread\response\TebexResponseSuccessHolder->trigger(object muqsit\tebex\thread\response\TebexResponseHandler)
[18:42:34] [Server thread/CRITICAL]: #9 plugins/Tebex-master/src/muqsit/tebex/thread/TebexThreadPool(92): muqsit\tebex\thread\TebexThread->collectPending()
[18:42:34] [Server thread/CRITICAL]: #10 plugins/Tebex-master/src/muqsit/tebex/thread/TebexThreadPool(26): muqsit\tebex\thread\TebexThreadPool->collectThread(object muqsit\tebex\thread\TebexThread)
[18:42:34] [Server thread/CRITICAL]: #11 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(113): muqsit\tebex\thread\TebexThreadPool->muqsit\tebex\thread\{closure}()
[18:42:34] [Server thread/CRITICAL]: #12 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(75): pocketmine\snooze\SleeperHandler->processNotifications()
[18:42:34] [Server thread/CRITICAL]: #13 pmsrc/src/pocketmine/Server(2155): pocketmine\snooze\SleeperHandler->sleepUntil(double 1619975473.0502)
[18:42:34] [Server thread/CRITICAL]: #14 pmsrc/src/pocketmine/Server(1992): pocketmine\Server->tickProcessor()
[18:42:34] [Server thread/CRITICAL]: #15 pmsrc/src/pocketmine/Server(1586): pocketmine\Server->start()
[18:42:34] [Server thread/CRITICAL]: #16 pmsrc/src/pocketmine/PocketMine(291): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[48] /, string[56] /plugins/)
[18:42:34] [Server thread/CRITICAL]: #17 pmsrc/src/pocketmine/PocketMine(321): pocketmine\server()
[18:42:34] [Server thread/CRITICAL]: #18 pmsrc(11): require(string[103] phar:///custom-php7.4.phar/src/po)

Startup Error

[19:50:41.332] [Server thread/CRITICAL]: Error: "Class "muqsit\tebexapi\TebexApiStatics" not found" (EXCEPTION) in "plugins/Tebex-pmmp-api4.phar/src/muqsit/tebex/Loader" at line 39

--- Stack trace ---
#0 pmsrc/src/plugin/PluginBase(137): muqsit\tebex\Loader->onEnable()
#1 pmsrc/src/plugin/PluginManager(445): pocketmine\plugin\PluginBase->onEnableStateChange(true)
#2 pmsrc/src/Server(1386): pocketmine\plugin\PluginManager->enablePlugin(object muqsit\tebex\Loader#25321)
#3 pmsrc/src/Server(1012): pocketmine\Server->enablePlugins(object pocketmine\plugin\PluginEnableOrder#24904)
#4 pmsrc/src/PocketMine(304): pocketmine\Server->__construct(object BaseClassLoader#3, object pocketmine\utils\MainLogger#2, string[24] /home/minecraft/Season3/, string[32] /home/minecraft/Season3/plugins/)
#5 pmsrc/src/PocketMine(327): pocketmine\server()
#6 pmsrc(11): require(string[68] phar:///home/minecraft/Season3/PocketMine-MP.phar/src/PocketMine.php)
--- End of exception information ---

Operation timed out after 5001 milliseconds with 0 bytes received

PM 4.0

[01:10:28.586] [Server thread/CRITICAL]: muqsit\tebexapi\utils\TebexException: "cURL request failed {28): Operation timed out after 5001 milliseconds with 0 bytes received" (EXCEPTION) in "/root/server/virions/TebexAPI-master/src/muqsit/tebexapi/connection/handler/SimpleTebexConnectionHandler" at line 44

Tebex plugin causing crash due to XUID retrieval failure

Hey there,

I hope you're doing well. I wanted to report an issue related to the Tebex plugin. It seems that the plugin is causing a crash on my PocketMine-MP server. The crash log indicates that the crash is caused by the Tebex plugin failing to retrieve the XUID (Xbox User ID) of a player named "GAB BISWAJIT".

Steps to Reproduce:

Install the Tebex plugin on a PocketMine-MP server.
Have a player named "GAB BISWAJIT" join the server.
Crash Details:

PocketMine-MP version: 5.11.0 [Protocol 649]
Tebex plugin version: 0.1.10
PHP version: 8.2.13
OS: Linux
Error: Cannot retrieve XUID of player: GAB BISWAJIT

Additional Information:
I've included all the relevant details from the crash log above. Please let me know if you need any further information or if there's anything I can do to assist in resolving this issue.

Thank you for your attention to this matter.

Bug

I have a bug, please fi
image
x

muqsit\tebex\libs\muqsit\tebexapi\utils\TebexException: "cURL request failed {28):

[19:26:08.351] [Server thread/CRITICAL]: muqsit\tebex\libs\muqsit\tebexapi\utils\TebexException: "cURL request failed {28): Resolving timed out after 5000 milliseconds" (EXCEPTION) in "plugins/Tebex_dev-45.phar/src/muqsit/tebex/libs/muqsit/tebexapi/connection/handler/SimpleTebexConnectionHandler" at line 45
--- Stack trace ---
#0 plugins/Tebex_dev-45.phar/src/muqsit/tebex/thread/TebexThread(101): muqsit\tebex\libs\muqsit\tebexapi\connection\handler\SimpleTebexConnectionHandler->handle(object muqsit\tebex\libs\muqsit\tebexapi\connection\request\TebexRequestHolder#219128, array[4])
#1 pmsrc/src/thread/CommonThreadPartsTrait(93): muqsit\tebex\thread\TebexThread->onRun()
#2 (): pocketmine\thread\Thread->run()
--- End of exception information ---

IMPORTANT : It is not crashing my server but my console is full of these!

Question

I'm just wondering but is this tebex plugin a forked from the original tebex plugin that can be downloaded from the tebex site? Since Tebex keeps track and collect details so they can use it when people chargeback from the store

Handle HTTP and cURL errors

cURL errors (such as timeouts) and unexpected HTTP response codes due to server side issues should be logged as debug messages.

2020-09-20 [01:42:25] [Server thread/CRITICAL]: muqsit\tebex\thread\TebexException: "Expected response code 200, got 502" (EXCEPTION) in "plugins/Tebex_v0.0.1.phar/src/muqsit/tebex/thread/TebexThread" at line 151
2020-09-20 [01:42:25] [Server thread/CRITICAL]: #0 (): muqsit\tebex\thread\TebexThread->run()

Do not log server-side errors in non-debug mode

Response codes starting with the digit 5 are server-side errors (as opposed to client-side errors) and are not our concern, at least not in production.
They should be ignored instead.

[23:14:07.777] [Server thread/CRITICAL]: muqsit\tebexapi\utils\TebexException: "Expected response code 200, got 502" (EXCEPTION) in "pmsrc/virions/TebexAPI-master/src/muqsit/tebexapi/connection/handler/SimpleTebexConnectionHandler" at li
ne 57
--- Stack trace ---
  #0 plugins/Tebex-master/src/muqsit/tebex/thread/TebexThread(101): muqsit\tebexapi\connection\handler\SimpleTebexConnectionHandler->handle(object muqsit\tebexapi\connection\request\TebexRequestHolder#574313, array[4])
  #1 pmsrc/src/thread/CommonThreadPartsTrait(93): muqsit\tebex\thread\TebexThread->onRun()
  #2 (): pocketmine\thread\Thread->run()
--- End of exception information ---

Lag..

This plugin down my server proformance can you please make the Plugin a little bit stable?

Implement events

Plugin developers may want to cancel processing packages until players have logged in (HereAuth), until custom player data is fetched asynchronously...

public function onTebexOnlinePlayerPurchase(TebexOnlinePlayerPurchaseEvent $event) : void{
	if($this->manager->isLocked($event->getPlayer())){
		// Will keep trying to process this package
		// everytime plugin checks for pending packages
		// until the event isn't cancelled.
		$event->setCancelled();
	}
}

to implement a custom rewarding system that does not rely on tebex's enforced command execution...

public const PACKAGE_RANDOM_LOOT = 1337;

/**
 * @param TebexOnlinePlayerPurchaseEvent $event
 * @priority MONITOR
 * @ignoreCancelled true
 */
public function onTebexOnlinePlayerPurchase(TebexOnlinePlayerPurchaseEvent $event) : void{
	if($event->getPackage()->getId() === self::PACKAGE_RANDOM_LOOT){
		LootTables::getRandom()->reward($event->getPlayer());
	}
}

or simply logging.

/**
 * @param TebexPlayerPurchaseEvent $event
 * @priority MONITOR
 * @ignoreCancelled true
 */
public function onTebexPlayerPurchase(TebexPlayerPurchaseEvent $event) : void{
	$this->logTebexPurchaseToDiscord(
		$event->getPackage(),
		$event->getPlayer(),
		$event->getCommands()
	);
}

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.