This commit is contained in:
Leath Cooper 2024-12-15 10:54:58 -05:00
parent ec12eb037d
commit 85aad626d5
6 changed files with 235 additions and 0 deletions

View file

@ -0,0 +1,32 @@
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);
}
}