Skip to content

Commit

Permalink
No Description?
Browse files Browse the repository at this point in the history
  • Loading branch information
Carl-Frellett authored Aug 21, 2024
1 parent 8e711f9 commit 96ca8f3
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Exiled.API.Features;
using JBAPI.Log;
using JBPI.Log;
using MEC;
using RueI.Displays;
Expand All @@ -23,7 +24,7 @@ public static Display GetOrCreateDisplay(ReferenceHub hub)
}
}

public static void PosHint(this Player 玩家, float 位置, string 文本, bool 是否启用日志 = true, int 时间 = 5)
public static void PosHint(this Player 玩家, float 位置, string 文本, bool 是否启用日志, int 时间 = 5)
{
if (玩家 != null && 玩家.ReferenceHub != null)
{
Expand All @@ -34,7 +35,6 @@ public static void PosHint(this Player 玩家, float 位置, string 文本, bool
SetElement 元素 = new SetElement(位置 + 向下的位置, 文本)
{
Position = 位置 + 向下的位置,
Enabled = 是否启用日志,
};

显示.Elements.Add(元素);
Expand All @@ -46,9 +46,10 @@ public static void PosHint(this Player 玩家, float 位置, string 文本, bool
显示.Elements.Remove(元素);
显示.Update();
});

if (是否启用日志 == true)
{
ServerConsoleMessage.日志($"JBAPI.Hint调用");
ServerCC.日志("JBAPI.Hint调用");
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public static Display GetOrCreateDisplay(ReferenceHub hub)
}
}

public static void RuelHint(this Player 玩家, float 位置, string 文本, bool 是否启用日志 = true, int 时间 = 5)
public static void RuelHint(this Player 玩家, float 位置, string 文本, bool 是否启用日志, int 时间 = 5)
{
if (玩家 != null && 玩家.ReferenceHub != null)
{
Expand All @@ -32,7 +32,6 @@ public static void RuelHint(this Player 玩家, float 位置, string 文本, boo
SetElement 元素 = new SetElement(位置, 文本)
{
Position = 位置,
Enabled = 是否启用日志,
};

显示.Elements.Add(元素);
Expand All @@ -44,9 +43,10 @@ public static void RuelHint(this Player 玩家, float 位置, string 文本, boo
显示.Elements.Remove(元素);
显示.Update();
});

if (是否启用日志 == true)
{
ServerConsoleMessage.日志($"JBAPI.Htnt调用");
ServerCC.日志("JBAPI.Hint调用");
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace JBAPI.Log
{
public static class GameConsoleMessage
public static class GameCC
{
public static void 控制台消息(this Player 玩家, string 消息, ConsoleLevel 级别)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
namespace JBPI.Log
using Exiled.API.Features;

namespace JBPI.Log
{
public static class ServerConsoleMessage
public static class ServerCC
{
// 默认情况下的日志
public static void 日志(string 消息)
Expand All @@ -12,7 +14,7 @@ public static void 警告(string 消息)

// 调式日志 Debug
public static void 调试(string 消息)
=> ServerConsole.AddLog($"[调试] {消息}", System.ConsoleColor.Gray);
=> Exiled.API.Features.Log.Debug(消息);

// 发生错误时的日志
public static void 错误(string 消息)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public static void ORTag(this Player 玩家, string 文本, string 颜色)
{
玩家.RankName = 文本;
玩家.RankColor = 颜色;
ServerConsoleMessage.日志($"JBAPI.OnlyColor调用 玩家 {玩家.Nickname} ({玩家.UserId})");
ServerCC.日志($"JBAPI.OnlyColor调用 玩家 {玩家.Nickname} ({玩家.UserId})");
});
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public static void RTag(this Player 玩家, string 文本, bool 是否启用)

var 霸王龙 = 玩家.GameObject.GetComponent<TagController>();

ServerConsoleMessage.日志($"JBAPI.somecolor调用 玩家 {玩家.Nickname} ({玩家.UserId})");
ServerCC.日志($"JBAPI.somecolor调用 玩家 {玩家.Nickname} ({玩家.UserId})");


if (霸王龙 == null)
Expand Down

0 comments on commit 96ca8f3

Please sign in to comment.