mirror of
https://git.muiegratis.online/suikoakari/Campofinale
synced 2025-12-15 02:54:35 +01:00
Now commands are transfering via base64, and teleport command can increase/decreae position (+ before cords value to increase and -- to decrease)
29 lines
840 B
C#
29 lines
840 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using Campofinale.Packets.Sc;
|
|
|
|
namespace Campofinale.Commands.Handlers
|
|
{
|
|
|
|
public static class CommandNickname
|
|
{
|
|
[Server.Command("nickname", "Changes nickname", true)]
|
|
public static void Handle(Player sender, string cmd, string[] args, Player target)
|
|
{
|
|
if (args.Length < 1)
|
|
{
|
|
CommandManager.SendMessage(sender, "Use: /nickname (your new nickname)");
|
|
return;
|
|
}
|
|
|
|
target.nickname = string.Join(" ", args);
|
|
target.Save();
|
|
target.Send(new PacketScSetName(target, target.nickname));
|
|
CommandManager.SendMessage(sender, $"Nickname was changed to {target.nickname}");
|
|
}
|
|
}
|
|
}
|