mirror of
https://github.com/Impostor/Impostor.git
synced 2026-10-20 01:46:11 +00:00
Move events to better directories
This commit is contained in:
1 parent
e2ae918596
commit
c749a84910
18 files changed
+23
-11
No files matched your search
@@ -66,6 +66,13 @@ Make sure to get a prerelease if you are writing a plugin for a dev release of t
|
||||
5. Search for `Impostor.Api`.
|
||||
6. Click the `Impostor.Api` result and press install on the right side.
|
||||
|
||||
### Dotnet CLI
|
||||
|
||||
> Make sure to grab the latest (pre-)release version from NuGet [here](https://www.nuget.org/packages/Impostor.Api).
|
||||
|
||||
1. Open your project folder in command prompt / bash.
|
||||
2. Run `dotnet add package Impostor.Api -v "1.2.0-ci.58"`.
|
||||
|
||||
## 4. The plugin class
|
||||
|
||||
Now the `Impostor.Api` is installed, you need to create a class for your plugin. A plugin **must** contain exactly one. See the code below for an example.
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
using Impostor.Api.Games;
|
||||
using Impostor.Api.Net.Inner.Objects;
|
||||
|
||||
namespace Impostor.Api.Events
|
||||
namespace Impostor.Api.Events.Meeting
|
||||
{
|
||||
public class MeetingEndedEvent : IEvent
|
||||
{
|
||||
File renamed without changes.
+1
-1
@@ -1,7 +1,7 @@
|
||||
using Impostor.Api.Games;
|
||||
using Impostor.Api.Net.Inner.Objects;
|
||||
|
||||
namespace Impostor.Api.Events
|
||||
namespace Impostor.Api.Events.Player
|
||||
{
|
||||
public class PlayerChatEvent : IGameEvent
|
||||
{
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
using Impostor.Api.Games;
|
||||
using Impostor.Api.Net.Inner.Objects;
|
||||
|
||||
namespace Impostor.Api.Events.Net
|
||||
namespace Impostor.Api.Events.Player
|
||||
{
|
||||
public class PlayerDestroyedEvent : IGameEvent
|
||||
{
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
using Impostor.Api.Games;
|
||||
using Impostor.Api.Net;
|
||||
|
||||
namespace Impostor.Api.Events
|
||||
namespace Impostor.Api.Events.Player
|
||||
{
|
||||
public class PlayerJoinedGameEvent : IGameEvent
|
||||
{
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
using Impostor.Api.Games;
|
||||
using Impostor.Api.Net;
|
||||
|
||||
namespace Impostor.Api.Events
|
||||
namespace Impostor.Api.Events.Player
|
||||
{
|
||||
public class PlayerLeftGameEvent : IGameEvent
|
||||
{
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
using Impostor.Api.Games;
|
||||
|
||||
namespace Impostor.Api.Events
|
||||
namespace Impostor.Api.Events.Player
|
||||
{
|
||||
public class PlayerMovementEvent : IGameEvent
|
||||
{
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
using Impostor.Api.Games;
|
||||
using Impostor.Api.Net.Inner.Objects;
|
||||
|
||||
namespace Impostor.Api.Events.Net
|
||||
namespace Impostor.Api.Events.Player
|
||||
{
|
||||
public class PlayerSpawnedEvent : IGameEvent
|
||||
{
|
||||
@@ -3,6 +3,7 @@
|
||||
@using Impostor.Api.Events.Managers
|
||||
@using Impostor.Api.Games.Managers
|
||||
@using Impostor.Api.Events
|
||||
@using Impostor.Api.Events.Player
|
||||
@implements Impostor.Api.Events.IEventListener
|
||||
@inject IEventManager EventManager
|
||||
@inject IGameManager GameManager
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using Impostor.Api.Events;
|
||||
using Impostor.Api.Events.Player;
|
||||
|
||||
namespace Impostor.Plugins.Example.Handlers
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using Impostor.Api.Events;
|
||||
using Impostor.Api.Events.Meeting;
|
||||
|
||||
namespace Impostor.Plugins.Example.Handlers
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Impostor.Api.Events;
|
||||
using Impostor.Api.Events.Net;
|
||||
using Impostor.Api.Events.Player;
|
||||
|
||||
namespace Impostor.Plugins.Example.Handlers
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.1</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Impostor.Api\Impostor.Api.csproj"/>
|
||||
</ItemGroup>
|
||||
|
||||
@@ -4,6 +4,7 @@ using System.Threading.Tasks;
|
||||
using Impostor.Api;
|
||||
using Impostor.Api.Events;
|
||||
using Impostor.Api.Events.Managers;
|
||||
using Impostor.Api.Events.Meeting;
|
||||
using Impostor.Api.Net;
|
||||
using Impostor.Api.Net.Messages;
|
||||
using Impostor.Server.Net.State;
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Threading.Tasks;
|
||||
using Impostor.Api;
|
||||
using Impostor.Api.Events;
|
||||
using Impostor.Api.Events.Managers;
|
||||
using Impostor.Api.Events.Net;
|
||||
using Impostor.Api.Events.Player;
|
||||
using Impostor.Api.Innersloth;
|
||||
using Impostor.Api.Net;
|
||||
using Impostor.Api.Net.Inner.Objects;
|
||||
|
||||
@@ -4,7 +4,7 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Impostor.Api;
|
||||
using Impostor.Api.Events;
|
||||
using Impostor.Api.Events.Net;
|
||||
using Impostor.Api.Events.Player;
|
||||
using Impostor.Api.Innersloth;
|
||||
using Impostor.Api.Net.Messages;
|
||||
using Impostor.Api.Net.Messages.S2C;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using System.Threading.Tasks;
|
||||
using Impostor.Api;
|
||||
using Impostor.Api.Events;
|
||||
using Impostor.Api.Events.Player;
|
||||
using Impostor.Api.Innersloth;
|
||||
using Impostor.Api.Net;
|
||||
using Impostor.Api.Net.Messages;
|
||||
|
||||
Reference in new issue
Block a user