SetNet.Guilds
1.2.0
dotnet add package SetNet.Guilds --version 1.2.0
NuGet\Install-Package SetNet.Guilds -Version 1.2.0
<PackageReference Include="SetNet.Guilds" Version="1.2.0" />
<PackageVersion Include="SetNet.Guilds" Version="1.2.0" />
<PackageReference Include="SetNet.Guilds" />
paket add SetNet.Guilds --version 1.2.0
#r "nuget: SetNet.Guilds, 1.2.0"
#:package SetNet.Guilds@1.2.0
#addin nuget:?package=SetNet.Guilds&version=1.2.0
#tool nuget:?package=SetNet.Guilds&version=1.2.0
<p align="center"> <img src="https://raw.githubusercontent.com/Povstalez/SetNet/master/assets/icon.png" alt="SetNet" width="96"> </p>
SetNet.Guilds
Guilds / clans for SetNet — roles and a shared bank.
Create or join a guild, manage members with three roles (member / officer / leader), and share a guild bank — which is just a guild-keyed inventory in the same SetNet.Inventory hub, so deposits and withdrawals are atomic item moves with the same anti-dupe guarantees. Anyone deposits; officers and the leader withdraw and kick; the leader promotes, transfers, and disbands. Added by composition — no base class.
Install
dotnet add package SetNet
dotnet add package SetNet.Inventory
dotnet add package SetNet.Guilds
Usage
Call InventoryRuntime.Enable() and GuildRuntime.Enable() once at startup.
// server
InventoryRuntime.Enable(); GuildRuntime.Enable();
var inventory = server.UseInventory();
server.UseGuilds(inventory);
// client
InventoryRuntime.Enable(); GuildRuntime.Enable();
var guilds = client.UseGuilds();
guilds.MemberJoined += key => Log($"{key} joined");
guilds.MemberLeft += key => Log($"{key} left");
guilds.Disbanded += () => Log("guild disbanded");
string id = await guilds.CreateAsync("The Night Watch"); // creator = leader
// another player:
await guilds.JoinAsync(id);
await guilds.PromoteAsync(memberKey, GuildRole.Officer);
await guilds.BankDepositAsync("gold", 1000); // anyone can deposit
await guilds.BankWithdrawAsync("gold", 200); // officer/leader only
API
Server: server.UseGuilds(InventoryServer, IGuildStore?) → GuildServer.
Client: client.UseGuilds() → GuildClient
| Member | Purpose |
|---|---|
CreateAsync(name) / JoinAsync(guildId) / LeaveAsync() |
membership |
PromoteAsync(memberKey, role) / KickAsync(memberKey) |
management (leader / officer+) |
ListMembersAsync() |
members + roles |
BankDepositAsync(itemId, count) / BankWithdrawAsync(...) / BankListAsync() |
shared bank |
event MemberJoined / MemberLeft / Disbanded |
membership changes |
InventoryRuntime.Enable() + GuildRuntime.Enable() — one-time bootstrap.
Notes
- Rides the unified SetNet.Protocol messaging layer on the
Channels.Guildschannel (all modules share one envelope wire type,65447) — no per-module wire ids to reserve. Serializer-agnostic: the control protocol is hand-framedbyte[], your payloads use yourSetNetSerializer. - The bank is a keyed inventory. It lives under
guild:<id>in yourSetNet.Inventoryhub — deposits/withdrawals go throughTryRevokeAsync/GrantAsync, so they're atomic and can't dupe. Persist it by using a durableIInventoryStore. - Role rules. Deposit: any member. Withdraw / kick: officer or leader (and you can't kick an equal/higher rank). Promote / transfer / disband: leader. Promoting someone to
Leadertransfers leadership (you become officer). - Leaving. A leader who leaves passes leadership to the highest-ranked remaining member; the last member leaving disbands the guild and gets the bank contents back (nothing is destroyed).
- Persistence. Default
MemoryGuildStoreis per-process; implementIGuildStore(and a durableIInventoryStore) for guilds and banks that survive restarts.
Documentation & source
- 🐙 https://github.com/Povstalez/SetNet — full catalog in docs/MODULES.md
License
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- SetNet (>= 1.2.0)
- SetNet.Inventory (>= 1.2.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.2.0 | 132 | 8/5/2026 |