Skip to content
This repository has been archived by the owner on Mar 14, 2021. It is now read-only.

Commit

Permalink
o
Browse files Browse the repository at this point in the history
  • Loading branch information
XtraCube committed Dec 19, 2020
1 parent 0573857 commit 6a37c48
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
2 changes: 1 addition & 1 deletion AllOfUs/AllOfUs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace XtraCube.Plugins.AllofUs
version: "2.0.0")]
public class AllOfUsPlugin : PluginBase
{
private readonly ILogger<AllOfUsPlugin> _logger;
private readonly ILogger<AllOfUsPlugin> _logger;

public AllOfUsPlugin(ILogger<AllOfUsPlugin> logger, IEventManager eventManager)
{
Expand Down
15 changes: 4 additions & 11 deletions AllOfUs/GameEventListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ public async void OnLobbyCreate(IPlayerSpawnedEvent e)
public async void OnPlayerChat(IPlayerChatEvent e)
{
string[] args = e.Message.Trim().Split(" ");
string name = e.PlayerControl.PlayerInfo.PlayerName;
byte color = e.PlayerControl.PlayerInfo.ColorId;
if (e.Game.GameState == GameStates.NotStarted)
{
switch (args[0])
Expand Down Expand Up @@ -174,8 +172,7 @@ public async void OnPlayerChat(IPlayerChatEvent e)
{
if (args.Length > 1)
{
int limit;
bool tryLimit = int.TryParse(args[1], out limit);
bool tryLimit = int.TryParse(args[1], out int limit);
if (tryLimit)
{
if (limit < 127 && limit > 0)
Expand Down Expand Up @@ -216,8 +213,7 @@ public async void OnPlayerChat(IPlayerChatEvent e)
{
if (args.Length > 1)
{
int limit;
bool tryLimit = int.TryParse(args[1], out limit);
bool tryLimit = int.TryParse(args[1], out int limit);
if (tryLimit)
{
if (limit < 127 && limit > 4)
Expand Down Expand Up @@ -252,7 +248,7 @@ public async void OnPlayerChat(IPlayerChatEvent e)
case "/map":
if (e.ClientPlayer.IsHost)
{
if (args.Length > 1)
if (args.Length > 1)
{
string mapname = args[1];
switch (mapname)
Expand Down Expand Up @@ -288,10 +284,7 @@ public async void OnPlayerChat(IPlayerChatEvent e)
await SendMessage(e.PlayerControl, "/map {map}\nSet the map without making a new lobby! Maps: Skeld, Mira/MiraHQ, Polus");
}
}
else
{
await SendMessage(e.PlayerControl, "[FF0000FF] You can't use that command!");
}
else await SendMessage(e.PlayerControl, "[FF0000FF] You can't use that command!");
break;
case "/about":
await SendMessage(e.PlayerControl, "All of Us is a 100 Player Mod for Among Us developed by XtraCube and Pure, and is based on a mod by andry08.");
Expand Down

0 comments on commit 6a37c48

Please sign in to comment.