-
Notifications
You must be signed in to change notification settings - Fork 12
/
manual.txt
58 lines (42 loc) · 1.42 KB
/
manual.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
Manual:
> Creating and adding members to faction
- Faction and Member are chained together
To create new faction and add player to it, you must follow these instructions:
1) UltraFactions::createFaction($name, $data)
* $data must, contain 'displayName' key
* $data must, contain 'members' with leader member
2) Member::setRank(Member::RANK_LEADER);
3) Member::join(Faction)
Delete faction:
1) Faction::destroy();
To give leader to different player do:
1) Faction::newLeader(Member $member)
* Player must be attached to Faction before calling this
Demote player:
1) Member::demote()
Promote player:
1) Member::promote()
Kick player from faction:
1) Faction::kick(Member $member, $reason = '')
> Invitations
- When invitation is sent, delayed task
- Is scheduled to cancel it if it expires
- After time is passed task will
- notify Faction and Member about it
Invite player to faction:
1) Member::sendInvitation(Faction $f)
* Invitation expires in 15 seconds
Accept invitation:
1) Member::acceptInvitation();
* Latest invitation will be accepted
Decline:
2) Member::declineInvitation();
* Latest invitation will be declined
> Claiming and un-claiming plots
- When claiming plots functions will check
- if plot isn't claimed already or/and
- isn't in protected world
Claim:
1) Faction::claimPlot(FullChunk $chunk)
Unclaim:
1) Faction::unclaimPlot(FullChunk $chunk)