Empostor renamed

This commit is contained in:
linmeideli committed 2026-05-22 20:19:49 +08:00
1 parent 06ee138799
commit 39da783fe0
598 files changed
+2101 -1936

No files matched your search

+5 -5
View File
@@ -17,13 +17,13 @@ Thank you for your interest in contributing! We welcome bug reports, feature sug
```bash
git clone https://github.com/your-org/Empostor.git
cd Empostor
dotnet build src/Impostor.sln
dotnet build src/Empostor.sln
```
### Run locally
```bash
dotnet run --project src/Core/Impostor.Server
dotnet run --project src/Core/Empostor.Server
```
---
@@ -66,10 +66,10 @@ dotnet run --project src/Core/Impostor.Server
## Writing a Plugin
Plugins implement `PluginBase` + `IPluginStartup` and reference `Impostor.Api`.
Plugins implement `PluginBase` + `IPluginStartup` and reference `Empostor.Api`.
```csharp
[ImpostorPlugin("com.example.myplugin", "My Plugin", "Author", "1.0.0")]
[EmpostorPlugin("com.example.myplugin", "My Plugin", "Author", "1.0.0")]
public sealed class MyPlugin : PluginBase
{
public override ValueTask EnableAsync()
@@ -82,7 +82,7 @@ public sealed class MyPlugin : PluginBase
See **[docs/Writing-a-plugin.md](docs/Writing-a-plugin.md)** for the full guide.
Custom commands can be registered by injecting `CommandService` and calling `Register(new MyCommand())`. The `ICommand` interface lives in `Impostor.Api.Commands` so plugins can use it without referencing `Impostor.Server`.
Custom commands can be registered by injecting `CommandService` and calling `Register(new MyCommand())`. The `ICommand` interface lives in `Empostor.Api.Commands` so plugins can use it without referencing `Empostor.Server`.
---
+8 -8
View File
@@ -9,9 +9,9 @@ ARG VERSIONSUFFIX="docker"
WORKDIR /source
# Copy csproj and restore.
COPY src/Impostor.Server/Impostor.Server.csproj ./src/Impostor.Server/Impostor.Server.csproj
COPY src/Impostor.Api.Innersloth.Generator/Impostor.Api.Innersloth.Generator.csproj ./src/Impostor.Api.Innersloth.Generator/Impostor.Api.Innersloth.Generator.csproj
COPY src/Impostor.Api/Impostor.Api.csproj ./src/Impostor.Api/Impostor.Api.csproj
COPY src/Empostor.Server/Empostor.Server.csproj ./src/Empostor.Server/Empostor.Server.csproj
COPY src/Empostor.Api.Innersloth.Generator/Empostor.Api.Innersloth.Generator.csproj ./src/Empostor.Api.Innersloth.Generator/Empostor.Api.Innersloth.Generator.csproj
COPY src/Empostor.Api/Empostor.Api.csproj ./src/Empostor.Api/Empostor.Api.csproj
COPY src/Directory.Build.props ./src/Directory.Build.props
RUN case "$TARGETARCH" in \
@@ -20,9 +20,9 @@ RUN case "$TARGETARCH" in \
arm) NETCORE_PLATFORM='linux-arm';; \
*) echo "unsupported architecture"; exit 1 ;; \
esac && \
dotnet restore -r "$NETCORE_PLATFORM" ./src/Impostor.Server/Impostor.Server.csproj && \
dotnet restore -r "$NETCORE_PLATFORM" ./src/Impostor.Api.Innersloth.Generator/Impostor.Api.Innersloth.Generator.csproj && \
dotnet restore -r "$NETCORE_PLATFORM" ./src/Impostor.Api/Impostor.Api.csproj
dotnet restore -r "$NETCORE_PLATFORM" ./src/Empostor.Server/Empostor.Server.csproj && \
dotnet restore -r "$NETCORE_PLATFORM" ./src/Empostor.Api.Innersloth.Generator/Empostor.Api.Innersloth.Generator.csproj && \
dotnet restore -r "$NETCORE_PLATFORM" ./src/Empostor.Api/Empostor.Api.csproj
# Copy everything else.
COPY src/. ./src/
@@ -33,7 +33,7 @@ RUN case "$TARGETARCH" in \
*) echo "unsupported architecture"; exit 1 ;; \
esac && \
[ $VERSIONSUFFIX = "none" ] && VERSIONSUFFIX=; \
dotnet publish -c release -o /app -r "$NETCORE_PLATFORM" -p:VersionSuffix="$VERSIONSUFFIX" --no-restore ./src/Impostor.Server/Impostor.Server.csproj
dotnet publish -c release -o /app -r "$NETCORE_PLATFORM" -p:VersionSuffix="$VERSIONSUFFIX" --no-restore ./src/Empostor.Server/Empostor.Server.csproj
# Final image.
FROM --platform=$TARGETPLATFORM mcr.microsoft.com/dotnet/aspnet:8.0
@@ -44,4 +44,4 @@ COPY --from=build /app ./
ENV ASPNETCORE_URLS=
EXPOSE 22023/tcp 22023/udp
ENTRYPOINT ["./Impostor.Server"]
ENTRYPOINT ["./Empostor.Server"]
+16 -16
View File
@@ -35,7 +35,7 @@ else
//////////////////////////////////////////////////////////////////////
// Remove unnecessary files for packaging.
private void ImpostorPublish(string name, string project, string runtime, bool isServer = false) {
private void EmpostorPublish(string name, string project, string runtime, bool isServer = false) {
var projBuildDir = buildDir.Combine(name + "_" + runtime);
var projBuildName = name + "_" + buildVersion + "_" + runtime;
@@ -55,7 +55,7 @@ private void ImpostorPublish(string name, string project, string runtime, bool i
CreateDirectory(projBuildDir.Combine("libraries"));
if (runtime == "win-x64") {
FileWriteText(projBuildDir.CombineWithFilePath("run.bat"), "@echo off\r\nImpostor.Server.exe\r\npause");
FileWriteText(projBuildDir.CombineWithFilePath("run.bat"), "@echo off\r\nEmpostor.Server.exe\r\npause");
}
}
@@ -70,7 +70,7 @@ private void ImpostorPublish(string name, string project, string runtime, bool i
}
}
private void ImpostorPublishNF(string name, string project) {
private void EmpostorPublishNF(string name, string project) {
var runtime = "win-x64";
var projBuildDir = buildDir.Combine(name + "_" + runtime);
var projBuildZip = buildDir.CombineWithFilePath(name + "_" + buildVersion + "_" + runtime + ".zip");
@@ -101,15 +101,15 @@ Task("Clean")
Task("Restore")
.Does(() => {
DotNetRestore("./src/Impostor.sln");
DotNetRestore("./src/Empostor.sln");
});
Task("Replay")
.Does(() => {
// D:\Projects\GitHub\Impostor\Impostor\src\Impostor.Tools.ServerReplay\sessions
// D:\Projects\GitHub\Empostor\Empostor\src\Empostor.Tools.ServerReplay\sessions
DotNetRun(
"./src/Impostor.Tools.ServerReplay/Impostor.Tools.ServerReplay.csproj",
"./src/Impostor.Tools.ServerReplay/sessions", new DotNetRunSettings {
"./src/Empostor.Tools.ServerReplay/Empostor.Tools.ServerReplay.csproj",
"./src/Empostor.Tools.ServerReplay/sessions", new DotNetRunSettings {
Configuration = configuration,
NoRestore = true,
});
@@ -121,19 +121,19 @@ Task("Build")
.IsDependentOn("Replay")
.Does(() => {
// Tests.
DotNetBuild("./src/Impostor.Tests/Impostor.Tests.csproj", new DotNetBuildSettings {
DotNetBuild("./src/Empostor.Tests/Empostor.Tests.csproj", new DotNetBuildSettings {
Configuration = configuration,
});
// Server.
ImpostorPublish("Impostor-Server", "./src/Impostor.Server/Impostor.Server.csproj", "win-x64", true);
ImpostorPublish("Impostor-Server", "./src/Impostor.Server/Impostor.Server.csproj", "osx-x64", true);
ImpostorPublish("Impostor-Server", "./src/Impostor.Server/Impostor.Server.csproj", "linux-x64", true);
ImpostorPublish("Impostor-Server", "./src/Impostor.Server/Impostor.Server.csproj", "linux-arm", true);
ImpostorPublish("Impostor-Server", "./src/Impostor.Server/Impostor.Server.csproj", "linux-arm64", true);
EmpostorPublish("Empostor-Server", "./src/Empostor.Server/Empostor.Server.csproj", "win-x64", true);
EmpostorPublish("Empostor-Server", "./src/Empostor.Server/Empostor.Server.csproj", "osx-x64", true);
EmpostorPublish("Empostor-Server", "./src/Empostor.Server/Empostor.Server.csproj", "linux-x64", true);
EmpostorPublish("Empostor-Server", "./src/Empostor.Server/Empostor.Server.csproj", "linux-arm", true);
EmpostorPublish("Empostor-Server", "./src/Empostor.Server/Empostor.Server.csproj", "linux-arm64", true);
// API.
DotNetPack("./src/Impostor.Api/Impostor.Api.csproj", new DotNetPackSettings {
DotNetPack("./src/Empostor.Api/Empostor.Api.csproj", new DotNetPackSettings {
Configuration = configuration,
OutputDirectory = buildDir,
IncludeSource = true,
@@ -144,7 +144,7 @@ Task("Build")
if (BuildSystem.GitHubActions.IsRunningOnGitHubActions) {
foreach (var file in GetFiles(buildDir + "/*.{nupkg,snupkg}"))
{
BuildSystem.GitHubActions.Commands.UploadArtifact(file, "Impostor.Api");
BuildSystem.GitHubActions.Commands.UploadArtifact(file, "Empostor.Api");
}
}
});
@@ -152,7 +152,7 @@ Task("Build")
Task("Test")
.IsDependentOn("Build")
.Does(() => {
DotNetTest("./src/Impostor.Tests/Impostor.Tests.csproj", new DotNetTestSettings {
DotNetTest("./src/Empostor.Tests/Empostor.Tests.csproj", new DotNetTestSettings {
Configuration = configuration,
NoBuild = true
});
+2 -2
View File
@@ -130,11 +130,11 @@ Toggles a game between Public and Private. This affects whether the room appears
## Plugin Marketplace
Fetches the plugin list from the URL configured in `Admin.MarketplaceUrl` (a raw GitHub JSON file). For each plugin, the latest version, supported Impostor version, and description are shown.
Fetches the plugin list from the URL configured in `Admin.MarketplaceUrl` (a raw GitHub JSON file). For each plugin, the latest version, supported Empostor version, and description are shown.
Clicking **Install** downloads the `.dll` to the `plugins/` folder. The server must be restarted to load the new plugin.
If the plugin was built for a different Impostor version, a warning is displayed but installation is not blocked.
If the plugin was built for a different Empostor version, a warning is displayed but installation is not blocked.
---
+5 -5
View File
@@ -1,13 +1,13 @@
# Building from source
The solution contains the Impostor server and its dependencies, like Hazel and the plugin API. The server is built using [.NET 8](https://dotnet.microsoft.com/download/dotnet/8.0).
The solution contains the Empostor server and its dependencies, like Hazel and the plugin API. The server is built using [.NET 8](https://dotnet.microsoft.com/download/dotnet/8.0).
## Cloning Impostor
## Cloning Empostor
You need to clone Impostor using git:
You need to clone Empostor using git:
```bash
git clone https://github.com/Impostor/Impostor.git
git clone https://github.com/Empostor/Empostor.git
```
## Building the server
@@ -20,7 +20,7 @@ git clone https://github.com/Impostor/Impostor.git
### Build using the CLI
```bash
cd src/Impostor.Server/
cd src/Empostor.Server/
dotnet build
# Or if you want a single file, ready for production: (change linux-x64 to win-x64 if you use Windows)
dotnet publish -c Release -r linux-x64 -p:PublishSingleFile=true
+2 -2
View File
@@ -6,7 +6,7 @@ The Empostor project is a reverse engineered and open source server for the game
## Can this be used with the mobile version of the game?
Yes, Empostor can be used with both the Android and iOS versions of the game. You can add a custom server via a link, you can do this using the [site](https://impostor.github.io/Impostor)
Yes, Empostor can be used with both the Android and iOS versions of the game. You can add a custom server via a link, you can do this using the [site](https://empostor.github.io/Empostor)
## Can this be used with the console version of the game?
@@ -18,6 +18,6 @@ No, it's an entirely different game with a completely different network stack. S
## How can I get started?
See [Setting up your Server](Running-the-server.md) for more information on running the server and [Client Setup](https://impostor.github.io/Impostor/) for helping your friends join in!
See [Setting up your Server](Running-the-server.md) for more information on running the server and [Client Setup](https://empostor.github.io/Empostor/) for helping your friends join in!
If you're having issues with the server software, check the [Troubleshooting page](TROUBLESHOOTING.md).
+2 -2
View File
@@ -7,7 +7,7 @@ Empostor serves a customisable home page at `http://your-server:22023/`.
On startup, the server checks for a `Pages/` directory next to the executable. If it does not exist it is created automatically, and a default `index.html` is written into it.
```
Impostor.Server (binary)
Empostor.Server (binary)
Pages/
index.html ← served at GET /
```
@@ -31,7 +31,7 @@ The generated default page contains:
- A status indicator showing the server is online
- A link to the admin panel (`/admin`)
- A link to the [region file generator](https://impostor.github.io/Impostor)
- A link to the [region file generator](https://empostor.github.io/Empostor)
- The server start time
## Notes
+1 -1
View File
@@ -1,6 +1,6 @@
# HTTP Server
Since Impostor 1.9.0 a HTTP service is included for matchmaking, which is required for clients to connect to the Empostor server.
Since Empostor 1.9.0 a HTTP service is included for matchmaking, which is required for clients to connect to the Empostor server.
Starting from Among Us 16.0.5, you need to set up HTTPS for players to connect to your server.
Unfortunately Empostor doesn't handle SSL certificates, so you need to set up a reverse proxy.
+3 -3
View File
@@ -25,11 +25,11 @@ The admin panel plugin marketplace reads `marketplace/plugins.json` at startup.
// Semantic version of this plugin release
"version": "1.0.0",
// Minimum Empostor / Impostor version required
"impostor_version": "2.0.0",
// Minimum Empostor / Empostor version required
"empostor_version": "2.0.0",
// Direct download URL for the .dll file
"download_url": "https://raw.githubusercontent.com/Empostor/Empostor/master/marketplace/Impostor.Plugins.Welcome.dll"
"download_url": "https://raw.githubusercontent.com/Empostor/Empostor/master/marketplace/Empostor.Plugins.Welcome.dll"
}
]
}
+1 -1
View File
@@ -1,4 +1,4 @@
# Impostor Documentation
# Empostor Documentation
1. [Running the server](Running-the-server.md)
2. [Server configuration](Server-configuration.md)
+2 -2
View File
@@ -6,7 +6,7 @@ There are currently two install methods for Empostor: You can install it normall
This section applies to both the normal installation as well as the Docker (Compose) installation
To connect to the server, you need to configure and install a region file on https://impostor.github.io/Impostor/
To connect to the server, you need to configure and install a region file on https://empostor.github.io/Empostor/
Among Us connects to the server using two network services: the (TCP) HTTP service points Among Us to the UDP service, then the UDP service hosts the actual game traffic. Because of this, Empostor uses port 22023 using **both** the TCP and UDP protocols.
@@ -22,7 +22,7 @@ Depending on your host you may also need to port forward Empostor to the interne
2. Download the [latest release](https://github.com/HayashiUme/Empostor/releases) or the [latest CI build](https://nightly.link/HayashiUme/Empostor/workflows/ci/master). Note that Empostor is built for multiple CPU-architectures and operating systems, you most likely want the x64 version, unless you are running on a Raspberry Pi or another device/VPS with an Arm processor.
3. Extract the zip.
4. Modify `config.json` to your liking. Documentation can be found [here](Server-configuration.md). You need to at least change `PublicIp` to the address people will connect to your server to.
5. Run `Impostor.Server` (Linux/macOS) or `Impostor.Server.exe` (Windows)
5. Run `Empostor.Server` (Linux/macOS) or `Empostor.Server.exe` (Windows)
6. Set up a reverse proxy to support HTTPS, so you can connect to your server from another device. See [reverse proxy configuration](Http-server.md)
7. (OPTIONAL - Linux) Configure a systemd definition file and enable the service to start on boot, see [systemd configuration](Server-configuration.md#systemd)
+18 -18
View File
@@ -3,44 +3,44 @@
If you're reading this, something went wrong.
Don't worry though, as this is the most thorough guide to help you!
## `./Impostor.Server: line 1: ELF: not found` (plus other errors)
## `./Empostor.Server: line 1: ELF: not found` (plus other errors)
No idea where you got that system. But we clearly do **NOT** support it.
## `cannot execute binary file: Exec format error`
Please check that you have downloaded the right version of Impostor, as we mantain two CPU architectures (x64 and ARM).
Unless you are running Impostor on a computer like the Raspberry Pi, you most likely want to use the x64 version.
Please check that you have downloaded the right version of Empostor, as we mantain two CPU architectures (x64 and ARM).
Unless you are running Empostor on a computer like the Raspberry Pi, you most likely want to use the x64 version.
## `./Impostor.Server: Permission denied`
## `./Empostor.Server: Permission denied`
This is an error related to Linux file permissions.
Some files do not hold their executable bit (the permission that allows them to run) during a download.
You can solve this by doing: `chmod +x Impostor.Server`
You can solve this by doing: `chmod +x Empostor.Server`
## Disconnected with `Your client is too new, please update your Impostor to play`
## Disconnected with `Your client is too new, please update your Empostor to play`
This happens when your game is too new for your copy of Impostor to support.
This happens when your game is too new for your copy of Empostor to support.
If you're using an Impostor release, check if there is a newer release available that supports your version. If this doesn't exist, you can try the [latest build from CI](https://nightly.link/Impostor/Impostor/workflows/ci/master).
If you're using an Empostor release, check if there is a newer release available that supports your version. If this doesn't exist, you can try the [latest build from CI](https://nightly.link/Empostor/Empostor/workflows/ci/master).
If even that build doesn't work, you can try looking through the Pull Requests to see if there is a pending pull request that aims to update it to the next version, but note these may be unstable and may contain malicious code, as they haven't been vetted by the Impostor development team yet.
If even that build doesn't work, you can try looking through the Pull Requests to see if there is a pending pull request that aims to update it to the next version, but note these may be unstable and may contain malicious code, as they haven't been vetted by the Empostor development team yet.
## Disconnected with `Please update your game to play on this server`
This happens when you're using a version of Impostor that is too new for your game version. You can download an older version from [the GitHub release page](https://github.com/Impostor/Impostor/releases). We however don't support older versions of Impostor with new API's and bugfixes so we recommend to update your game instead.
This happens when you're using a version of Empostor that is too new for your game version. You can download an older version from [the GitHub release page](https://github.com/Empostor/Empostor/releases). We however don't support older versions of Empostor with new API's and bugfixes so we recommend to update your game instead.
## Disconnected with `You are using an older version of the game`
You are using a version of Impostor that is not designed for the version of the game you're playing. The game does not really check who is outdated and blames it on the user. Newer versions (v1.5.0+) do warn correctly and send the correct message.
You are using a version of Empostor that is not designed for the version of the game you're playing. The game does not really check who is outdated and blames it on the user. Newer versions (v1.5.0+) do warn correctly and send the correct message.
Look at which version of the game you're playing, which you can see in the top left corner of the main menu, then download an Impostor version for that game. Every [release on the release page](https://github.com/Impostor/Impostor/releases) shows which version of the game it is compatible with. If your game version is newer than the latest release, check if the [latest build from CI works](https://nightly.link/Impostor/Impostor/workflows/ci/master).
Look at which version of the game you're playing, which you can see in the top left corner of the main menu, then download an Empostor version for that game. Every [release on the release page](https://github.com/Empostor/Empostor/releases) shows which version of the game it is compatible with. If your game version is newer than the latest release, check if the [latest build from CI works](https://nightly.link/Empostor/Empostor/workflows/ci/master).
## Disconnected with `You disconnected from the server. Reliable Packet 1 ...`
Please double-check that you have followed the [Server Configuration](Server-configuration.md) correctly.
**NOTE: Your public ip does not start with `10`, `127` or `192`**
Also check if the port Impostor (ListenPort) is listening on is correctly port-forwarded for UDP (or TCP/UDP).
Also check if the port Empostor (ListenPort) is listening on is correctly port-forwarded for UDP (or TCP/UDP).
## `Could not load file or assembly...`
@@ -49,15 +49,15 @@ This error can be caused by non-plugin files or plugins that are not working cor
## Disconnected with `You disconnected from the server. If this happens often, check your network strength. This may also be a server issue`
Usually this means that Among Us couldn't connect to Impostor's HTTP server.
Usually this means that Among Us couldn't connect to Empostor's HTTP server.
Open the address of your server in a web browser, it should show you a small page confirming that Impostor is available.
Open the address of your server in a web browser, it should show you a small page confirming that Empostor is available.
## My question is not yet answered and I'm still having problems!
That's unfortunate. Join the [Impostor Discord](https://discord.gg/Mk3w6Tb), ask your question there and we'll try to help you out. Note that we're not always available, so it may take some time to get an answer. To make answering your question easier, please add the following details:
That's unfortunate. Join the [Empostor Discord](https://discord.gg/Mk3w6Tb), ask your question there and we'll try to help you out. Note that we're not always available, so it may take some time to get an answer. To make answering your question easier, please add the following details:
- Which version of Impostor are you using?
- Which version of Empostor are you using?
- Which version or Among Us are you using?
- Which operating system are you running Impostor on?
- Which operating system are you running Empostor on?
- If you have console logs, attaching these will also help.
+5 -5
View File
@@ -1,12 +1,12 @@
# Upgrading Impostor
# Upgrading Empostor
Sometimes we make incompatible changes to existing code. This document lists these changes and which changes you should make as a server administrator.
## Impostor 1.9.0
## Empostor 1.9.0
Previously we recommended using the Impostor.Http plugin for HTTP matchmaking. Because Among Us now relies on HTTP matchmaking, this plugin is now part of the default installation. As a result, you should change your server as follows:
Previously we recommended using the Empostor.Http plugin for HTTP matchmaking. Because Among Us now relies on HTTP matchmaking, this plugin is now part of the default installation. As a result, you should change your server as follows:
- If you have Impostor.Http installed, you should remove that plugin. If you have changed the default settings, you need to move these changes to the [HttpServer section in config.json](Server-configuration.md#HttpServer).
- If you have plugins that required Impostor.Http's API (like Reactor.Impostor.Http), you should check that plugin for updates
- If you have Empostor.Http installed, you should remove that plugin. If you have changed the default settings, you need to move these changes to the [HttpServer section in config.json](Server-configuration.md#HttpServer).
- If you have plugins that required Empostor.Http's API (like Reactor.Empostor.Http), you should check that plugin for updates
- It is no longer necessary to add the ASP.NET Core folder to the PluginLoader's LibraryPaths
+36 -36
View File
@@ -1,10 +1,10 @@
# Writing a plugin
Impostor has support for plugins. This document will help you to setup a development environment for writing a plugin.
Empostor has support for plugins. This document will help you to setup a development environment for writing a plugin.
- [1. Install .NET Core SDK](#1-install-net-core-sdk)
- [2. Create a C# project](#2-create-a-c-project)
- [3. Add the Impostor.Api library](#3-add-the-impostorapi-library)
- [3. Add the Empostor.Api library](#3-add-the-empostorapi-library)
- [Quick](#quick)
- [Visual Studio](#visual-studio)
- [4. The plugin class](#4-the-plugin-class)
@@ -16,7 +16,7 @@ Impostor has support for plugins. This document will help you to setup a develop
- [Dependency injection](#dependency-injection)
- [Server configuration](#server-configuration)
- [Using other libraries](#using-other-libraries)
- [Impostor versions](#impostor-versions)
- [Empostor versions](#empostor-versions)
- [9. Missing/invalid data or want more functions?](#9-missinginvalid-data-or-want-more-functions)
## 1. Install .NET SDK
@@ -41,13 +41,13 @@ When the project has been created, you should have `Class.cs` and `Project.cspro
</Project>
```
## 3. Add the Impostor.Api library
## 3. Add the Empostor.Api library
You only have to follow the instructions of one below.
### Quick
Install the `Impostor.Api` NuGet package.
Install the `Empostor.Api` NuGet package.
Make sure to get a prerelease if you are writing a plugin for a dev release of the server.
### Visual Studio
@@ -55,31 +55,31 @@ Make sure to get a prerelease if you are writing a plugin for a dev release of t
1. Right click your project.
2. Click `Manage NuGet Packages`.
3. Click `Browse`.
4. Search for `Impostor.Api`.
5. Click the `Impostor.Api` result and press install on the right side.
4. Search for `Empostor.Api`.
5. Click the `Empostor.Api` result and press install on the right side.
### Dotnet CLI
1. Open your project folder in command prompt / bash.
2. Run `dotnet add package Impostor.Api`.
2. Run `dotnet add package Empostor.Api`.
## 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.
Now the `Empostor.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.
```csharp
using System.Threading.Tasks;
using Impostor.Api.Events.Managers;
using Impostor.Api.Plugins;
using Empostor.Api.Events.Managers;
using Empostor.Api.Plugins;
using Microsoft.Extensions.Logging;
namespace Impostor.Plugins.Example
namespace Empostor.Plugins.Example
{
/// <summary>
/// The metadata information of your plugin, this is required.
/// </summary>
[ImpostorPlugin(
package: "gg.impostor.example",
[EmpostorPlugin(
package: "gg.empostor.example",
name: "Example",
author: "AeonLucid",
version: "1.0.0")]
@@ -139,11 +139,11 @@ Currently you should have a plugin that loads and does nothing. In order to get
Create a new class called `GameEventListener`. Example code:
```csharp
using Impostor.Api.Events;
using Impostor.Api.Events.Player;
using Empostor.Api.Events;
using Empostor.Api.Events.Player;
using Microsoft.Extensions.Logging;
namespace Impostor.Plugins.Example.Handlers
namespace Empostor.Plugins.Example.Handlers
{
/// <summary>
/// A class that listens for two events.
@@ -209,15 +209,15 @@ The last step to get your plugin working is to register the event listener, so t
```csharp
using System;
using System.Threading.Tasks;
using Impostor.Api.Events.Managers;
using Impostor.Api.Plugins;
using Impostor.Plugins.Example.Handlers;
using Empostor.Api.Events.Managers;
using Empostor.Api.Plugins;
using Empostor.Plugins.Example.Handlers;
using Microsoft.Extensions.Logging;
namespace Impostor.Plugins.Example
namespace Empostor.Plugins.Example
{
[ImpostorPlugin(
package: "gg.impostor.example",
[EmpostorPlugin(
package: "gg.empostor.example",
name: "Example",
author: "AeonLucid",
version: "1.0.0")]
@@ -264,8 +264,8 @@ Now your plugin is ready to be tested.
2. Right click your project and press `Open Folder in File Explorer`.
3. Go to `bin/Debug/net8.0/`.
4. In this directory, you should find your plugin named `Project.dll`.
5. Copy the `Project.dll` to the `plugins` directory in your Impostor server directory.
6. (Re)start your Impostor server.
5. Copy the `Project.dll` to the `plugins` directory in your Empostor server directory.
6. (Re)start your Empostor server.
7. Open Among Us, create a game and send a chat message. In the console you should see your plugin being loaded and the messages from the example.
## 8. Extra
@@ -289,7 +289,7 @@ Some extra information that might be useful for those developing plugins.
### Server configuration
Constantly copying the plugin dll to your server directory can be pretty annoying. Luckily we have a solution for that. In your Impostor server open the `config.json` and add the `PluginLoader` from the example below, replace the path with the build destination of your plugin.
Constantly copying the plugin dll to your server directory can be pretty annoying. Luckily we have a solution for that. In your Empostor server open the `config.json` and add the `PluginLoader` from the example below, replace the path with the build destination of your plugin.
```json
{
@@ -301,7 +301,7 @@ Constantly copying the plugin dll to your server directory can be pretty annoyin
},
"PluginLoader": {
"Paths": [
"D:\\Projects\\Impostor\\src\\Impostor.Plugins.Example\\bin\\Debug\\net8.0"
"D:\\Projects\\Empostor\\src\\Empostor.Plugins.Example\\bin\\Debug\\net8.0"
],
"LibraryPaths": []
}
@@ -310,23 +310,23 @@ Constantly copying the plugin dll to your server directory can be pretty annoyin
### Using other libraries
Sometimes you need to use libraries that the original Impostor server does not provide. The dll files of these libraries must be placed in the `libraries` folder next to the server executable. You could also provide them by modifying the `PluginLoader.LibraryPaths` option in the `config.json`, similarly to the `PluginLoader.Paths` option.
Sometimes you need to use libraries that the original Empostor server does not provide. The dll files of these libraries must be placed in the `libraries` folder next to the server executable. You could also provide them by modifying the `PluginLoader.LibraryPaths` option in the `config.json`, similarly to the `PluginLoader.Paths` option.
### Impostor versions
### Empostor versions
It is important to use the correct versions when working with `Impostor.Api` prereleases and the `Impostor` dev builds to reduce the chances of mismatching assemblies.
It is important to use the correct versions when working with `Empostor.Api` prereleases and the `Empostor` dev builds to reduce the chances of mismatching assemblies.
**Example**
The prerelease `Impostor.Api` package `1.2.0-ci.54` belongs to build `54` on AppVeyor, which can be found here https://ci.appveyor.com/project/Impostor/Impostor/build/54. Notice the `54` on the end of the url.
The prerelease `Empostor.Api` package `1.2.0-ci.54` belongs to build `54` on AppVeyor, which can be found here https://ci.appveyor.com/project/Empostor/Empostor/build/54. Notice the `54` on the end of the url.
## 9. Missing/invalid data or want more functions?
The `Impostor.Api` is currently in beta. There are a lot of things still missing and we would like to hear from you what you need to develop a plugin.
The `Empostor.Api` is currently in beta. There are a lot of things still missing and we would like to hear from you what you need to develop a plugin.
Create an issue:
- [Suggest a function](https://github.com/Impostor/Impostor/issues/new?template=3--api-suggestion.md)
- [Data is invalid](https://github.com/Impostor/Impostor/issues/new?template=4--api-invalid.md)
- [Data is unavailable](https://github.com/Impostor/Impostor/issues/new?template=5--api-missing.md)
- [Other](https://github.com/Impostor/Impostor/issues/new?template=6--api-other.md)
- [Suggest a function](https://github.com/Empostor/Empostor/issues/new?template=3--api-suggestion.md)
- [Data is invalid](https://github.com/Empostor/Empostor/issues/new?template=4--api-invalid.md)
- [Data is unavailable](https://github.com/Empostor/Empostor/issues/new?template=5--api-missing.md)
- [Other](https://github.com/Empostor/Empostor/issues/new?template=6--api-other.md)
+19 -18
View File
@@ -7,7 +7,7 @@
"versions": [
{
"version": "5.0.0",
"impostor_version": "2.0.0",
"empostor_version": "2.0.0",
"download_url": "https://raw.githubusercontent.com/Empostor/Empostor/master/marketplace/Serilog.Sinks.File.dll"
}
]
@@ -20,7 +20,7 @@
"versions": [
{
"version": "0.1",
"impostor_version": "2.0.0",
"empostor_version": "2.0.0",
"download_url": "https://raw.githubusercontent.com/Empostor/Empostor/master/marketplace/Boot.Chat.dll"
}
]
@@ -33,7 +33,7 @@
"versions": [
{
"version": "0.1",
"impostor_version": "2.0.0",
"empostor_version": "2.0.0",
"download_url": "https://raw.githubusercontent.com/Empostor/Empostor/master/marketplace/Boot.Codes.dll"
}
]
@@ -46,13 +46,13 @@
"versions": [
{
"version": "1.0.0",
"impostor_version": "2.0.0",
"download_url": "https://raw.githubusercontent.com/Empostor/Empostor/master/marketplace/Impostor.Plugins.Welcome.dll"
"empostor_version": "2.0.0",
"download_url": "https://raw.githubusercontent.com/Empostor/Empostor/master/marketplace/Empostor.Plugins.Welcome.dll"
},
{
"version": "1.1.0",
"impostor_version": "2.0.0",
"download_url": "https://raw.githubusercontent.com/Empostor/Empostor/master/marketplace/Impostor.Plugins.Welcome1.1.0.dll"
"empostor_version": "2.0.0",
"download_url": "https://raw.githubusercontent.com/Empostor/Empostor/master/marketplace/Empostor.Plugins.Welcome1.1.0.dll"
}
]
},
@@ -64,8 +64,8 @@
"versions": [
{
"version": "1.0.0",
"impostor_version": "2.0.0",
"download_url": "https://raw.githubusercontent.com/Empostor/Empostor/master/marketplace/Impostor.Plugins.FriendCodeValidator.dll"
"empostor_version": "2.0.0",
"download_url": "https://raw.githubusercontent.com/Empostor/Empostor/master/marketplace/Empostor.Plugins.FriendCodeValidator.dll"
}
]
},
@@ -77,12 +77,13 @@
"versions": [
{
"version": "1.0.0",
"impostor_version": "2.0.0",
"download_url": "https://raw.githubusercontent.com/Empostor/Empostor/master/marketplace/Impostor.Plugins.FixedCode.dll"
"empostor_version": "2.0.0",
"download_url": "https://raw.githubusercontent.com/Empostor/Empostor/master/marketplace/Empostor.Plugins.FixedCode.dll"
}
]
},
{
{
"id": "cn.hayashiume.titles",
"name": "Custom Title",
"description": "Assigns a title based on their friend code and show in front of their name.",
@@ -90,8 +91,8 @@
"versions": [
{
"version": "1.0.0",
"impostor_version": "2.0.0",
"download_url": "https://raw.githubusercontent.com/Empostor/Empostor/master/marketplace/Impostor.Plugins.Titles.dll"
"empostor_version": "2.0.0",
"download_url": "https://raw.githubusercontent.com/Empostor/Empostor/master/marketplace/Empostor.Plugins.Titles.dll"
}
]
},
@@ -103,8 +104,8 @@
"versions": [
{
"version": "1.0.0",
"impostor_version": "2.0.0",
"download_url": "https://raw.githubusercontent.com/Empostor/Empostor/master/marketplace/Impostor.Plugins.PlayerChannel.dll"
"empostor_version": "2.0.0",
"download_url": "https://raw.githubusercontent.com/Empostor/Empostor/master/marketplace/Empostor.Plugins.PlayerChannel.dll"
}
]
},
@@ -116,8 +117,8 @@
"versions": [
{
"version": "1.0.0",
"impostor_version": "2.0.0",
"download_url": "https://raw.githubusercontent.com/Empostor/Empostor/master/marketplace/Impostor.Plugins.QqVerify.dll"
"empostor_version": "2.0.0",
"download_url": "https://raw.githubusercontent.com/Empostor/Empostor/master/marketplace/Empostor.Plugins.QqVerify.dll"
}
]
}
@@ -2,7 +2,7 @@ using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Numerics;
namespace Impostor.Api.Innersloth.Generator;
namespace Empostor.Api.Innersloth.Generator;
internal static class Extensions
{
@@ -2,7 +2,7 @@ using System.Collections.Immutable;
using System.Linq;
using Microsoft.CodeAnalysis;
namespace Impostor.Api.Innersloth.Generator.Generators;
namespace Empostor.Api.Innersloth.Generator.Generators;
public abstract class BaseGenerator
{
@@ -5,7 +5,7 @@ using System.Text.Json;
using CSharpPoet;
using Microsoft.CodeAnalysis;
namespace Impostor.Api.Innersloth.Generator.Generators;
namespace Empostor.Api.Innersloth.Generator.Generators;
public sealed class EnumGenerator : BaseGenerator
{
@@ -33,7 +33,7 @@ public sealed class EnumGenerator : BaseGenerator
@enum.Attributes.Add(new CSharpAttribute("System.FlagsAttribute"));
}
var source = new CSharpFile(@namespace ?? "Impostor.Api.Innersloth") { @enum }.ToString();
var source = new CSharpFile(@namespace ?? "Empostor.Api.Innersloth") { @enum }.ToString();
_sourceProductionContext.AddSource(name, source);
}
}
@@ -7,7 +7,7 @@ using System.Text.Json;
using CSharpPoet;
using Microsoft.CodeAnalysis;
namespace Impostor.Api.Innersloth.Generator.Generators;
namespace Empostor.Api.Innersloth.Generator.Generators;
public sealed class MapDataGenerator : BaseGenerator
{
@@ -110,7 +110,7 @@ public sealed class MapDataGenerator : BaseGenerator
},
};
var source = new CSharpFile("Impostor.Api.Innersloth.Maps")
var source = new CSharpFile("Empostor.Api.Innersloth.Maps")
{
Usings = { "System.Collections.Generic", "System.Numerics" },
Members = { @class },
@@ -3,7 +3,7 @@
"profiles": {
"Generator": {
"commandName": "DebugRoslynComponent",
"targetProject": "../Impostor.Api/Impostor.Api.csproj"
"targetProject": "../Empostor.Api/Empostor.Api.csproj"
}
}
}
@@ -1,10 +1,10 @@
using System;
using System.Diagnostics.CodeAnalysis;
using CSharpPoet;
using Impostor.Api.Innersloth.Generator.Generators;
using Empostor.Api.Innersloth.Generator.Generators;
using Microsoft.CodeAnalysis;
namespace Impostor.Api.Innersloth.Generator;
namespace Empostor.Api.Innersloth.Generator;
[Generator(LanguageNames.CSharp)]
public sealed class SourceGenerator : IIncrementalGenerator
@@ -67,12 +67,12 @@ public sealed class SourceGenerator : IIncrementalGenerator
{
if (files.IsEmpty)
{
throw new InvalidOperationException($"No json files found in Impostor.Api/{DataPath}");
throw new InvalidOperationException($"No json files found in Empostor.Api/{DataPath}");
}
var enumGenerator = new EnumGenerator(spc, files);
enumGenerator.Generate("ColorType", "Impostor.Api.Innersloth.Customization");
enumGenerator.Generate("ColorType", "Empostor.Api.Innersloth.Customization");
enumGenerator.Generate("DisconnectReason", sourceName: "DisconnectReasons");
enumGenerator.Generate("GameKeywords", flags: true, underlyingType: CSharpEnumUnderlyingType.UnsignedInt);
@@ -86,7 +86,7 @@ public sealed class SourceGenerator : IIncrementalGenerator
enumGenerator.Generate("Language", sourceName: "SupportedLangs");
enumGenerator.Generate("TaskTypes");
enumGenerator.Generate("RpcCalls", "Impostor.Api.Net.Inner", underlyingType: CSharpEnumUnderlyingType.Byte);
enumGenerator.Generate("RpcCalls", "Empostor.Api.Net.Inner", underlyingType: CSharpEnumUnderlyingType.Byte);
var mapDataGenerator = new MapDataGenerator(spc, files);
@@ -3,7 +3,7 @@ using System.Numerics;
using System.Text.Json;
using System.Text.Json.Serialization;
namespace Impostor.Api.Innersloth.Generator;
namespace Empostor.Api.Innersloth.Generator;
public class Vector2Converter : JsonConverter<Vector2>
{
@@ -1,8 +1,8 @@
namespace Impostor.Api;
namespace Empostor.Api;
public enum CheatCategory
{
/// <summary>A packet used a part of the network protocol that is unknown to Impostor, like a custom RPC.</summary>
/// <summary>A packet used a part of the network protocol that is unknown to Empostor, like a custom RPC.</summary>
ProtocolExtension,
/// <summary>A packet was sent at an inappropriate moment.</summary>
@@ -1,6 +1,6 @@
using Impostor.Api.Net.Inner;
using Empostor.Api.Net.Inner;
namespace Impostor.Api
namespace Empostor.Api
{
public class CheatContext
{
@@ -1,9 +1,9 @@
using Impostor.Api.Games;
using Impostor.Api.Languages;
using Impostor.Api.Net;
using Impostor.Api.Net.Inner.Objects;
using Empostor.Api.Games;
using Empostor.Api.Languages;
using Empostor.Api.Net;
using Empostor.Api.Net.Inner.Objects;
namespace Impostor.Api.Commands
namespace Empostor.Api.Commands
{
public sealed class CommandContext
{
@@ -1,6 +1,6 @@
using System.Threading.Tasks;
namespace Impostor.Api.Commands
namespace Empostor.Api.Commands
{
public interface ICommand
{
@@ -1,4 +1,4 @@
namespace Impostor.Api.Config
namespace Empostor.Api.Config
{
public class AdminConfig
{
@@ -1,4 +1,4 @@
namespace Impostor.Api.Config
namespace Empostor.Api.Config
{
public class AntiCheatConfig
{
@@ -1,6 +1,6 @@
using System.Collections.Generic;
namespace Impostor.Api.Config
namespace Empostor.Api.Config
{
public class ChatFilterConfig
{
@@ -1,4 +1,4 @@
namespace Impostor.Api.Config
namespace Empostor.Api.Config
{
/// <summary>
/// Details if exceptions are made for hosts that are cheating.
@@ -1,4 +1,4 @@
namespace Impostor.Api.Config
namespace Empostor.Api.Config
{
public class CompatibilityConfig
{
@@ -1,4 +1,4 @@
namespace Impostor.Api.Config
namespace Empostor.Api.Config
{
public class DebugConfig
{
@@ -1,10 +1,10 @@
namespace Impostor.Api.Config
namespace Empostor.Api.Config
{
public static class DisconnectMessages
{
public const string Error = "There was an internal server error. " +
"Check the server console for more information. " +
"Please report the issue on the Impostor GitHub if it keeps happening.";
"Please report the issue on the Empostor GitHub if it keeps happening.";
public const string ClientOutdated = "Please update your game to play in this lobby.";
@@ -20,17 +20,17 @@
public const string VersionClientTooOld = "Please update your game to play on this server.";
public const string VersionServerTooOld = "Your client is too new, please update your Impostor server to play.";
public const string VersionServerTooOld = "Your client is too new, please update your Empostor server to play.";
public const string VersionUnsupported = "Your client version is unsupported, please update your Game and/or Impostor server.";
public const string VersionUnsupported = "Your client version is unsupported, please update your Game and/or Empostor server.";
private const string UpgradingDocsLink = "https://github.com/Impostor/Impostor/blob/master/docs/Upgrading.md";
private const string UpgradingDocsLink = "https://github.com/Empostor/Empostor/blob/master/docs/Upgrading.md";
public const string UdpMatchmakingUnsupported = $"""
Sorry, UDP Matchmaking is no longer supported.
See <link={UpgradingDocsLink}#impostor-190>Impostor documentation</link> on how to migrate to HTTP Matchmaking
See <link={UpgradingDocsLink}#empostor-190>Empostor documentation</link> on how to migrate to HTTP Matchmaking
""";
public const string HostAuthorityUnsupported = "Your client is requesting host authority, which is not enabled on this Impostor server.";
public const string HostAuthorityUnsupported = "Your client is requesting host authority, which is not enabled on this Empostor server.";
}
}
@@ -1,4 +1,4 @@
namespace Impostor.Api.Config
namespace Empostor.Api.Config
{
public class DiscordWebhookConfig
{
@@ -1,4 +1,4 @@
namespace Impostor.Api.Config;
namespace Empostor.Api.Config;
/// <summary>
/// Configuration for HttpServer.
@@ -1,4 +1,4 @@
namespace Impostor.Api.Config
namespace Empostor.Api.Config
{
public class PlayerStatsConfig
{
@@ -1,6 +1,6 @@
using Impostor.Api.Utils;
using Empostor.Api.Utils;
namespace Impostor.Api.Config
namespace Empostor.Api.Config
{
public class ServerConfig
{
@@ -1,4 +1,4 @@
namespace Impostor.Api.Config
namespace Empostor.Api.Config
{
public class TimeoutConfig
{
@@ -6,17 +6,17 @@
<Nullable>enable</Nullable>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<AssemblyName>Impostor.Api</AssemblyName>
<AssemblyTitle>Impostor.Api</AssemblyTitle>
<AssemblyName>Empostor.Api</AssemblyName>
<AssemblyTitle>Empostor.Api</AssemblyTitle>
<Authors>AeonLucid</Authors>
<Description>An api library for Impostor, an Among Us private server. You need this package to write plugins for Impostor.</Description>
<PackageId>Impostor.Api</PackageId>
<PackageTags>Among Us;Impostor;Impostor Plugin</PackageTags>
<PackageIconUrl>https://raw.githubusercontent.com/Impostor/Impostor/dev/docs/images/logo_64.png</PackageIconUrl>
<Description>An api library for Empostor, an Among Us private server. You need this package to write plugins for Empostor.</Description>
<PackageId>Empostor.Api</PackageId>
<PackageTags>Among Us;Empostor;Empostor Plugin</PackageTags>
<PackageIconUrl>https://raw.githubusercontent.com/Empostor/Empostor/dev/docs/images/logo_64.png</PackageIconUrl>
<PackageIcon>logo_64.png</PackageIcon>
<PackageProjectUrl>https://github.com/Impostor/Impostor</PackageProjectUrl>
<PackageProjectUrl>https://github.com/Empostor/Empostor</PackageProjectUrl>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/Impostor/Impostor</RepositoryUrl>
<RepositoryUrl>https://github.com/Empostor/Empostor</RepositoryUrl>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
@@ -30,7 +30,7 @@
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.0" />
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556" PrivateAssets="all" />
<ProjectReference Include="..\Impostor.Api.Innersloth.Generator\Impostor.Api.Innersloth.Generator.csproj" ReferenceOutputAssembly="false" OutputItemType="Analyzer" />
<ProjectReference Include="..\Empostor.Api.Innersloth.Generator\Empostor.Api.Innersloth.Generator.csproj" ReferenceOutputAssembly="false" OutputItemType="Analyzer" />
<ProjectReference Include="..\NextFast.Hazel-New\Next.Hazel.Abstractions\Next.Hazel.Abstractions.csproj" />
@@ -1,6 +1,6 @@
using System;
namespace Impostor.Api.Events
namespace Empostor.Api.Events
{
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
public class EventListenerAttribute : Attribute
@@ -1,6 +1,6 @@
using Impostor.Api.Net;
using Empostor.Api.Net;
namespace Impostor.Api.Events.Client
namespace Empostor.Api.Events.Client
{
/// <summary>
/// Called just after a <see cref="IClient"/> is created and connected.
@@ -1,6 +1,6 @@
using Impostor.Api.Net;
using Empostor.Api.Net;
namespace Impostor.Api.Events.Client
namespace Empostor.Api.Events.Client
{
/// <summary>
/// Called just before a <see cref="IHazelConnection"/> is registered.
@@ -1,6 +1,6 @@
using Impostor.Api.Net;
using Empostor.Api.Net;
namespace Impostor.Api.Events.Client
namespace Empostor.Api.Events.Client
{
public interface IClientEvent : IEvent
{
@@ -1,4 +1,4 @@
namespace Impostor.Api.Events
namespace Empostor.Api.Events
{
public enum EventPriority
{
@@ -1,4 +1,4 @@
namespace Impostor.Api.Events
namespace Empostor.Api.Events
{
public interface IGameAlterEvent : IGameEvent
{
@@ -1,7 +1,7 @@
using Impostor.Api.Games;
using Impostor.Api.Net;
using Empostor.Api.Games;
using Empostor.Api.Net;
namespace Impostor.Api.Events
namespace Empostor.Api.Events
{
/// <summary>
/// Called whenever a new <see cref="IGame" /> is created.
@@ -1,7 +1,7 @@
using Impostor.Api.Games;
using Impostor.Api.Net;
using Empostor.Api.Games;
using Empostor.Api.Net;
namespace Impostor.Api.Events
namespace Empostor.Api.Events
{
/// <summary>
/// Called just before a new <see cref="IGame"/> is created.
@@ -19,7 +19,7 @@ namespace Impostor.Api.Events
/// <summary>
/// Gets or sets the desired <see cref="Games.GameCode"/>.
/// </summary>
/// <exception cref="ImpostorException">If the GameCode is invalid or already used in another game.</exception>
/// <exception cref="EmpostorException">If the GameCode is invalid or already used in another game.</exception>
GameCode? GameCode { get; set; }
}
}
@@ -1,6 +1,6 @@
using Impostor.Api.Games;
using Empostor.Api.Games;
namespace Impostor.Api.Events
namespace Empostor.Api.Events
{
/// <summary>
/// Called whenever a new <see cref="IGame" /> is destroyed.
@@ -1,6 +1,6 @@
using Impostor.Api.Innersloth;
using Empostor.Api.Innersloth;
namespace Impostor.Api.Events
namespace Empostor.Api.Events
{
public interface IGameEndedEvent : IGameEvent
{
@@ -1,6 +1,6 @@
using Impostor.Api.Games;
using Empostor.Api.Games;
namespace Impostor.Api.Events
namespace Empostor.Api.Events
{
public interface IGameEvent : IEvent
{
@@ -1,6 +1,6 @@
using Impostor.Api.Net;
using Empostor.Api.Net;
namespace Impostor.Api.Events
namespace Empostor.Api.Events
{
public interface IGameHostChangedEvent : IGameEvent
{
@@ -1,6 +1,6 @@
using Impostor.Api.Games;
using Empostor.Api.Games;
namespace Impostor.Api.Events
namespace Empostor.Api.Events
{
/// <summary>
/// This event is triggered when game options are going to be changed.
@@ -1,6 +1,6 @@
using Impostor.Api.Net;
using Empostor.Api.Net;
namespace Impostor.Api.Events
namespace Empostor.Api.Events
{
public interface IGamePlayerJoinedEvent : IGameEvent
{
@@ -1,7 +1,7 @@
using Impostor.Api.Games;
using Impostor.Api.Net;
using Empostor.Api.Games;
using Empostor.Api.Net;
namespace Impostor.Api.Events
namespace Empostor.Api.Events
{
/// <summary>
/// Called just before a <see cref="IClientPlayer"/> joins a game.
@@ -1,6 +1,6 @@
using Impostor.Api.Net;
using Empostor.Api.Net;
namespace Impostor.Api.Events
namespace Empostor.Api.Events
{
public interface IGamePlayerLeftEvent : IGameEvent
{
@@ -1,4 +1,4 @@
namespace Impostor.Api.Events
namespace Empostor.Api.Events
{
/// <summary>
/// The game is started here and players have been initialized.
@@ -1,4 +1,4 @@
namespace Impostor.Api.Events
namespace Empostor.Api.Events
{
/// <summary>
/// Called when the game is going to start.
@@ -1,6 +1,6 @@
using Impostor.Api.Net.Inner.Objects;
using Empostor.Api.Net.Inner.Objects;
namespace Impostor.Api.Events.Meeting
namespace Empostor.Api.Events.Meeting
{
public interface IMeetingEndedEvent : IMeetingEvent
{
@@ -1,6 +1,6 @@
using Impostor.Api.Net.Inner.Objects;
using Empostor.Api.Net.Inner.Objects;
namespace Impostor.Api.Events.Meeting
namespace Empostor.Api.Events.Meeting
{
public interface IMeetingEvent : IGameEvent
{
@@ -1,4 +1,4 @@
namespace Impostor.Api.Events.Meeting
namespace Empostor.Api.Events.Meeting
{
public interface IMeetingStartedEvent : IMeetingEvent
{
@@ -1,4 +1,4 @@
namespace Impostor.Api.Events.Player
namespace Empostor.Api.Events.Player
{
public interface IPlayerChatEvent : IPlayerEvent, IEventCancelable
{
@@ -1,7 +1,7 @@
using Impostor.Api.Innersloth;
using Impostor.Api.Net.Inner.Objects;
using Empostor.Api.Innersloth;
using Empostor.Api.Net.Inner.Objects;
namespace Impostor.Api.Events.Player
namespace Empostor.Api.Events.Player
{
/// <summary>
/// Event that allows changing or canceling an upcoming player murder.
@@ -1,6 +1,6 @@
using Impostor.Api.Net.Inner.Objects;
using Empostor.Api.Net.Inner.Objects;
namespace Impostor.Api.Events.Player
namespace Empostor.Api.Events.Player
{
public interface IPlayerCompletedTaskEvent : IPlayerEvent
{
@@ -1,4 +1,4 @@
namespace Impostor.Api.Events.Player
namespace Empostor.Api.Events.Player
{
public interface IPlayerDestroyedEvent : IPlayerEvent
{
@@ -1,6 +1,6 @@
using Impostor.Api.Innersloth.Maps;
using Empostor.Api.Innersloth.Maps;
namespace Impostor.Api.Events.Player
namespace Empostor.Api.Events.Player
{
/// <summary>
/// Called whenever a player enters a vent.
@@ -1,7 +1,7 @@
using Impostor.Api.Net;
using Impostor.Api.Net.Inner.Objects;
using Empostor.Api.Net;
using Empostor.Api.Net.Inner.Objects;
namespace Impostor.Api.Events.Player
namespace Empostor.Api.Events.Player
{
public interface IPlayerEvent : IGameEvent
{
@@ -1,4 +1,4 @@
namespace Impostor.Api.Events.Player
namespace Empostor.Api.Events.Player
{
/// <summary>
/// Called whenever a player gets exiled (voted out).
@@ -1,6 +1,6 @@
using Impostor.Api.Innersloth.Maps;
using Empostor.Api.Innersloth.Maps;
namespace Impostor.Api.Events.Player
namespace Empostor.Api.Events.Player
{
/// <summary>
/// Called whenever a player exits a vent.
@@ -1,4 +1,4 @@
namespace Impostor.Api.Events.Player
namespace Empostor.Api.Events.Player
{
public interface IPlayerMovementEvent : IPlayerEvent
{
@@ -1,7 +1,7 @@
using Impostor.Api.Innersloth;
using Impostor.Api.Net.Inner.Objects;
using Empostor.Api.Innersloth;
using Empostor.Api.Net.Inner.Objects;
namespace Impostor.Api.Events.Player
namespace Empostor.Api.Events.Player
{
/// <summary>
/// Event that is called when a player is killed by another player.
@@ -0,0 +1,8 @@
using Empostor.Api.Events.Player;
namespace Empostor.Api.Events.Game.Player
{
public interface IPlayerReadyEvent : IPlayerEvent
{
}
}
@@ -1,7 +1,7 @@
using Impostor.Api.Innersloth;
using Impostor.Api.Net;
using Empostor.Api.Innersloth;
using Empostor.Api.Net;
namespace Impostor.Api.Events.Player
namespace Empostor.Api.Events.Player
{
public interface IPlayerReportEvent : IPlayerEvent
{
@@ -1,4 +1,4 @@
namespace Impostor.Api.Events.Player
namespace Empostor.Api.Events.Player
{
public interface IPlayerSetStartCounterEvent : IPlayerEvent
{
@@ -1,4 +1,4 @@
namespace Impostor.Api.Events.Player
namespace Empostor.Api.Events.Player
{
public interface IPlayerSpawnedEvent : IPlayerEvent
{
@@ -1,6 +1,6 @@
using Impostor.Api.Net.Inner.Objects;
using Empostor.Api.Net.Inner.Objects;
namespace Impostor.Api.Events.Player
namespace Empostor.Api.Events.Player
{
public interface IPlayerStartMeetingEvent : IPlayerEvent
{
@@ -1,6 +1,6 @@
using Impostor.Api.Innersloth.Maps;
using Empostor.Api.Innersloth.Maps;
namespace Impostor.Api.Events.Player
namespace Empostor.Api.Events.Player
{
/// <summary>
/// Called whenever a player moves to another vent.
@@ -1,6 +1,6 @@
using Impostor.Api.Net.Inner.Objects;
using Empostor.Api.Net.Inner.Objects;
namespace Impostor.Api.Events.Player
namespace Empostor.Api.Events.Player
{
public enum VoteType : byte
{
@@ -1,4 +1,4 @@
namespace Impostor.Api.Events
namespace Empostor.Api.Events
{
public interface IEvent
{
@@ -1,4 +1,4 @@
namespace Impostor.Api.Events
namespace Empostor.Api.Events
{
public interface IEventCancelable : IEvent
{
@@ -1,4 +1,4 @@
namespace Impostor.Api.Events
namespace Empostor.Api.Events
{
public interface IEventListener
{
@@ -1,6 +1,6 @@
using System.Threading.Tasks;
namespace Impostor.Api.Events
namespace Empostor.Api.Events
{
public interface IManualEventListener : IEventListener
{
@@ -1,7 +1,7 @@
using System;
using System.Threading.Tasks;
namespace Impostor.Api.Events.Managers
namespace Empostor.Api.Events.Managers
{
public interface IEventManager
{
@@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Linq;
namespace Impostor.Api.Events
namespace Empostor.Api.Events
{
/// <summary>
/// Disposes multiple <see cref="IDisposable" />.
@@ -0,0 +1,19 @@
using System;
namespace Empostor.Api
{
public class EmpostorConfigException : EmpostorException
{
public EmpostorConfigException()
{
}
public EmpostorConfigException(string? message) : base(message)
{
}
public EmpostorConfigException(string? message, Exception? innerException) : base(message, innerException)
{
}
}
}
@@ -0,0 +1,19 @@
using System;
namespace Empostor.Api
{
public class EmpostorException : Exception
{
public EmpostorException()
{
}
public EmpostorException(string? message) : base(message)
{
}
public EmpostorException(string? message, Exception? innerException) : base(message, innerException)
{
}
}
}
@@ -0,0 +1,19 @@
using System;
namespace Empostor.Api
{
public class EmpostorProtocolException : EmpostorException
{
public EmpostorProtocolException()
{
}
public EmpostorProtocolException(string? message) : base(message)
{
}
public EmpostorProtocolException(string? message, Exception? innerException) : base(message, innerException)
{
}
}
}
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
namespace Impostor.Api
namespace Empostor.Api
{
public static class DictionaryExtensions
{
@@ -1,6 +1,6 @@
using Impostor.Api.Innersloth;
using Empostor.Api.Innersloth;
namespace Impostor.Api;
namespace Empostor.Api;
public static class MurderResultFlagsExtensions
{
@@ -2,7 +2,7 @@
using System.Buffers.Binary;
using System.Runtime.CompilerServices;
namespace Impostor.Api
namespace Empostor.Api
{
/// <summary>
/// Priovides a StreamReader-like api throught extensions.
@@ -1,6 +1,6 @@
using Impostor.Api.Innersloth;
using Empostor.Api.Innersloth;
namespace Impostor.Api
namespace Empostor.Api
{
public static class SystemTypesExtensions
{
@@ -1,8 +1,8 @@
using System;
using System.Threading.Tasks;
using Impostor.Api.Net;
using Empostor.Api.Net;
namespace Impostor.Api.Games
namespace Empostor.Api.Games
{
public static class GameExtensions
{
@@ -1,8 +1,8 @@
using System.Linq;
using Impostor.Api.Games.Managers;
using Impostor.Api.Innersloth;
using Empostor.Api.Games.Managers;
using Empostor.Api.Innersloth;
namespace Impostor.Api.Games
namespace Empostor.Api.Games
{
public static class GameManagerExtensions
{
Loaded 100 of 598 files, more files were not shown because too many files have changed in this diff. Show more