generated from AriasCreations/vsmodtemplate
Release 1.0.3
Fix: Permissions on /homes Add: /back
This commit is contained in:
parent
1f43ffaa6c
commit
3e0896f5f9
5 changed files with 97 additions and 8 deletions
|
@ -20,6 +20,8 @@ namespace AriasServerUtils
|
|||
|
||||
internal static Dictionary<string, PlayerStorage> mPlayerData = new Dictionary<string, PlayerStorage>();
|
||||
|
||||
internal static BackCaches backCaches = new BackCaches();
|
||||
|
||||
internal static Warps serverWarps = new Warps();
|
||||
|
||||
|
||||
|
@ -87,7 +89,7 @@ namespace AriasServerUtils
|
|||
api.ChatCommands.Create("sethome").RequiresPlayer().WithArgs(parsers.OptionalWord("name")).WithDescription("Creates a home").RequiresPrivilege(Privilege.chat).HandleWith(Events.HandleSetHome);
|
||||
api.ChatCommands.Create("home").RequiresPlayer().WithArgs(parsers.OptionalWord("name")).WithDescription("Teleports you to home").RequiresPrivilege(Privilege.chat).HandleWith(Events.HandleGoHome);
|
||||
api.ChatCommands.Create("delhome").RequiresPlayer().WithArgs(parsers.OptionalWord("name")).WithDescription("Deletes a home entry").RequiresPrivilege(Privilege.chat).HandleWith(Events.HandleDelHome);
|
||||
api.ChatCommands.Create("homes").RequiresPlayer().WithDescription("Lists your homes").RequiresPrivilege(Privilege.controlserver).HandleWith(Events.HandleListHomes);
|
||||
api.ChatCommands.Create("homes").RequiresPlayer().WithDescription("Lists your homes").RequiresPrivilege(Privilege.chat).HandleWith(Events.HandleListHomes);
|
||||
|
||||
api.ChatCommands.Create("asu")
|
||||
.RequiresPrivilege(Privilege.chat)
|
||||
|
@ -118,6 +120,14 @@ namespace AriasServerUtils
|
|||
.WithDescription("DANGER: This updates the flag allowing anybody to create warps, even non-admins. It is recommended to leave this alone. The default is true/on/yes")
|
||||
.HandleWith(Events.HandleUpdateASUMgrWarps)
|
||||
.EndSubCommand()
|
||||
.BeginSubCommand("maxback")
|
||||
.RequiresPrivilege(Privilege.controlserver)
|
||||
.WithArgs(
|
||||
parsers.OptionalInt("max")
|
||||
)
|
||||
.WithDescription("Max number of back positions cached for players")
|
||||
.HandleWith(Events.HandleUpdateASUMaxBack)
|
||||
.EndSubCommand()
|
||||
.EndSubCommand()
|
||||
.BeginSubCommand("help")
|
||||
.RequiresPrivilege(Privilege.chat)
|
||||
|
@ -129,6 +139,13 @@ namespace AriasServerUtils
|
|||
api.ChatCommands.Create("warp").RequiresPlayer().RequiresPrivilege(Privilege.chat).WithDescription("Warp to the specified server warp").WithArgs(parsers.OptionalWord("name")).HandleWith(Events.HandleWarp);
|
||||
api.ChatCommands.Create("delwarp").RequiresPlayer().RequiresPrivilege(Privilege.chat).WithDescription("Deletes the specified warp").WithArgs(parsers.OptionalWord("name")).HandleWith(Events.HandleWarpDelete);
|
||||
api.ChatCommands.Create("warps").RequiresPlayer().RequiresPrivilege(Privilege.chat).WithDescription("Lists all server warps").HandleWith(Events.HandleWarpList);
|
||||
|
||||
api.ChatCommands.Create("back").RequiresPlayer().RequiresPrivilege(Privilege.chat).WithDescription("Returns you to the last location you were at").HandleWith(Events.HandleBack);
|
||||
}
|
||||
|
||||
public static void NewBackCacheForPlayer(IServerPlayer player)
|
||||
{
|
||||
backCaches.AddPosition(player.PlayerName, PlayerPosition.from(player.Entity));
|
||||
}
|
||||
|
||||
private void OnPlayerDC(IServerPlayer byPlayer)
|
||||
|
@ -172,6 +189,8 @@ namespace AriasServerUtils
|
|||
PlayerInventory inv = new PlayerInventory();
|
||||
var invMgr = player.InventoryManager;
|
||||
|
||||
NewBackCacheForPlayer(player);
|
||||
|
||||
|
||||
var iBackpackSlotNum = 0;
|
||||
foreach (var type in saveInvTypes)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue