Skip to content

๐ŸŽ‰ A parties plugin for PocketMine-MP servers

License

Notifications You must be signed in to change notification settings

CTMCentral/Parties

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Download the plugin on poggit: Poggit
Join my GitHub discord server: Discord

Parties

๐ŸŽ‰ A parties plugin for PocketMine-MP servers

Available features

  • 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.

In-game pictures

Party Menu Your Party Party Member Party Options Invite a player Party Chat

Commands

  • /party โ€” Opens the party form
  • /party (message) โ€” Sends a message to the party chat

Code examples

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);
    }
}

About

๐ŸŽ‰ A parties plugin for PocketMine-MP servers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%