{"id":18022025,"url":"https://github.com/emilkrebs/playerprefs","last_synced_at":"2025-04-04T17:47:21.782Z","repository":{"id":44761081,"uuid":"452071308","full_name":"emilkrebs/PlayerPrefs","owner":"emilkrebs","description":"An easy tool to set / get player preferences for each player in spigot ","archived":false,"fork":false,"pushed_at":"2022-06-09T14:35:50.000Z","size":63,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-10T03:13:40.154Z","etag":null,"topics":["easy-to-use","minecraft-plugin","spigot-plugin","tool"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/emilkrebs.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}},"created_at":"2022-01-25T23:05:12.000Z","updated_at":"2023-09-07T21:44:00.000Z","dependencies_parsed_at":"2022-08-29T22:01:43.922Z","dependency_job_id":null,"html_url":"https://github.com/emilkrebs/PlayerPrefs","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emilkrebs%2FPlayerPrefs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emilkrebs%2FPlayerPrefs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emilkrebs%2FPlayerPrefs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emilkrebs%2FPlayerPrefs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emilkrebs","download_url":"https://codeload.github.com/emilkrebs/PlayerPrefs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247226198,"owners_count":20904464,"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":["easy-to-use","minecraft-plugin","spigot-plugin","tool"],"created_at":"2024-10-30T06:11:49.091Z","updated_at":"2025-04-04T17:47:21.759Z","avatar_url":"https://github.com/emilkrebs.png","language":"Java","funding_links":["https://www.buymeacoffee.com/emilkrebs"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/emilkrebs/PlayerPrefs\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\n    \u003cimg width=\"720\" src=\"https://user-images.githubusercontent.com/68400102/151151267-dd5b6834-dd7c-46f2-b2f3-a56c8f620b49.png\" alt=\"PlayerPrefs logo\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\u003cdiv id=\"badges\" align=\"center\"\u003e\n  \n   ![Price](https://img.shields.io/badge/price-FREE-34D058)\n   [![Build](https://github.com/emilkrebs/PlayerPrefs/actions/workflows/build.yml/badge.svg)](https://github.com/emilkrebs/PlayerPrefs/actions/workflows/build.yml)\n\n\u003c/div\u003e\n\u003chr\u003e\n\u003ca href=\"https://www.buymeacoffee.com/emilkrebs\" target=\"_blank\"\u003e\u003cimg src=\"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png\" alt=\"Buy Me A Coffee\" style=\"height: 60px !important;width: 217px !important;\" \u003e\u003c/a\u003e\n\nPlayerPrefs is an easy tool to get and set custom preferences for each player and save them in a yaml file.\n\n## Getting started\nDownload the newest build from [releases](https://github.com/emilkrebs/PlayerPrefs/releases/). Now add the jar file as module to your project.\n\nAfter that import using:\n```Java\nimport org.qeston.playerprefs.utils.PlayerPrefs;\n```\n\n## Examples\nHave a look at the [EasyMoneySystem](https://github.com/emilkrebs/EasyMoneySystem) example. \n\nThis code example will count the deaths and kills of a player:\n```Java\n@EventHandler\npublic void onDeath(PlayerDeathEvent event) {\n    Player killed = e.getEntity();\n    Player killer = killed.getKiller();\n    int deaths = PlayerPrefs.getInt(killed, \"deaths\") + 1;\n    int kills = PlayerPrefs.getInt(killer, \"kills\") + 1;\n    PlayerPrefs.setInt(killed, \"deaths\", deaths);\n    PlayerPrefs.setInt(killer, \"kills\", kills);\n}\n```\n\n\n## Methods\n\n| Method        | Description   |\n| ------------- |:------------- |\n| getConfiguration| Get the Yaml Configuration for the player.                     |\n| getFile       | Get the file where all the player preferences for the player are saved. |\n| deleteKey     | Delete a key from the player's preference file.                         |\n| hasKey        | Check if the key exists in the player's preference file.                |\n| set           | Set the value of a single key in the player's preference file as Object.|\n| setString     | Set the value of a single key in the player's preference file as string.|\n| setInt        | Set the value of a single key in the player's preference file as integer.|\n| setFloat      | Set the value of a single key in the player's preference file as float. |\n| get           | Get the value of a single key in the player's preference file as Object.|\n| getString     | Get the value of a single key in the player's preference file as string.|\n| getInt        | Get the value of a single key in the player's preference file as integer.|\n| getFloat      | Get the value of a single key in the player's preference file as float. |\n\n\n## Known Issues\n\nNone\n\n[Add Issue](https://github.com/emilkrebs/PlayerPrefs/issues/new)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femilkrebs%2Fplayerprefs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femilkrebs%2Fplayerprefs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femilkrebs%2Fplayerprefs/lists"}