-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathCommandBalance.cs
54 lines (47 loc) · 1.27 KB
/
CommandBalance.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
using Rocket.API;
using Rocket.Core.Logging;
using Rocket.Unturned.Chat;
using Rocket.Unturned.Player;
using System;
using System.Collections.Generic;
namespace fr34kyn01535.Uconomy
{
public class CommandBalance : IRocketCommand
{
public string Help
{
get { return "Shows the current balance"; }
}
public string Name
{
get { return "balance"; }
}
public AllowedCaller AllowedCaller
{
get
{
return AllowedCaller.Both;
}
}
public string Syntax
{
get { return ""; }
}
public List<string> Aliases
{
get { return new List<string> { "saldo" }; }
}
public List<string> Permissions
{
get
{
return new List<string>() { "uconomy.balance" };
}
}
public void Execute(IRocketPlayer caller, params string[] command)
{
decimal balance = Uconomy.Instance.Database.GetBalance(caller.Id);
UnturnedChat.Say(caller, Uconomy.Instance.Translations.Instance.Translate("command_balance_show", balance, Uconomy.Instance.Configuration.Instance.MoneyName));
}
}
}