mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-09 07:09:41 -04:00
Make deadly hug rank configurable
This commit is contained in:
parent
46b5c5e81d
commit
0e7505cb17
@ -19,6 +19,9 @@
|
||||
namespace MCGalaxy.Commands.Chatting {
|
||||
public class CmdHug : MessageCmd {
|
||||
public override string name { get { return "hug"; } }
|
||||
public override CommandPerm[] ExtraPerms {
|
||||
get { return new[] { new CommandPerm(LevelPermission.Operator, "+ can death hug") }; }
|
||||
}
|
||||
|
||||
public override void Use(Player p, string message) {
|
||||
if (message == "") { Help(p); return; }
|
||||
@ -38,9 +41,7 @@ namespace MCGalaxy.Commands.Chatting {
|
||||
if (hugType == null) { TryMessageAction(p, args[0], "{0} %Shugged {1}.", false); return; }
|
||||
|
||||
if (hugType == "deadly") {
|
||||
if (p != null && p.Rank < LevelPermission.Operator) {
|
||||
Player.Message(p, "You cannot %cdeath-hug %Sat your current rank."); return;
|
||||
}
|
||||
if (!CheckExtraPerm(p)) { MessageNeedExtra(p, 1); return; }
|
||||
if (p != null && who.Rank > p.Rank) {
|
||||
MessageTooHighRank(p, "&cdeath-hug%S", true); return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user