mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-17 03:10:39 -04:00
Updated OS Block
This commit is contained in:
parent
5bbf389500
commit
56a7357c46
@ -781,7 +781,10 @@ namespace MCGalaxy.Commands
|
||||
if (blocked == null) { Player.SendMessage(p, "Cannot find player."); return; }
|
||||
if (blocked.isStaff) { Player.SendMessage(p, "Can't let you do that."); return; }
|
||||
string path = "levels/blacklists/" + p.level.name + ".txt";
|
||||
if (File.ReadAllText(path).Contains(blocked.name)) { Player.SendMessage(p, blocked.name + " is already blacklisted."); return; }
|
||||
if (File.Exists(path))
|
||||
{
|
||||
if (File.ReadAllText(path).Contains(blocked.name)) { Player.SendMessage(p, blocked.name + " is already blacklisted."); return; }
|
||||
}
|
||||
if (!Directory.Exists("levels/blacklists/"))
|
||||
{
|
||||
Directory.CreateDirectory("levels/blacklists/");
|
||||
@ -800,6 +803,7 @@ namespace MCGalaxy.Commands
|
||||
}
|
||||
catch { Server.s.Log("Error saving level blacklist"); }
|
||||
Player.SendMessage(p, blocked.name + " has been blacklisted from your map.");
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user