mirror of
https://github.com/modernuo/ModernUO
synced 2026-08-11 22:23:06 -04:00
32 lines
615 B
C#
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);
|
|
}
|
|
}
|