-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
316b1f4
commit f6a0e18
Showing
6 changed files
with
176 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.10.35027.167 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NoRespawns", "NoRespawns\NoRespawns.csproj", "{3545AB37-B908-4533-8985-FB4CC1C86EAE}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{3545AB37-B908-4533-8985-FB4CC1C86EAE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{3545AB37-B908-4533-8985-FB4CC1C86EAE}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{3545AB37-B908-4533-8985-FB4CC1C86EAE}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{3545AB37-B908-4533-8985-FB4CC1C86EAE}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {B7216C7D-C8D6-4E7C-8699-0A270043A86E} | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using Exiled.API.Interfaces; | ||
using System.ComponentModel; | ||
|
||
namespace NoRespawns | ||
{ | ||
public class Config : IConfig | ||
{ | ||
[Description("Is the plugin enabled?")] | ||
public bool IsEnabled { get; set; } = true; | ||
|
||
[Description("Are debug messages displayed?")] | ||
public bool Debug { get; set; } = false; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using Exiled.Events.EventArgs.Server; | ||
|
||
namespace NoRespawns | ||
{ | ||
public class EventHandlers | ||
{ | ||
public void OnRespawningTeam(RespawningTeamEventArgs ev) | ||
{ | ||
ev.IsAllowed = false; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{3545AB37-B908-4533-8985-FB4CC1C86EAE}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>NoRespawns</RootNamespace> | ||
<AssemblyName>NoRespawns</AssemblyName> | ||
<TargetFrameworkVersion>v4.8.1</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<Deterministic>true</Deterministic> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="Assembly-CSharp-Publicized, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\EXILEDOFFICIAL.8.11.0\lib\net48\Assembly-CSharp-Publicized.dll</HintPath> | ||
<Private>True</Private> | ||
</Reference> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="System.Xml.Linq" /> | ||
<Reference Include="System.Data.DataSetExtensions" /> | ||
<Reference Include="Microsoft.CSharp" /> | ||
<Reference Include="System.Data" /> | ||
<Reference Include="System.Net.Http" /> | ||
<Reference Include="System.Xml" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="Configs.cs" /> | ||
<Compile Include="EventHandlers.cs" /> | ||
<Compile Include="Plugin.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<PackageReference Include="EXILEDOFFICIAL"> | ||
<Version>8.11.0</Version> | ||
</PackageReference> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
using Exiled.API.Enums; | ||
using Exiled.API.Features; | ||
using System; | ||
|
||
namespace NoRespawns | ||
{ | ||
public class Plugin : Plugin<Config> | ||
{ | ||
public override string Name => "NoRespawns"; | ||
public override string Prefix => "NoRespawns"; | ||
public override string Author => "aksueikava"; | ||
public override Version Version => new Version(1, 0, 0); | ||
public override Version RequiredExiledVersion => new Version(8, 11, 0); | ||
public override PluginPriority Priority { get; } = PluginPriority.Default; | ||
|
||
public static Plugin Instance; | ||
private EventHandlers _handlers; | ||
|
||
public override void OnEnabled() | ||
{ | ||
Instance = this; | ||
RegisterEvents(); | ||
|
||
Log.Debug("NoRespawns has been enabled."); | ||
base.OnEnabled(); | ||
} | ||
|
||
public override void OnDisabled() | ||
{ | ||
Instance = null; | ||
UnregisterEvents(); | ||
|
||
Log.Debug("NoRespawns has been disabled."); | ||
base.OnDisabled(); | ||
} | ||
|
||
private void RegisterEvents() | ||
{ | ||
_handlers = new EventHandlers(); | ||
Exiled.Events.Handlers.Server.RespawningTeam += _handlers.OnRespawningTeam; | ||
} | ||
|
||
private void UnregisterEvents() | ||
{ | ||
Exiled.Events.Handlers.Server.RespawningTeam -= _handlers.OnRespawningTeam; | ||
_handlers = null; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using System.Reflection; | ||
using System.Runtime.InteropServices; | ||
|
||
[assembly: AssemblyTitle("NoRespawns")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("")] | ||
[assembly: AssemblyProduct("NoRespawns")] | ||
[assembly: AssemblyCopyright("Copyright © 2024")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
|
||
[assembly: ComVisible(false)] | ||
|
||
[assembly: Guid("3545ab37-b908-4533-8985-fb4cc1c86eae")] | ||
|
||
[assembly: AssemblyVersion("1.0.0.0")] | ||
[assembly: AssemblyFileVersion("1.0.0.0")] |