mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-26 06:43:25 -04:00
Make all 'you can only use on X rank or below' messages consistent.
This commit is contained in:
parent
fe45ec9552
commit
df6214160c
@ -56,7 +56,14 @@ namespace MCGalaxy {
|
||||
|
||||
if (i >= red && i <= white)
|
||||
Properties[i].KilledByLava = true;
|
||||
if (i == air || i == shrub || (i >= yellowflower && i <= redmushroom) {
|
||||
Properties[i].KilledByLava = true;
|
||||
Properties[i].KilledByWater = true;
|
||||
}
|
||||
}
|
||||
// Block specific properties
|
||||
Properties[wood].KilledByLava = true; Properties[trunk].KilledByLava = true;
|
||||
Properties[sponge].KilledByLava = true; Properties[bookcase].KilledByLava = true;
|
||||
SetupDefaultNames();
|
||||
}
|
||||
|
||||
|
108
Blocks/Block.cs
108
Blocks/Block.cs
@ -21,23 +21,9 @@ namespace MCGalaxy
|
||||
{
|
||||
public sealed partial class Block
|
||||
{
|
||||
public static bool Walkthrough(byte type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case air:
|
||||
case water:
|
||||
case waterstill:
|
||||
case lava:
|
||||
case lavastill:
|
||||
case yellowflower:
|
||||
case redflower:
|
||||
case mushroom:
|
||||
case redmushroom:
|
||||
case shrub:
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
public static bool Walkthrough(byte type) {
|
||||
return type == air || type == shrub || (type >= water && type <= lavastill)
|
||||
&& (type >= yelllowflower && type <= redmushroom);
|
||||
}
|
||||
|
||||
public static bool AllowBreak(byte type)
|
||||
@ -98,35 +84,14 @@ namespace MCGalaxy
|
||||
return false;
|
||||
}
|
||||
|
||||
public static bool Placable(byte type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
// case Block.air:
|
||||
// case Block.grass:
|
||||
case Block.blackrock:
|
||||
case Block.water:
|
||||
case Block.waterstill:
|
||||
case Block.lava:
|
||||
case Block.lavastill:
|
||||
return false;
|
||||
}
|
||||
return type < Block.CpeCount;
|
||||
public static bool Placable(byte type) {
|
||||
return !(type == blackrock || (type >= water && type <= lavstill)
|
||||
&& type < Block.CpeCount;
|
||||
}
|
||||
|
||||
public static bool RightClick(byte type, bool countAir = false)
|
||||
{
|
||||
public static bool RightClick(byte type, bool countAir = false) {
|
||||
if (countAir && type == Block.air) return true;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case Block.water:
|
||||
case Block.lava:
|
||||
case Block.waterstill:
|
||||
case Block.lavastill:
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return type >= water && type <= lavastill;
|
||||
}
|
||||
|
||||
public static bool OPBlocks(byte type) { return Properties[type].OPBlock; }
|
||||
@ -169,60 +134,17 @@ namespace MCGalaxy
|
||||
public static bool BuildIn(byte type)
|
||||
{
|
||||
if (type == op_water || type == op_lava || Block.portal(type) || Block.mb(type)) return false;
|
||||
|
||||
switch (Block.Convert(type))
|
||||
{
|
||||
case water:
|
||||
case lava:
|
||||
case waterstill:
|
||||
case lavastill:
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
type = Block.Convert(type);
|
||||
return type >= water && type <= lavastill;
|
||||
}
|
||||
|
||||
public static bool Mover(byte type) {
|
||||
return walkthroughHandlers[type] != null;
|
||||
}
|
||||
public static bool Mover(byte type) { return walkthroughHandlers[type] != null; }
|
||||
|
||||
public static bool FireKill(byte type) {
|
||||
return type != Block.air && LavaKill(type);
|
||||
}
|
||||
public static bool FireKill(byte type) { return type != air && Properties[type].KilledByLava; }
|
||||
|
||||
public static bool LavaKill(byte type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case Block.air:
|
||||
case Block.wood:
|
||||
case Block.shrub:
|
||||
case Block.trunk:
|
||||
case Block.leaf:
|
||||
case Block.sponge:
|
||||
case Block.yellowflower:
|
||||
case Block.redflower:
|
||||
case Block.mushroom:
|
||||
case Block.redmushroom:
|
||||
case Block.bookcase:
|
||||
return true;
|
||||
}
|
||||
return Properties[type].KilledByLava;
|
||||
}
|
||||
public static bool WaterKill(byte type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case Block.air:
|
||||
case Block.shrub:
|
||||
case Block.leaf:
|
||||
case Block.yellowflower:
|
||||
case Block.redflower:
|
||||
case Block.mushroom:
|
||||
case Block.redmushroom:
|
||||
return true;
|
||||
}
|
||||
return Properties[type].KilledByWater;
|
||||
}
|
||||
public static bool LavaKill(byte type) { return Properties[type].KilledByLava; }
|
||||
|
||||
public static bool WaterKill(byte type) { return Properties[type].KilledByWater; }
|
||||
|
||||
public static bool LightPass(byte type, byte extType, BlockDefinition[] defs) {
|
||||
switch (Convert(type)) {
|
||||
|
@ -208,8 +208,7 @@ namespace MCGalaxy.Commands {
|
||||
return;
|
||||
}
|
||||
if (pl.group.Permission >= p.group.Permission) {
|
||||
Player.SendMessage(p, "You can't force someone of a higher or equal rank to join a chatroom.");
|
||||
return;
|
||||
MessageTooHighRank(p, "force-join", false); return;
|
||||
}
|
||||
|
||||
if (pl.spyChatRooms.Contains(room)) {
|
||||
@ -234,8 +233,7 @@ namespace MCGalaxy.Commands {
|
||||
Player pl = PlayerInfo.FindOrShowMatches(p, name);
|
||||
if (pl == null) return;
|
||||
if (pl.group.Permission >= p.group.Permission) {
|
||||
Player.SendMessage(p, "You can't kick someone of a higher or equal rank from a chatroom.");
|
||||
return;
|
||||
MessageTooHighRank(p, "kick from a chatroom", false); return;
|
||||
}
|
||||
|
||||
Player.SendMessage(pl, "You were kicked from the chat room '" + pl.Chatroom + "'");
|
||||
|
@ -51,7 +51,7 @@ namespace MCGalaxy.Commands {
|
||||
Player.SendMessage(p, "You cannot %cdeath-hug %Sat your current rank."); return;
|
||||
}
|
||||
if (p != null && who.group.Permission > p.group.Permission) {
|
||||
Player.SendMessage(p, "You can't %cdeath-hug %Ssomeone of greater rank."); return;
|
||||
MessageTooHighRank(p, "&cdeath-hug%S", true); return;
|
||||
}
|
||||
who.HandleDeath(Block.rock, " died from a %cdeadly hug.");
|
||||
}
|
||||
|
@ -70,6 +70,17 @@ namespace MCGalaxy
|
||||
else
|
||||
Player.SendMessage(p, "Only " + grp.color + grp.name + "%s+ can " + action);
|
||||
}
|
||||
|
||||
protected void MessageTooHighRank(Player p, string action, bool canAffectOwnRank) {
|
||||
MessageTooHighRank(p, action, p.group, canAffectOwnRank);
|
||||
}
|
||||
|
||||
protected void MessageTooHighRank(Player p, string action, Group grp, bool canAffectGroup) {
|
||||
if (canAffectGroup)
|
||||
Player.SendMessage(p, "Can only " + action + " players ranked " + grp.color + grp.name + " %Sor below");
|
||||
else
|
||||
Player.SendMessage(p, "Can only " + action + " players ranked below " + grp.color + grp.name);
|
||||
}
|
||||
}
|
||||
|
||||
public struct CommandPerm {
|
||||
|
@ -204,7 +204,7 @@ namespace MCGalaxy.Commands {
|
||||
Player who = PlayerInfo.FindOrShowMatches(p, target);
|
||||
if (who == null) return;
|
||||
if (p.group.Permission < who.group.Permission) {
|
||||
Player.SendMessage(p, "You can't send rules to someone of a higher rank than yourself!!"); return;
|
||||
MessageTooHighRank(p, "send countdown rules", true); return;
|
||||
} else {
|
||||
Player.SendMessage(who, "Countdown rules sent to you by " + p.color + p.name);
|
||||
Player.SendMessage(who, "The aim of the game is to stay alive the longest.");
|
||||
|
@ -45,7 +45,7 @@ namespace MCGalaxy.Commands {
|
||||
return;
|
||||
}
|
||||
if (p != null && who.group.Permission > p.group.Permission) {
|
||||
Player.SendMessage(p, "You cannot slap someone ranked higher than you!"); return;
|
||||
MessageTooHighRank(p, "slap", true); return;
|
||||
}
|
||||
|
||||
ushort curX = (ushort)(who.pos[0] / 32), curY = (ushort)(who.pos[1] / 32), curZ = (ushort)(who.pos[2] / 32);
|
||||
|
@ -40,7 +40,7 @@ namespace MCGalaxy.Commands
|
||||
who = PlayerInfo.FindOrShowMatches(p, message);
|
||||
if (who == null) return;
|
||||
if (p != null && p.group.Permission < who.group.Permission) {
|
||||
Player.SendMessage(p, "You cannot send /oprules to a higher or same ranked player."); return;
|
||||
MessageTooHighRank(p, "send /oprules", false); return;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -95,14 +95,14 @@ namespace MCGalaxy.Commands {
|
||||
|
||||
bool CheckPerms(string name, Group group, Player p) {
|
||||
if ((int)group.Permission >= CommandOtherPerms.GetPerm(this)) {
|
||||
string highest = Group.findPermInt(CommandOtherPerms.GetPerm(this)).name;
|
||||
Player.SendMessage(p, "You can't ban players ranked " + highest + " or higher!"); return false;
|
||||
Group grp = Group.findPermInt(CommandOtherPerms.GetPerm(this));
|
||||
MessageTooHighRank(p, "ban", grp, false); return false;
|
||||
}
|
||||
if (group.Permission == LevelPermission.Banned) {
|
||||
Player.SendMessage(p, name + " is already banned."); return false;
|
||||
}
|
||||
if (p != null && group.Permission >= p.group.Permission) {
|
||||
Player.SendMessage(p, "You cannot ban a person ranked equal or higher than you."); return false;
|
||||
MessageTooHighRank(p, "ban", false); return false;
|
||||
}
|
||||
|
||||
group.playerList.Remove(name);
|
||||
|
@ -95,7 +95,7 @@ namespace MCGalaxy.Commands
|
||||
}
|
||||
if (who == null) { Player.SendMessage(p, "Could not find player."); return; }
|
||||
else if (who == p) { Player.SendMessage(p, "Cannot follow yourself."); return; }
|
||||
else if (who.group.Permission >= p.group.Permission) { Player.SendMessage(p, "Cannot follow someone of equal or greater rank."); return; }
|
||||
else if (who.group.Permission >= p.group.Permission) { MessageTooHighRank(p, "follow", false); return;}
|
||||
else if (who.following != "") { Player.SendMessage(p, who.DisplayName + " is already following " + who.following); return; }
|
||||
|
||||
if (!p.hidden) Command.all.Find("hide").Use(p, "");
|
||||
|
@ -32,7 +32,7 @@ namespace MCGalaxy.Commands
|
||||
if (who == null) return;
|
||||
if (p == who) { Player.SendMessage(p, "Cannot freeze yourself."); return; }
|
||||
if (p != null && who.group.Permission >= p.group.Permission) {
|
||||
Player.SendMessage(p, "Cannot freeze someone of equal or greater rank."); return;
|
||||
MessageTooHighRank(p, "freeze", false); return;
|
||||
}
|
||||
|
||||
string frozenby = (p == null) ? "(console)" : p.ColoredName;
|
||||
|
@ -40,7 +40,7 @@ namespace MCGalaxy.Commands
|
||||
|
||||
if (!who.jailed) {
|
||||
if (p != null &&who.group.Permission >= p.group.Permission) {
|
||||
Player.SendMessage(p, "Cannot jail someone of equal or greater rank."); return;
|
||||
MessageTooHighRank(p, "jail", false); return;
|
||||
}
|
||||
Player.SendMessage(p, "You jailed " + who.DisplayName);
|
||||
Player.GlobalDespawn(who, false);
|
||||
|
@ -37,7 +37,9 @@ namespace MCGalaxy.Commands {
|
||||
|
||||
Player who = PlayerInfo.FindOrShowMatches(p, message);
|
||||
if (who == null) return;
|
||||
if (p != null && who.group.Permission > p.group.Permission) { Player.SendMessage(p, "Cannot joker someone of equal or greater rank."); return; }
|
||||
if (p != null && who.group.Permission > p.group.Permission) {
|
||||
MessageTooHighRank(p, "joker", true); return;
|
||||
}
|
||||
|
||||
if (!who.joker) {
|
||||
if (stealth) {
|
||||
|
@ -48,7 +48,7 @@ namespace MCGalaxy.Commands
|
||||
Extensions.DeleteLineWord("ranks/muted.txt", who.name.ToLower());
|
||||
} else {
|
||||
if (p != null && who.group.Permission >= p.group.Permission) {
|
||||
Player.SendMessage(p, "Cannot mute someone of a higher or equal rank."); return;
|
||||
MessageTooHighRank(p, "mute", false); return;
|
||||
}
|
||||
who.muted = true;
|
||||
Player.SendChatFrom(who, who.color + who.DisplayName + " %Shas been &8muted", false);
|
||||
|
@ -39,7 +39,7 @@ namespace MCGalaxy.Commands
|
||||
}
|
||||
if (who.group.Permission >= p.group.Permission)
|
||||
{
|
||||
Player.SendMessage(p, "Cannot use this on someone of equal or greater rank."); return;
|
||||
MessageTooHighRank(p, "hide", false); return;
|
||||
}
|
||||
Command.all.Find("hide").Use(who, "");
|
||||
Player.SendMessage(p, "Used /hide on " + who.color + who.name + "%S.");
|
||||
|
@ -37,7 +37,7 @@ namespace MCGalaxy.Commands {
|
||||
|
||||
if (source == null || target == null) return;
|
||||
if (p.group.Permission < source.group.Permission) {
|
||||
Player.SendMessage(p, "You cannot force a player of higher rank to tp to another player."); return;
|
||||
MessageTooHighRank(p, "teleport", true); return;
|
||||
}
|
||||
Player.SendMessage(p, "Attempting to teleport " + source.name + " to " + target.name + ".");
|
||||
Command.all.Find("tp").Use(source, target.name);
|
||||
|
@ -57,7 +57,7 @@ namespace MCGalaxy.Commands {
|
||||
Player who = PlayerInfo.FindOrShowMatches(p, message);
|
||||
if (who == null) return;
|
||||
if (who.group.Permission >= p.group.Permission) {
|
||||
Player.SendMessage(p, "Cannot possess someone of equal or greater rank."); return;
|
||||
MessageTooHighRank(p, "possess", false); return;
|
||||
}
|
||||
|
||||
if (who.possess != "") {
|
||||
|
@ -56,7 +56,7 @@ namespace MCGalaxy.Commands {
|
||||
if (who == null) {
|
||||
return;
|
||||
} else if (who.group.Permission > p.group.Permission && p != who) {
|
||||
Player.SendMessage(p, "Cannot reload the map of someone higher than you."); return;
|
||||
MessageTooHighRank(p, "reload the map for", true); return;
|
||||
}
|
||||
ReloadMap(p, who, true);
|
||||
}
|
||||
|
@ -76,7 +76,10 @@ namespace MCGalaxy.Commands
|
||||
Player.SendMessage(p, "Cannot change the rank to or from \"" + banned.name + "\"."); return false;
|
||||
}
|
||||
if (p != null && (group.Permission >= p.group.Permission || newRank.Permission >= p.group.Permission)) {
|
||||
Player.SendMessage(p, "Cannot change the rank of someone of or to a rank equal or higher to yours."); return false;
|
||||
MessageTooHighRank(p, "change the rank of", false); return false;
|
||||
}
|
||||
if (p != null && (newRank.Permission >= p.group.Permission)) {
|
||||
Player.SendMessage(p, "Cannot change the rank of a player to a rank equal or higher to yours."); return false;
|
||||
}
|
||||
|
||||
if (who != null) {
|
||||
|
@ -36,7 +36,7 @@ namespace MCGalaxy.Commands {
|
||||
if (!Player.ValidName(target)) { Player.SendMessage(p, "Invalid name \"" + target + "\"."); return; }
|
||||
Group grp = who == null ? PlayerInfo.GetGroup(target) : who.group;
|
||||
if (p != null && grp.Permission >= p.group.Permission) {
|
||||
Player.SendMessage(p, "Cannot temp ban someone of the same or higher rank."); return;
|
||||
MessageTooHighRank(p, "temp ban", false); return;
|
||||
}
|
||||
|
||||
int minutes = 60;
|
||||
|
@ -66,7 +66,7 @@ namespace MCGalaxy.Commands {
|
||||
|
||||
void UndoOnlinePlayer(Player p, Player who, CatchPos cpos, ushort x, ushort y, ushort z) {
|
||||
if (p != who && who.group.Permission >= p.group.Permission) {
|
||||
Player.SendMessage(p, "Cannot undo a user of higher or equal rank"); return;
|
||||
MessageTooHighRank(p, "undo", false); return;
|
||||
}
|
||||
|
||||
UndoOnlineDrawOp op = new UndoOnlineDrawOp();
|
||||
@ -84,7 +84,7 @@ namespace MCGalaxy.Commands {
|
||||
void UndoOfflinePlayer(Player p, string whoName, CatchPos cpos, ushort x, ushort y, ushort z) {
|
||||
Group group = Group.findPlayerGroup(whoName);
|
||||
if (group.Permission >= p.group.Permission) {
|
||||
Player.SendMessage(p, "Cannot undo a user of higher or equal rank"); return;
|
||||
MessageTooHighRank(p, "undo", false); return;
|
||||
}
|
||||
|
||||
UndoOfflineDrawOp op = new UndoOfflineDrawOp();
|
||||
|
@ -34,7 +34,7 @@ namespace MCGalaxy.Commands {
|
||||
if (who == null) return;
|
||||
if (who == p) { Player.SendMessage(p, "you can't warn yourself"); return; }
|
||||
if (p != null && p.group.Permission <= who.group.Permission) {
|
||||
Player.SendMessage(p, "Cannot warn a player of equal or higher rank."); return;
|
||||
MessageTooHighRank(p, "warn", false); return;
|
||||
}
|
||||
|
||||
string reason = args.Length == 1 ? "you know why." : args[1];
|
||||
|
@ -40,8 +40,7 @@ namespace MCGalaxy.Commands
|
||||
|
||||
if (p != null && muter.group.Permission > p.group.Permission)
|
||||
{
|
||||
Player.SendMessage(p, "You cannot xmute someone ranked higher than you!");
|
||||
return;
|
||||
MessageTooHighRank(p, "xmute", true); return;
|
||||
}
|
||||
if (p == muter)
|
||||
{
|
||||
|
@ -87,7 +87,7 @@ namespace MCGalaxy.Commands
|
||||
void UndoOnlinePlayer(Player p, long seconds, Player who) {
|
||||
if (p != null && p != who) {
|
||||
if (who.group.Permission > p.group.Permission) {
|
||||
Player.SendMessage(p, "Cannot undo a user of higher or equal rank"); return;
|
||||
MessageTooHighRank(p, "undo", true); return;
|
||||
}
|
||||
if (!CheckAdditionalPerm(p)) { MessageNeedPerms(p, "can undo other players."); return; }
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ namespace MCGalaxy.Commands {
|
||||
Player who = PlayerInfo.FindOrShowMatches(p, args[0]);
|
||||
if (who == null) return;
|
||||
if (p != null && who.group.Permission > p.group.Permission) {
|
||||
Player.SendMessage(p, "Cannot change the color of someone of greater rank"); return;
|
||||
MessageTooHighRank(p, "change the color of", true); return;
|
||||
}
|
||||
|
||||
ParameterisedQuery query = ParameterisedQuery.Create();
|
||||
|
@ -35,7 +35,7 @@ namespace MCGalaxy.Commands {
|
||||
if (p == null || p == who || p.group.Permission > who.group.Permission) {
|
||||
Player.SendChatFrom(who, args[1]);
|
||||
} else {
|
||||
Player.SendMessage(p, "You cannot impersonate a player of equal or greater rank.");
|
||||
MessageTooHighRank(p, "impersonate", false); return;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,7 @@ namespace MCGalaxy.Commands
|
||||
if (who == null) return;
|
||||
|
||||
if (p != null && who.group.Permission > p.group.Permission) {
|
||||
Player.SendMessage(p, "Cannot toggle invincibility for someone of higher rank");return;
|
||||
MessageTooHighRank(p, "toggle invinciblity", true); return;
|
||||
}
|
||||
|
||||
if (who.invincible)
|
||||
|
@ -54,7 +54,7 @@ namespace MCGalaxy.Commands
|
||||
|
||||
if (p != null && who.group.Permission > p.group.Permission) {
|
||||
p.HandleDeath(Block.rock, " was killed by " + who.color + who.DisplayName);
|
||||
Player.SendMessage(p, "Cannot kill someone of higher rank"); return;
|
||||
MessageTooHighRank(p, "kill", true); return;
|
||||
}
|
||||
who.HandleDeath(Block.rock, deathMessage, explode);
|
||||
}
|
||||
|
@ -51,7 +51,9 @@ namespace MCGalaxy.Commands
|
||||
Level where = LevelInfo.Find(param[1]);
|
||||
if (who == null) return;
|
||||
if (where == null) { Player.SendMessage(p, "Could not find level specified"); return; }
|
||||
if (p != null && who.group.Permission > p.group.Permission) { Player.SendMessage(p, "Cannot move someone of greater rank"); return; }
|
||||
if (p != null && who.group.Permission > p.group.Permission) {
|
||||
MessageTooHighRank(p, "move", true); return;
|
||||
}
|
||||
|
||||
Command.all.Find("goto").Use(who, where.name);
|
||||
if (who.level == where)
|
||||
@ -70,7 +72,9 @@ namespace MCGalaxy.Commands
|
||||
{
|
||||
who = PlayerInfo.FindOrShowMatches(p, param[0]);
|
||||
if (who == null) return;
|
||||
if (p != null && who.group.Permission > p.group.Permission) { Player.SendMessage(p, "Cannot move someone of greater rank"); return; }
|
||||
if (p != null && who.group.Permission > p.group.Permission) {
|
||||
MessageTooHighRank(p, "move", true); return;
|
||||
}
|
||||
message = message.Substring(message.IndexOf(' ') + 1);
|
||||
}
|
||||
else
|
||||
|
@ -37,7 +37,7 @@ namespace MCGalaxy.Commands {
|
||||
Player who = PlayerInfo.FindOrShowMatches(p, parts[0]);
|
||||
if (who == null) return;
|
||||
if (p != null && who.group.Permission > p.group.Permission) {
|
||||
Player.SendMessage(p, "Cannot change the nick of someone of greater rank"); return;
|
||||
MessageTooHighRank(p, "change the nick of", true); return;
|
||||
}
|
||||
|
||||
string newName = parts.Length > 1 ? parts[1] : "";
|
||||
|
@ -33,7 +33,7 @@ namespace MCGalaxy.Commands {
|
||||
Player target = PlayerInfo.FindOrShowMatches(p, parts[0]);
|
||||
if (target == null) return;
|
||||
if (p != null && p.group.Permission < target.group.Permission) {
|
||||
Player.SendMessage(p, "Cannot use this on someone of equal or greater rank."); return;
|
||||
MessageTooHighRank(p, "send commands for", true); return;
|
||||
}
|
||||
if (parts.Length == 1) {
|
||||
Player.SendMessage(p, "No command name given."); return;
|
||||
|
@ -48,7 +48,7 @@ namespace MCGalaxy.Commands
|
||||
Player who = PlayerInfo.FindOrShowMatches(p, message);
|
||||
if (who == null) return;
|
||||
if (p.group.Permission < who.group.Permission) {
|
||||
Player.SendMessage(p, "You cannot summon someone ranked higher than you!"); return;
|
||||
MessageTooHighRank(p, "summon", true); return;
|
||||
}
|
||||
|
||||
if (p.level != who.level)
|
||||
|
@ -35,7 +35,7 @@ namespace MCGalaxy.Commands {
|
||||
Player who = PlayerInfo.FindOrShowMatches(p, parts[0]);
|
||||
if (who == null) return;
|
||||
if (p != null && who.group.Permission > p.group.Permission) {
|
||||
Player.SendMessage(p, "Cannot change the title of someone of greater rank"); return;
|
||||
MessageTooHighRank(p, "change the title of", true); return;
|
||||
}
|
||||
|
||||
string newTitle = parts.Length > 1 ? parts[1] : "";
|
||||
|
@ -36,7 +36,7 @@ namespace MCGalaxy.Commands {
|
||||
}
|
||||
|
||||
if (!Server.higherranktp && p.group.Permission < target.group.Permission) {
|
||||
Player.SendMessage(p, "You cannot teleport to a player of higher rank!"); return;
|
||||
MessageTooHighRank(p, "teleport to", true); return;
|
||||
}
|
||||
p.beforeTeleportMap = p.level.name;
|
||||
p.beforeTeleportPos = p.pos;
|
||||
|
@ -34,7 +34,7 @@ namespace MCGalaxy.Commands {
|
||||
Player.SendMessage(p, "Use /spawn to respawn yourself."); return;
|
||||
}
|
||||
if (p != null && pl.group.Permission >= p.group.Permission) {
|
||||
Player.SendMessage(p, "Cannot respawn someone of greater or same rank"); return;
|
||||
MessageTooHighRank(p, "respawn", false); return;
|
||||
}
|
||||
|
||||
Command.all.Find("spawn").Use(pl, "");
|
||||
|
Loading…
x
Reference in New Issue
Block a user