Download the plugin on poggit:
Join my GitHub discord server:
๐ A parties plugin for PocketMine-MP servers
- A complete parties API for developers (with custom events)
- Usage of forms to manage the parties
- Customizable party options:
- Set the maximum party slots
- Disable the pvp (player versus player) within the members of the party.
- Teleport the party members to the party leader when the leader gets teleported to a different world.
- Teleport the party members to the party leader when the leader gets transfered to another server.
- Make all the party members execute the same command as the party leader.
- /party โ Opens the party form
- /party (message) โ Sends a message to the party chat
Setting the gamemode to spectator to all the members of the party when the party leader invites a player to join their party:
public function onPartyInvite(PartyInviteEvent $event): void {
$session = $event->getSession();
if($session->isPartyLeader()) {
foreach($session->getParty()->getMembers() as $member) {
$member->getPlayer()->setGamemode(Player::SPECTATOR);
}
}
}
Allow only players with the permission 'slots.limit' to set the maximum slots to more than 3:
public function onUpdateSlots(PartyUpdateSlotsEvent $event): void {
$session = $event->getSession();
if(!$session->getPlayer()->hasPermission("slots.limit") and $event->getSlots() > 3) {
$event->setCancelled();
$session->message("{RED}You do not have permissions to set the maximum slots to more than 3!");
}
}
Setting the party public when an operator joins the party:
public function onPartyJoin(PartyJoinEvent $event): void {
if($event->getSession()->getPlayer()->isOp()) {
$event->getParty()->setPublic(true);
}
}