Placeholders:
- %clansystem_member_rank% - Displays the clan rank of a member.
- %clansystem_tag% - Displays the clan tag.
- %clansystem_name% - Displays the clan name.
- %clansystem_member_count% - Displays the clan member count.
Don't forget to depend my plugin in your plugin.yml, if you want to use my api.
Code (Text):
name: YourPlugin
main: path
version: 1.0
description: Info
depend: [ClanSystem]
ClanCreator
Code (Java):
// Example usage of the ClanCreator class
ClanCreator clanCreator
=
new ClanCreator
(
)
;
// Set the name of the clan
clanCreator.
setClanName
(
"Warriors"
)
;
// Set the maximum number of members (optional)
clanCreator.
setClanMaxMemberSize
(
50
)
;
// Set the maximum number of moderators (optional)
clanCreator.
setClanMaxModeratorSize
(
5
)
;
// Set the owner of the clan
// Replace "player-uuid" with the actual player's UUID and 123 with their unique database ID
clanCreator.
setClanOwner
(
"player-uuid",
123
)
;
// Set the clan's tag (optional)
clanCreator.
setTag
(
"WRR"
)
;
// Attempt to create the clan
ClanCreatorStatus status
= clanCreator.
create
(
)
;
// Handle the result
switch
(status
)
{
case SUCCESS
:
System.
out.
println
(
"Clan created successfully!"
)
;
break
;
case PLAYER_HAS_OWN_CLAN
:
System.
out.
println
(
"Player already owns a clan."
)
;
break
;
case PLAYER_IS_INSIDE_A_CLAN
:
System.
out.
println
(
"Player is already part of another clan."
)
;
break
;
case CLAN_ALREADY_EXIST
:
System.
out.
println
(
"A clan with this name or tag already exists."
)
;
break
;
case ERROR
:
System.
out.
println
(
"An error occurred while creating the clan."
)
;
break
;
}
For further information, please join our Discord. I have created a forum with an API guide.
![[IMG]](//proxy.spigotmc.org/3ba4022b91e200f69beb10d3fef6dc53b490e095/68747470733a2f2f692e696d6775722e636f6d2f71756f6f306b342e706e67)
If you have any questions or need assistance with ClanSystem, feel free to join our Discord Server for support, updates, and community discussions
Terms of Service:
You are not allowed to publish my code in any other form.
Errors are not written in a review but can be posted via private message or discussion.
You are not permitted to sell, give or redistribute this plugin
You can't claim this plugin as your own