699d4ede1d
Add .prettierrc.json, .markdownlint.json, .yamllint.yaml, .gitattributes Run CSharpier, Prettier and markdownlint across the entire codebase. No logic changes — formatting, using order and line endings only.
30 lines
783 B
C#
30 lines
783 B
C#
using System.Linq;
|
|
using Dalamud.Plugin;
|
|
using HellionChat.Resources;
|
|
|
|
namespace HellionChat;
|
|
|
|
internal static class ChatTwoConflictDetector
|
|
{
|
|
private const string UpstreamInternalName = "ChatTwo";
|
|
|
|
public static void ThrowIfChatTwoIsLoaded(IDalamudPluginInterface pluginInterface)
|
|
{
|
|
var conflict = pluginInterface.InstalledPlugins.FirstOrDefault(p =>
|
|
p.InternalName == UpstreamInternalName && p.IsLoaded
|
|
);
|
|
|
|
if (conflict is null)
|
|
return;
|
|
|
|
var message =
|
|
HellionStrings.ChatTwoConflictTitle
|
|
+ "\n\n"
|
|
+ HellionStrings.ChatTwoConflictBody
|
|
+ "\n\n"
|
|
+ HellionStrings.ChatTwoConflictAction;
|
|
|
|
throw new System.InvalidOperationException(message);
|
|
}
|
|
}
|