modernuo/Projects/AddonExample/Addon.cs
Leath Cooper 85aad626d5 tutorial
2024-12-15 10:54:58 -05:00

32 lines
615 B
C#

using Server.Accounting;
namespace Server.Addon;
public class Addon
{
public static void Configure()
{
// ModernUO lifecycle hook before world loads
EventSink.AccountLogin += AccountLogin;
}
public static void Initialize()
{
// ModernUO lifecycle hook after world loads
}
public static void AccountLogin(AccountLoginEventArgs e)
{
if (Accounts.GetAccount(e.Username) is not Account account)
{
return;
}
if (!account.Young)
{
return;
}
account.RemoveYoungStatus(0);
}
}