{"id":21221616,"url":"https://github.com/laith98dev/ffa","last_synced_at":"2025-08-25T18:39:10.182Z","repository":{"id":38390653,"uuid":"421845254","full_name":"Laith98Dev/FFA","owner":"Laith98Dev","description":"My FFA plugin ","archived":false,"fork":false,"pushed_at":"2024-01-20T17:44:36.000Z","size":261,"stargazers_count":12,"open_issues_count":2,"forks_count":6,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-10T18:05:51.768Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Laith98Dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2021-10-27T14:11:40.000Z","updated_at":"2025-05-15T20:19:37.000Z","dependencies_parsed_at":"2024-11-20T22:55:14.187Z","dependency_job_id":null,"html_url":"https://github.com/Laith98Dev/FFA","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Laith98Dev/FFA","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Laith98Dev%2FFFA","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Laith98Dev%2FFFA/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Laith98Dev%2FFFA/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Laith98Dev%2FFFA/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Laith98Dev","download_url":"https://codeload.github.com/Laith98Dev/FFA/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Laith98Dev%2FFFA/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272116052,"owners_count":24876264,"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","status":"online","status_checked_at":"2025-08-25T02:00:12.092Z","response_time":1107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-20T22:30:22.965Z","updated_at":"2025-08-25T18:39:10.156Z","avatar_url":"https://github.com/Laith98Dev.png","language":"PHP","funding_links":["https://paypal.me/Laith113"],"categories":[],"sub_categories":[],"readme":"\n\u003cdiv align=\"center\"\u003e\n\t\u003ch1\u003eFree For All\u003c/h1\u003e\n  \u003ch3\u003e(FFA, or Free for All) is a survival and fighting game where the game begins and you have to fight to survive.\u003c/h3\u003e\n\u003c/div\u003e\n\n# Dependencies\n- [BanCommands](https://poggit.pmmp.io/p/BanCommands)\n\n# How to create an arena\n- Teleport to the world who need to make an arena in it.\n- First, type `/ffa create \"your arena name\"` to create the arena.\n- Now go to the arena lobby and type `/ffa setlobby` to set it.\n- Okay, now go to the respawn position and type `/ffa setrespawn` that will return to it after death (you can turn it on or off from the config).\n- Use `/ffa reload` to load the arena.\n- Great, you are now ready to play. Type `/ffa join \"your arena name.\"` enjoy. If you want to leave the game, type `/ffa quit'.\n\n# the configure\n- \u003ch1\u003eFormats\u003c/h1\u003e \n- `{PLAYER}` : to get the player's name\n- `{ARENA} or {GAME}` : to get the arena name\n- `\u0026` : same as `§`\n- `{WORLD}` : to get the arena's world name\n- `{PLAYERS}` : to get arena players count\n- `{TIME}` : to get player protected time left\n- \u003ch1\u003eGeneral\u003c/h1\u003e\n- `scoreboardIp` : You can set your server IP to show it on the game scoreboard.\n- `banned-commands`: You can add the commands you want banned in the game.\n- `death-respawn-inMap` : That will return the player to the respawn position after death; you can set it to `true` or `false`.\n- `join-and-respawn-protected` : that will protect the player for 3 seconds after joining and respawning.\n- `protected-time` : to edit the protected time.\n- `protected-message` : to edit protect message.\n- `death-attack-message` : Here, you can set the death message when killed by someone.\n- `death-void-message` : and here you can set the death message when killed by void.\n- `join-message` : to edit player join message.\n- `leave-message` : to edit player leave message\n- `kills-messages` : To add or remove kill messages, this message will be sent to the player every 5 kills automatically.\n- `scoreboard-title` : to edit the scoreboard title name.\n- `provider` : Currently, it's supported `sqlite3` only; do not change it.\n- `database` : Do not change anything.\n- `kits` : You can edit the default kit right now, for example:\n```yaml\nkits:\n  default:\n    slot-0:\n      id: iron_sword\n      count: 1\n      enchants: []\n    slot-1:\n      id: golden_apple\n      count: 5\n      enchants: []\n    slot-2:\n      id: bow\n      count: 1\n      enchants: []\n    slot-3:\n      id: arrow\n      count: 15\n      enchants: []\n    helmet:\n      id: iron_helmet\n      enchants: []\n    chestplate:\n      id: iron_chestplate\n      enchants:\n        id-0:\n          level: 2\n    leggings:\n      id: iron_leggings\n      enchants: []\n    boots:\n      id: iron_boots\n      enchants: []\n```\n\n# Commands\nCommand | Description | Permission\n--- | --- | ---\n`/ffa join \u003cArenaName:optional\u003e` | `To join a specific or random arena` | `No permission`\n`/ffa quit` | `To leave the arena` | `No permission`\n`/ffa help` | `To see the command list` | `ffa.command.admin`\n`/ffa create` | `To create a new arena` | `ffa.command.admin`\n`/ffa remove` | `To delete a specific arena` | `ffa.command.admin`\n`/ffa setlobby` | `To set the lobby position in the arena` | `ffa.command.admin`\n`/ffa setrespawn` | `To set the respawn position in the arena` | `ffa.command.admin`\n`/ffa reload` | `re-loaded the kits and arenas` | `ffa.command.admin`\n`/ffa list` | `To see the arenas list` | `ffa.command.admin`\n\n# API\nAs of v2.0.0, all the API functions have moved to [API](https://github.com/Laith98Dev/FFA/blob/main/src/Laith98Dev/FFA/API.php).\n```php\nuse Laith98Dev\\FFA\\API;\nuse Laith98Dev\\FFA\\utils\\ClosureResult;\n\n// add kills to the player\nAPI::addKill($PlayerOrPlayerName, $amount, function (ClosureResult $result){\n    if($result-\u003egetStatus() == ClosureResult::STATE_SUCCESS){\n        echo \"Added `$amount` kills to the player successfully.\" . PHP_EOL;\n    } else {\n        echo \"Failed to add kills to the player; reason: \" . $result-\u003egetValue() . PHP_EOL;\n    }\n});\n\n// add deaths to player\nAPI::addDeath($PlayerOrPlayerName, $amount, function (ClosureResult $result){\n    if($result-\u003egetStatus() == ClosureResult::STATE_SUCCESS){\n        echo \"Added `$amount` deaths to the player successfully.\" . PHP_EOL;\n    } else {\n        echo \"Failed to add deaths to the player; reason: \" . $result-\u003egetValue() . PHP_EOL;\n    }\n});\n\n// get player kills\nAPI::getKills($PlayerOrPlayerName, function (ClosureResult $result){\n    if($result-\u003egetStatus() == ClosureResult::STATE_SUCCESS){\n        echo \"Player kills is \" . $result-\u003egetValue() . PHP_EOL;\n    } else {\n        echo \"Failed to get player kills; reason: \" . $result-\u003egetValue() . PHP_EOL;\n    }\n});\n\n// get player deaths\nAPI::getDeaths($PlayerOrPlayerName, function (ClosureResult $result){\n    if($result-\u003egetStatus() == ClosureResult::STATE_SUCCESS){\n        echo \"Player deaths is \" . $result-\u003egetValue() . PHP_EOL;\n    } else {\n        echo \"Failed to get player deaths; reason: \" . $result-\u003egetValue() . PHP_EOL;\n    }\n});\n\n// Check if an arena exists\nAPI::isValidArena($arena_name, function (ClosureResult $result){\n    if($result-\u003egetValue()){\n        echo \"Arena exists\" . PHP_EOL;\n    } else {\n        echo \"Arena doesn't exist.\" . PHP_EOL;\n    }\n});\n\n```\n\n# Other\n- [![tutorial](https://img.shields.io/youtube/views/SwzWwsrGG74?label=Tutorial\u0026style=social)](https://www.youtube.com/watch?v=SwzWwsrGG74\u0026ab_channel=LaithYoutuber)\n- [![Donate](https://img.shields.io/badge/donate-Paypal-yellow.svg?style=flat-square)](https://paypal.me/Laith113)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaith98dev%2Fffa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flaith98dev%2Fffa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaith98dev%2Fffa/lists"}