mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-23 12:42:22 -04:00
Fix chat tokens not working properly in welcome message.
This commit is contained in:
parent
b591b46ce6
commit
f30759285d
@ -64,22 +64,6 @@ namespace MCGalaxy.Core {
|
|||||||
if (!p.level.Config.UseBlockDB) {
|
if (!p.level.Config.UseBlockDB) {
|
||||||
Player.Message(p, "BlockDB is disabled here, &cyou will not be able to /undo or /redo");
|
Player.Message(p, "BlockDB is disabled here, &cyou will not be able to /undo or /redo");
|
||||||
}
|
}
|
||||||
ShowWelcome(p);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void ShowWelcome(Player p) {
|
|
||||||
if (p.showedWelcome) return;
|
|
||||||
p.showedWelcome = true;
|
|
||||||
p.LastAction = DateTime.UtcNow;
|
|
||||||
TextFile welcomeFile = TextFile.Files["Welcome"];
|
|
||||||
|
|
||||||
try {
|
|
||||||
welcomeFile.EnsureExists();
|
|
||||||
string[] welcome = welcomeFile.GetText();
|
|
||||||
Player.MessageLines(p, welcome);
|
|
||||||
} catch (Exception ex) {
|
|
||||||
Logger.LogError(ex);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static void HandlePlayerClick(Player p, MouseButton button, MouseAction action, ushort yaw, ushort pitch,
|
internal static void HandlePlayerClick(Player p, MouseButton button, MouseAction action, ushort yaw, ushort pitch,
|
||||||
|
@ -182,7 +182,6 @@ namespace MCGalaxy {
|
|||||||
|
|
||||||
public bool showPortals, showMBs;
|
public bool showPortals, showMBs;
|
||||||
public string prevMsg = "";
|
public string prevMsg = "";
|
||||||
internal bool showedWelcome;
|
|
||||||
|
|
||||||
//Movement
|
//Movement
|
||||||
internal int oldIndex = -1, lastWalkthrough = -1, startFallY = -1, lastFallY = -1;
|
internal int oldIndex = -1, lastWalkthrough = -1, startFallY = -1, lastFallY = -1;
|
||||||
|
@ -20,10 +20,11 @@ using MCGalaxy.Commands;
|
|||||||
using MCGalaxy.DB;
|
using MCGalaxy.DB;
|
||||||
using MCGalaxy.Events.PlayerEvents;
|
using MCGalaxy.Events.PlayerEvents;
|
||||||
using MCGalaxy.Games;
|
using MCGalaxy.Games;
|
||||||
|
using MCGalaxy.Maths;
|
||||||
using MCGalaxy.Network;
|
using MCGalaxy.Network;
|
||||||
using MCGalaxy.SQL;
|
using MCGalaxy.SQL;
|
||||||
using MCGalaxy.Tasks;
|
using MCGalaxy.Tasks;
|
||||||
using MCGalaxy.Maths;
|
using MCGalaxy.Util;
|
||||||
|
|
||||||
namespace MCGalaxy {
|
namespace MCGalaxy {
|
||||||
public partial class Player : IDisposable {
|
public partial class Player : IDisposable {
|
||||||
@ -78,6 +79,7 @@ namespace MCGalaxy {
|
|||||||
LastLogin = DateTime.Now;
|
LastLogin = DateTime.Now;
|
||||||
TotalTime = TimeSpan.FromSeconds(1);
|
TotalTime = TimeSpan.FromSeconds(1);
|
||||||
GetPlayerStats();
|
GetPlayerStats();
|
||||||
|
ShowWelcome();
|
||||||
|
|
||||||
Server.Background.QueueOnce(ShowAltsTask, name, TimeSpan.Zero);
|
Server.Background.QueueOnce(ShowAltsTask, name, TimeSpan.Zero);
|
||||||
CheckState();
|
CheckState();
|
||||||
@ -159,6 +161,19 @@ namespace MCGalaxy {
|
|||||||
Loading = false;
|
Loading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ShowWelcome() {
|
||||||
|
LastAction = DateTime.UtcNow;
|
||||||
|
TextFile welcomeFile = TextFile.Files["Welcome"];
|
||||||
|
|
||||||
|
try {
|
||||||
|
welcomeFile.EnsureExists();
|
||||||
|
string[] welcome = welcomeFile.GetText();
|
||||||
|
Player.MessageLines(this, welcome);
|
||||||
|
} catch (Exception ex) {
|
||||||
|
Logger.LogError(ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
unsafe static byte NextFreeId() {
|
unsafe static byte NextFreeId() {
|
||||||
byte* used = stackalloc byte[256];
|
byte* used = stackalloc byte[256];
|
||||||
for (int i = 0; i < 256; i++)
|
for (int i = 0; i < 256; i++)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user