-
Notifications
You must be signed in to change notification settings - Fork 175
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
8 changed files
with
199 additions
and
53 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 |
---|---|---|
@@ -1,56 +1,51 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
|
||
<PropertyGroup Condition="$(BaseProperties) == '' OR $(BaseProperties) == 'true'"> | ||
<Authors>Exiled Team</Authors> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="$(BuildProperties) == '' OR $(BuildProperties) == 'true'"> | ||
<TargetFramework>net48</TargetFramework> | ||
<LangVersion>9.0</LangVersion> | ||
<PlatformTarget>x64</PlatformTarget> | ||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> | ||
<OutputPath>$(MSBuildThisFileDirectory)\bin\$(Configuration)\</OutputPath> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<!-- This is the global version and is used for all projects that don't have a version --> | ||
<Version Condition="$(Version) == ''">9.0.0-alpha.10</Version> | ||
<!-- Enables public beta warning via the PUBLIC_BETA constant --> | ||
<PublicBeta>false</PublicBeta> | ||
|
||
<HarmonyVersion>2.2.2</HarmonyVersion> | ||
<StyleCopVersion>1.1.118</StyleCopVersion> | ||
<SemanticVersioningVersion>2.0.2</SemanticVersioningVersion> | ||
<YamlDotNetVersion>13.7.1</YamlDotNetVersion> | ||
|
||
<Copyright>Copyright © $(Authors) 2020 - $([System.DateTime]::Now.ToString("yyyy"))</Copyright> | ||
<RepositoryType>Git</RepositoryType> | ||
<RepositoryUrl>https://github.com/Exiled-Team/EXILED</RepositoryUrl> | ||
<PackageProjectUrl>https://github.com/Exiled-Team/EXILED</PackageProjectUrl> | ||
<PackageLicenseExpression>CC-BY-SA-3.0</PackageLicenseExpression> | ||
|
||
<DefineConstants Condition="$(PublicBeta) == 'true'">$(DefineConstants);PUBLIC_BETA</DefineConstants> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<None Include="$(MSBuildProjectDirectory)\README.md" Pack="true" PackagePath="\" Condition="Exists('$(MSBuildProjectDirectory)\README.md')"/> | ||
</ItemGroup> | ||
|
||
<PropertyGroup Condition="'$(Configuration)' == 'Release'"> | ||
<TreatWarningsAsErrors>True</TreatWarningsAsErrors> | ||
<GenerateDocumentationFile>True</GenerateDocumentationFile> | ||
<DebugType>Portable</DebugType> | ||
</PropertyGroup> | ||
|
||
<!-- Disable warning about disabled generation of xml files on debug build --> | ||
<PropertyGroup Condition="'$(Configuration)' == 'Debug'"> | ||
<GenerateDocumentationFile>True</GenerateDocumentationFile> | ||
<NoWarn>$(NoWarn);SA0001</NoWarn> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion> | ||
</PropertyGroup> | ||
|
||
</Project> | ||
<PropertyGroup Condition="$(BaseProperties) == '' OR $(BaseProperties) == 'true'"> | ||
<Authors>Exiled Team</Authors> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="$(BuildProperties) == '' OR $(BuildProperties) == 'true'"> | ||
<TargetFramework>net48</TargetFramework> | ||
<LangVersion>9.0</LangVersion> | ||
<PlatformTarget>x64</PlatformTarget> | ||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> | ||
<OutputPath>$(MSBuildThisFileDirectory)\bin\$(Configuration)\</OutputPath> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<!-- This is the global version and is used for all projects that don't have a version --> | ||
<Version Condition="$(Version) == ''">8.9.7</Version> | ||
<!-- Enables public beta warning via the PUBLIC_BETA constant --> | ||
<PublicBeta>false</PublicBeta> | ||
|
||
<HarmonyVersion>2.2.2</HarmonyVersion> | ||
<StyleCopVersion>1.1.118</StyleCopVersion> | ||
<SemanticVersioningVersion>2.0.2</SemanticVersioningVersion> | ||
|
||
<Copyright>Copyright © $(Authors) 2020 - $([System.DateTime]::Now.ToString("yyyy"))</Copyright> | ||
<RepositoryType>Git</RepositoryType> | ||
<RepositoryUrl>https://github.com/Exiled-Team/EXILED</RepositoryUrl> | ||
<PackageProjectUrl>https://github.com/Exiled-Team/EXILED</PackageProjectUrl> | ||
<PackageLicenseExpression>CC-BY-SA-3.0</PackageLicenseExpression> | ||
|
||
<DefineConstants Condition="$(PublicBeta) == 'true'">$(DefineConstants);PUBLIC_BETA</DefineConstants> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(Configuration)' == 'Release'"> | ||
<TreatWarningsAsErrors>True</TreatWarningsAsErrors> | ||
<GenerateDocumentationFile>True</GenerateDocumentationFile> | ||
<DebugType>Portable</DebugType> | ||
</PropertyGroup> | ||
|
||
<!-- Disable warning about disabled generation of xml files on debug build --> | ||
<PropertyGroup Condition="'$(Configuration)' == 'Debug'"> | ||
<GenerateDocumentationFile>True</GenerateDocumentationFile> | ||
<NoWarn>$(NoWarn);SA0001</NoWarn> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion> | ||
</PropertyGroup> | ||
|
||
</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,50 @@ | ||
// ----------------------------------------------------------------------- | ||
// <copyright file="Exiled.cs" company="Exiled Team"> | ||
// Copyright (c) Exiled Team. All rights reserved. | ||
// Licensed under the CC BY-SA 3.0 license. | ||
// </copyright> | ||
// ----------------------------------------------------------------------- | ||
|
||
namespace Exiled.Events.Commands.ExiledReboot | ||
{ | ||
using System; | ||
|
||
using CommandSystem; | ||
|
||
/// <summary> | ||
/// The Exiled Reboot parent command. | ||
/// </summary> | ||
[CommandHandler(typeof(GameConsoleCommandHandler))] | ||
public class Exiled : ParentCommand | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="Exiled"/> class. | ||
/// </summary> | ||
public Exiled() | ||
{ | ||
LoadGeneratedCommands(); | ||
} | ||
|
||
/// <inheritdoc/> | ||
public override string Command { get; } = "exiled"; | ||
|
||
/// <inheritdoc/> | ||
public override string[] Aliases { get; } = new[] { "ex" }; | ||
|
||
/// <inheritdoc/> | ||
public override string Description { get; } = "Perform critical actions on behalf of Exiled Reboot."; | ||
|
||
/// <inheritdoc/> | ||
public override void LoadGeneratedCommands() | ||
{ | ||
RegisterCommand(Reboot.Instance); | ||
} | ||
|
||
/// <inheritdoc/> | ||
protected override bool ExecuteParent(ArraySegment<string> arguments, ICommandSender sender, out string response) | ||
{ | ||
response = "Please, specify a valid subcommand! Available ones: reboot"; | ||
return 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,49 @@ | ||
// ----------------------------------------------------------------------- | ||
// <copyright file="Reboot.cs" company="Exiled Team"> | ||
// Copyright (c) Exiled Team. All rights reserved. | ||
// Licensed under the CC BY-SA 3.0 license. | ||
// </copyright> | ||
// ----------------------------------------------------------------------- | ||
|
||
namespace Exiled.Events.Commands.ExiledReboot | ||
{ | ||
using System; | ||
using System.IO; | ||
|
||
using CommandSystem; | ||
using global::Exiled.Loader; | ||
using MEC; | ||
using PluginAPI.Helpers; | ||
|
||
/// <summary> | ||
/// The Exiled Reboot command. | ||
/// </summary> | ||
public class Reboot : ICommand | ||
{ | ||
/// <summary> | ||
/// Gets static instance of the <see cref="Reboot"/> command. | ||
/// </summary> | ||
public static Reboot Instance { get; } = new(); | ||
|
||
/// <inheritdoc/> | ||
public string Command { get; } = "reboot"; | ||
|
||
/// <inheritdoc/> | ||
public string[] Aliases { get; } = new[] { "ack", "exboot" }; | ||
|
||
/// <inheritdoc/> | ||
public string Description { get; } = "Enables Exiled Reboot."; | ||
|
||
/// <inheritdoc /> | ||
public bool SanitizeResponse { get; } | ||
|
||
/// <inheritdoc/> | ||
public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out string response) | ||
{ | ||
LoaderPlugin.TempReboot = true; | ||
Loader.ReloadPlugins(); | ||
response = "Exiled Reboot has been enabled. Logs will be suppressed until the next round. To permanently disable them, set the 'Reboot' config to true. Join our new Discord at discord.gg/exiledreboot for updates."; | ||
return true; | ||
} | ||
} | ||
} |
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
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
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
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
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