{"id":15707315,"url":"https://github.com/endermanbugzjfc/forminteractionfix","last_synced_at":"2025-05-12T19:48:28.783Z","repository":{"id":107499746,"uuid":"550408557","full_name":"Endermanbugzjfc/FormInteractionFix","owner":"Endermanbugzjfc","description":"Form interaction spam blocker. Works everywhere on your server and no setup required.","archived":false,"fork":false,"pushed_at":"2023-06-03T18:32:41.000Z","size":2605,"stargazers_count":6,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-01T02:52:04.106Z","etag":null,"topics":["delay","dialog","dialogue","fix","form","gui","interaction","npc","pm","pocketmine","ui"],"latest_commit_sha":null,"homepage":"https://poggit.pmmp.io/p/FormInteractionFix","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Endermanbugzjfc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-12T18:05:21.000Z","updated_at":"2023-12-13T00:57:28.000Z","dependencies_parsed_at":"2024-10-24T07:47:04.864Z","dependency_job_id":"86cefd7c-3b3d-4387-9d31-a95a803d6bbe","html_url":"https://github.com/Endermanbugzjfc/FormInteractionFix","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Endermanbugzjfc%2FFormInteractionFix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Endermanbugzjfc%2FFormInteractionFix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Endermanbugzjfc%2FFormInteractionFix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Endermanbugzjfc%2FFormInteractionFix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Endermanbugzjfc","download_url":"https://codeload.github.com/Endermanbugzjfc/FormInteractionFix/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253810209,"owners_count":21967872,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["delay","dialog","dialogue","fix","form","gui","interaction","npc","pm","pocketmine","ui"],"created_at":"2024-10-03T20:39:50.839Z","updated_at":"2025-05-12T19:48:28.753Z","avatar_url":"https://github.com/Endermanbugzjfc.png","language":"PHP","readme":"# \u003cimg src=\"https://github.com/Endermanbugzjfc/FormInteractionFix/blob/master/assets/icon.jpeg\" width=75/ title=\"Credit: from windows93.net\"\u003e Form Interaction Fix\n[![CI](https://github.com/Endermanbugzjfc/FormInteractionFix/actions/workflows/main.yml/badge.svg)](https://github.com/Endermanbugzjfc/FormInteractionFix/actions/workflows/main.yml)\n[![Please click here to report a problem.](https://img.shields.io/github/issues-raw/Endermanbugzjfc/FormInteractionFix)](https://github.com/Endermanbugzjfc/FormInteractionFix/issues/new)\n# Interaction spam\n## Explanation\nInteraction spam is often a problem for players who use the mouse as their input.\nTry to interact (right-click) while facing a block.\nYou may notice that PlayerInteractEvent is called many times in a short period.\nIf a plugin opens its form on interaction, these players will see the form opens more than once.\n\n## Problem demo (before installing)\n![Before installing FormInteractionFix](https://github.com/Endermanbugzjfc/FormInteractionFix/blob/master/assets/problem.gif)\n\n## Fix demo (after installing)\n![After installing FormInteractionFix](https://github.com/Endermanbugzjfc/FormInteractionFix/blob/master/assets/fix.gif)\n\n# The fix\nThis plugin blocks interaction when a form opens.\n(NPC dialogues will be supported soon™.) By listening for packets and cancelling interaction events after a form is sent to the player.\nUntil the player responds to (or closes) it.\n\n# Potential problems\nThis plugin relies on packets very much. And can malfunction if a client does not respond with the correct packet. For instance, official clients would not open a form in that the JSON of its packet is invalid. Eventually, the client can neither react to any form nor make any interaction.\n\n# Inclusiveness\nAs this plugin is driven by packets, it works for all forms, no matter which plugin creates them.\n\n# Disclaimer\nThis plugin cannot prevent any malicious attacks or behaviours.\n\n# Developer note\n## Depending on this plugin\nYour plugin can depend on this plugin instead of verbosely implementing an interaction cool down on your own.\n\n## await-generator \u0026 await-std\nBoth were made by [@SOF3](https://github.com/SOF3):\n- [await-generator](https://github.com/SOF3/await-generator):  brings async/awaits to PHP. (Version ^3.4.3 is required because it fixes the [Traverser error.](https://github.com/SOF3/await-generator/pull/184))\n- [await-std](https://github.com/SOF3/await-std): enables the use of PM API in async/await style, such as tasks and events.\n\nDo not worry when you see unusual code like `while (true)` and `yield`. It will not block the thread. Instead, `yield` can pause the code flow and make it behaves like concurrency.\n\n## IntegratedTest.php\nPerforms integrated tests with [FakePlayer by Muqsit](https://github.com/muqsit/fakeplayer). Please refer to the [doc comments](https://github.com/Endermanbugzjfc/FormInteractionFix/blob/b38e413e1de56660c4a2ba99e2f1498258cae3ad/IntegratedTest.php#L34-L48) in it for more details.\n\n## PHPStan \u0026 PHP-CS-Fixer\nCommon PHP dev tools:\n- [PHPStan](https://github.com/phpstan/phpstan): lint. (static code check.)\n- [PHP-CS-Fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer): fixes code standard. (Format code, replace FQCN with `use`, etc... Do not get confused with [PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer)!)\n\n# Credit\n- Icon from https://windows93.net\n- Thanks [@alvin0319](https://github.com/alvin0319) for providing me environment to perform live tests and record the demos.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fendermanbugzjfc%2Fforminteractionfix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fendermanbugzjfc%2Fforminteractionfix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fendermanbugzjfc%2Fforminteractionfix/lists"}