mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-23 12:42:22 -04:00
Fix /xjail still moving higher ranked players to the xjail map (but not actually jailing them). (thanks lavacraft)
This commit is contained in:
parent
b8a306e62c
commit
f020920ba5
@ -42,32 +42,35 @@ namespace MCGalaxy.Commands {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Player pl = PlayerInfo.FindMatches(p, message);
|
Player who = PlayerInfo.FindMatches(p, message);
|
||||||
if (pl == null) return;
|
if (who == null) return;
|
||||||
|
if (p != null && who.Rank >= p.Rank) {
|
||||||
|
MessageTooHighRank(p, "xjail", false); return;
|
||||||
|
}
|
||||||
|
|
||||||
Command spawn = Command.all.Find("spawn");
|
Command spawn = Command.all.Find("spawn");
|
||||||
Command freeze = Command.all.Find("freeze");
|
Command freeze = Command.all.Find("freeze");
|
||||||
Command mute = Command.all.Find("mute");
|
Command mute = Command.all.Find("mute");
|
||||||
|
|
||||||
string data = Server.jailed.Find(pl.name);
|
string data = Server.jailed.Find(who.name);
|
||||||
if (data == null) {
|
if (data == null) {
|
||||||
if (!pl.muted) mute.Use(p, message);
|
if (!who.muted) mute.Use(p, message);
|
||||||
if (!pl.frozen) freeze.Use(p, message);
|
if (!who.frozen) freeze.Use(p, message);
|
||||||
|
|
||||||
PlayerActions.ChangeMap(pl, xjailMap);
|
PlayerActions.ChangeMap(who, xjailMap);
|
||||||
pl.BlockUntilLoad(10);
|
who.BlockUntilLoad(10);
|
||||||
jail.Use(p, message);
|
jail.Use(p, message);
|
||||||
Chat.MessageAll("{0} %Swas XJailed!", pl.ColoredName);
|
Chat.MessageAll("{0} %Swas XJailed!", who.ColoredName);
|
||||||
} else {
|
} else {
|
||||||
if (pl.muted) mute.Use(p, message);
|
if (who.muted) mute.Use(p, message);
|
||||||
if (pl.frozen) freeze.Use(p, message);
|
if (who.frozen) freeze.Use(p, message);
|
||||||
|
|
||||||
PlayerActions.ChangeMap(pl, Server.mainLevel.name);
|
PlayerActions.ChangeMap(who, Server.mainLevel.name);
|
||||||
pl.BlockUntilLoad(10);
|
who.BlockUntilLoad(10);
|
||||||
|
|
||||||
jail.Use(p, message);
|
jail.Use(p, message);
|
||||||
spawn.Use(pl, "");
|
spawn.Use(who, "");
|
||||||
Chat.MessageAll("{0} %Swas released from XJail!", pl.ColoredName);
|
Chat.MessageAll("{0} %Swas released from XJail!", who.ColoredName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user