mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-24 05:03:34 -04:00
Don't bother reloading map for ClassicalSharp <= 0.98.5
This commit is contained in:
parent
a8f5c6b5cb
commit
2e83c38642
@ -440,7 +440,6 @@ namespace MCGalaxy.Commands.CPE {
|
||||
|
||||
Player.Message(p, "Set {0} for {1} to {2}", parts[2], blockName, value);
|
||||
BlockDefinition.Add(def, defs, p == null ? null : p.level);
|
||||
ReloadMap(p, global);
|
||||
}
|
||||
|
||||
|
||||
@ -483,18 +482,7 @@ namespace MCGalaxy.Commands.CPE {
|
||||
}
|
||||
return block;
|
||||
}
|
||||
|
||||
static void ReloadMap(Player p, bool global) {
|
||||
Player[] players = PlayerInfo.Online.Items;
|
||||
foreach (Player pl in players) {
|
||||
if (!pl.hasBlockDefs) continue;
|
||||
if (!global && p.level != pl.level) continue;
|
||||
if (pl.level == null || !pl.level.HasCustomBlocks) continue;
|
||||
if (!pl.outdatedClient) continue;
|
||||
|
||||
LevelActions.ReloadMap(p, pl, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static byte GetFreeId(bool global, Level lvl) {
|
||||
// Start from opposite ends to avoid overlap.
|
||||
|
@ -29,7 +29,6 @@ namespace MCGalaxy.Core {
|
||||
|
||||
LoadWaypoints(p);
|
||||
LoadIgnores(p);
|
||||
CheckOutdatedClient(p);
|
||||
CheckLoginJailed(p);
|
||||
}
|
||||
|
||||
@ -92,25 +91,6 @@ namespace MCGalaxy.Core {
|
||||
p.SendMessage("&cType &a/ignore list &cto see who you are still ignoring");
|
||||
}
|
||||
|
||||
static void CheckOutdatedClient(Player p) {
|
||||
if (p.appName == null || !p.appName.StartsWith("ClassicalSharp ")) return;
|
||||
int spaceIndex = p.appName.IndexOf(' ');
|
||||
string version = p.appName.Substring(spaceIndex, p.appName.Length - spaceIndex);
|
||||
Version ver;
|
||||
try {
|
||||
ver = new Version(version);
|
||||
} catch {
|
||||
return;
|
||||
}
|
||||
|
||||
if (ver < new Version("0.98.6")) {
|
||||
p.SendMessage("%aYou are using an outdated version of ClassicalSharp.");
|
||||
p.SendMessage("%aYou can click %eCheck for updates %ain the launcher to update. " +
|
||||
"(make sure to close the client first)");
|
||||
p.outdatedClient = true;
|
||||
}
|
||||
}
|
||||
|
||||
static void CheckLoginJailed(Player p) {
|
||||
string line = Server.jailed.Find(p.name);
|
||||
if (line == null) return;
|
||||
|
@ -149,8 +149,6 @@ namespace MCGalaxy {
|
||||
public int overallDeath;
|
||||
|
||||
public bool staticCommands = false;
|
||||
internal bool outdatedClient = false; // for ClassicalSharp 0.98.5, which didn't reload map for BlockDefinitions
|
||||
|
||||
public DateTime ZoneSpam;
|
||||
|
||||
public bool aiming;
|
||||
|
Loading…
x
Reference in New Issue
Block a user