-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathPlugin.cs
55 lines (50 loc) · 2.3 KB
/
Plugin.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
55
using Rocket.API.Collections;
using Rocket.Core.Plugins;
using System.Collections.Generic;
using System.Linq;
namespace Arechi.CallVote
{
public class Plugin : RocketPlugin<Configuration>
{
public static Plugin Instance;
public List<IVote> Votes;
protected override void Load()
{
Instance = this;
Votes = Configuration.Instance.Votes.Where(v => v.Enabled).Select(v => new Vote(v)).ToList<IVote>();
}
protected override void Unload()
{
Instance = null;
}
public override TranslationList DefaultTranslations => new TranslationList
{
{ "VOTE_CHAT_FORMAT", "[Vote: {color}{vote}{/color}] {color}{text}{/color}" },
{ "VOTE_HELP", "You can vote or start a vote with /cvote <vote name | vote alias>" },
{ "VOTE_HELP_READY", "Ready votes: {0}" },
{ "VOTE_HELP_ONGOING", "Ongoing votes: {0}" },
{ "VOTE_HELP_COOLINGDOWN", "Votes in cooldown: {0}" },
{ "START", "Started | Vote with /cv {0}" },
{ "COOLING_DOWN", "This vote is cooling down!: {0}s" },
{ "NOT_ENOUGH_ARGUMENTS", "You need at least {0} arguments to start this vote!" },
{ "NOT_ENOUGH_PLAYERS", "You need at least {0} players to start this vote!" },
{ "NO_PERMISSION", "You are missing the required permission to start this vote!" },
{ "RESULT", "{0}% | Required: {1}% | Vote with /cv {2}" },
{ "FAILURE", "Failed!" },
{ "SUCCESS", "Successful!" },
{ "COOLDOWN", "In cooldown for {0}s" },
{ "READY", "Ready!" },
{ "VOTE_NOT_FOUND", "Could not find vote {0}!" },
//Custom vote commands
{ "AIRDROP_ALL", "Everyone received an airdrop!" },
{ "HEAL_ALL", "Everyone has been healed!" },
{ "ITEM_ALL", "Everyone received an item!: {0}" },
{ "MAX_SKILLS", "Everyone's skills have been maxed out!" },
{ "VEHICLE_ALL", "Everyone received a vehicle!: {0}" },
{ "ITEM_ALL_RECEIVED", "You received an item!: {0}" },
{ "VEHICLE_ALL_RECEIVED", "You received a vehicle!: {0}" },
{ "RANDOM_ITEM", "Random item" },
{ "RANDOM_VEHICLE", "Random vehicle" }
};
}
}