Git Product home page Git Product logo

friendssystem's Introduction

FriendSystem

FriendSystem is a powerful plugin designed for PocketMine-MP servers that have API 4 As well as API 5 Support, enabling players to efficiently manage their friends list and seamlessly send and accept friend requests. With this plugin, you can view the Features of FriendSystem in the Feature Section! Experience the ultimate friend management solution for your server with FriendSystem!

Features

  • Add and remove friends: Easily add or remove friends to your friend list.
  • Accept or reject friend requests: Accept or reject incoming friend requests from other players.
  • Send friend requests: Send friend requests to other players to connect with them.
  • Block friend requests: Toggle the ability to receive friend requests from others.
  • List friends: View a list of your current friends.
  • Online status notifications: Get notified when your friends come online or go offline.
  • Offline friend messaging: Send messages to your friends even if they are offline.
  • Persistent friend data: Friend list and settings are saved even after server restarts.
  • PM5: The plugin supports API 5 + API 4 Both!
Command Description
/friends accept <player> Accept a friend request
/friends reject <player> Reject a friend request
/friends invite <player> Send a friend request
/friends remove <player> Remove a friend
/friends list List your friends
/friends blocked <on/off> Toggle friend requests

Installation

  1. Download the latest version of the FriendSystem plugin.
  2. Place the plugin file in the plugins folder of your PocketMine-MP server.
  3. Start or reload the server.

-> You can Download FriendSystem By Poggit Too: https://poggit.pmmp.io/p/FriendsSystem

Usage

To use the FriendSystem plugin, players can execute the various commands listed above to manage their friends list. They can send friend requests, accept or reject requests, remove friends, and toggle friend request blocking.

Players will receive notifications when their friends come online or go offline.

Contributing

Contributions are welcome! If you have any bug reports, feature requests, or suggestions, please open an issue or submit a pull request on the FriendSystem!.

Owner/Credit

This plugin was developed by me, Shreyansh (@shreyop200). I have contributed to the development of the entire plugin, including features such as adding and removing friends, accepting or rejecting friend requests, sending friend requests, blocking friend requests, listing friends, online status notifications, and offline friend messaging. Feel free to explore my GitHub profile for more of my projects and contributions.

License

This plugin is released under the Apache License.

friendssystem's People

Contributors

shreyop200 avatar poggit-bot avatar

Stargazers

Henry Thierry avatar  avatar

Watchers

 avatar

Forkers

pm-pl gabbiswajit

friendssystem's Issues

MySQL Support

Hi, a nice plugin, but could you add MySQL support, I have already seen that you have another issue with the theme set to coming soon, if that is still the case I would like to know when you are doing that?

Suggestions

I thought the plugin was cool and all, not least because it is much better than another one from poggit, and I wanted to suggest adding additional features. They are not much of an improvement but I think with this the plugin could be richer and even better!

  1. Party system: I think one of the essential things would be a party system, let's say, you can create a party with your friends that you have and the leader of the party when executing a command, so that everyone would also execute at the same time, an idea would be to support within this context other plugins, blocking pvp (optional) and so on.

  2. Recommendation System: A good idea I thought would be to make an embedded form inside the plugin's panel with the name "Feed" where you can find new players that in this case would be online in the server and send friends to them, it would be a kind of discovery like in Facebook.

Well, these were some of the ideas, if I have more I'll open another issue or even comment inside this one, if you need help implementing these features I'm willing to help too, :D.

Argument #2 ($haystack) must be of type array

Thread: Main
Error: in_array(): Argument #2 ($haystack) must be of type array, bool given
File: plugins/FriendsSystem.phar/src/Shreyansh/FriendZone/FriendsZone
Line: 138
Type: TypeError
Backtrace:
#0 plugins/FriendsSystem.phar/src/Shreyansh/FriendZone/FriendsZone(138): in_array(string[9] Edgard013, false)
#1 pmsrc/src/command/PluginCommand(46): Shreyansh\FriendZone\FriendsZone->onCommand(object JackMD\NameSpaceRemover\CustomPlayer#1150231, object pocketmine\command\PluginCommand#60149, string[7] friends, array[2])
#2 pmsrc/src/command/SimpleCommandMap(212): pocketmine\command\PluginCommand->execute(object JackMD\NameSpaceRemover\CustomPlayer#1150231, string[7] friends, array[2])
#3 pmsrc/src/Server(1416): pocketmine\command\SimpleCommandMap->dispatch(object JackMD\NameSpaceRemover\CustomPlayer#1150231, string[24] friends invite piuupiuww)
#4 pmsrc/src/player/Player(1508): pocketmine\Server->dispatchCommand(object JackMD\NameSpaceRemover\CustomPlayer#1150231, string[24] friends invite piuupiuww)
#5 pmsrc/src/network/mcpe/handler/InGamePacketHandler(826): pocketmine\player\Player->chat(string[25] /friends invite piuupiuww)
#6 pmsrc/vendor/pocketmine/bedrock-protocol/src/CommandRequestPacket(55): pocketmine\network\mcpe\handler\InGamePacketHandler->handleCommandRequest(object pocketmine\network\mcpe\protocol\CommandRequestPacket#1192769)
#7 pmsrc/src/network/mcpe/NetworkSession(438): pocketmine\network\mcpe\protocol\CommandRequestPacket->handle(object pocketmine\network\mcpe\handler\InGamePacketHandler#958357)
#8 pmsrc/src/network/mcpe/NetworkSession(382): pocketmine\network\mcpe\NetworkSession->handleDataPacket(object pocketmine\network\mcpe\protocol\CommandRequestPacket#1192769, string[47] M./friends invite piuupiuww.jB.-g...n[..l.Z...F)
#9 pmsrc/src/network/mcpe/raklib/RakLibInterface(218): pocketmine\network\mcpe\NetworkSession->handleEncoded(string[103] ....O+.L.K)V..+.,IU(.,-...r.,....2KV.EOx.#......~....$.u...+xC..lO9m......@.....)
#10 pmsrc/vendor/pocketmine/raklib-ipc/src/RakLibToUserThreadMessageReceiver(40): pocketmine\network\mcpe\raklib\RakLibInterface->onPacketReceive(int 15, string[112] ...c.Q...S_k..%g7zs..^v..B....#..cd&.8....%..;.? ;..x.I...2".5..V.-o.e...m......)
#11 pmsrc/src/network/mcpe/raklib/RakLibInterface(110): raklib\server\ipc\RakLibToUserThreadMessageReceiver->handle(object pocketmine\network\mcpe\raklib\RakLibInterface#43957)
#12 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(120): pocketmine\network\mcpe\raklib\RakLibInterface->pocketmine\network\mcpe\raklib\{closure}()
#13 pmsrc/src/TimeTrackingSleeperHandler(58): pocketmine\snooze\SleeperHandler->processNotifications()
#14 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(79): pocketmine\TimeTrackingSleeperHandler->processNotifications()
#15 pmsrc/src/Server(1690): pocketmine\snooze\SleeperHandler->sleepUntil(float 1691151275.1618)
#16 pmsrc/src/Server(1064): pocketmine\Server->tickProcessor()
#17 pmsrc/src/PocketMine(334): pocketmine\Server->__construct(object pocketmine\thread\ThreadSafeClassLoader#3, object pocketmine\utils\MainLogger#6, string[6] /root/, string[14] /root/plugins/)
#18 pmsrc/src/PocketMine(357): pocketmine\server()
#19 pmsrc(11): require(string[50] phar:///root/PocketMine-MP.phar/src/PocketMine.php)

Code:
[129]                             break;
[130]                         }
[131]                         $invited = $args[1];
[132]                         if(($invitedPlayer = $this->getServer()->getPlayerExact($invited)) === null){
[133]                             $sender->sendMessage($this->prefix."§c".$invited." is not online");
[134]                             break;
[135]                         }
[136]                         $invitedfile = new Config($this->getDataFolder().$invited.".yml", Config::YAML);
[137]                         $invitations = $invitedfile->get("Invitations");
[138]                         if(in_array($sender->getName(), $invitations)){
[139]                             $sender->sendMessage($this->prefix."§cYou have already invited ".$invited." to be friends");
[140]                             break;
[141]                         }
[142]                         $invitations[] = $sender->getName();
[143]                         $invitedfile->set("Invitations", $invitations);
[144]                         $invitedfile->save();
[145]                         $sender->sendMessage($this->prefix."§aYou have invited ".$invited." to be friends");
[146]                         $invitedPlayer->sendMessage($this->prefix."§e".$sender->getName()." §ahas invited you to be friends. Type §a/friends accept ".$sender->getName()." §ato accept");
[147]                         break;
[148]                     case "remove":

fix this

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.