mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-23 12:42:22 -04:00
Fix /model not checking extra permission to change models of other players/bots (Thanks Princess_Bloom), add an extra permission to /skin for changing other player's skins.
This commit is contained in:
parent
831142961d
commit
996d2cd8d6
@ -67,6 +67,7 @@ namespace MCGalaxy.Commands.CPE {
|
||||
model = message;
|
||||
}
|
||||
model = model.ToLower();
|
||||
if ((isBot || who != p) && !CheckExtraPerm(p)) { MessageNeedPerms(p, "can change the model of other players."); return; }
|
||||
|
||||
if (isBot) {
|
||||
pBot.model = model;
|
||||
|
@ -27,6 +27,9 @@ namespace MCGalaxy.Commands.CPE {
|
||||
public override string type { get { return CommandTypes.Other; } }
|
||||
public override bool museumUsable { get { return true; } }
|
||||
public override LevelPermission defaultRank { get { return LevelPermission.Operator; } }
|
||||
public override CommandPerm[] AdditionalPerms {
|
||||
get { return new[] { new CommandPerm(LevelPermission.Operator, "+ can change the skin of other players") }; }
|
||||
}
|
||||
static char[] trimChars = { ' ' };
|
||||
|
||||
public override void Use(Player p, string message) {
|
||||
@ -58,6 +61,8 @@ namespace MCGalaxy.Commands.CPE {
|
||||
if (!Player.ValidName(skin)) {
|
||||
Player.Message(p, "\"" + skin + "\" is not a valid skin name."); return;
|
||||
}
|
||||
if ((isBot || who != p) && !CheckExtraPerm(p)) { MessageNeedPerms(p, "can change the skin of other players."); return; }
|
||||
|
||||
if (isBot) {
|
||||
pBot.skinName = skin;
|
||||
pBot.GlobalDespawn();
|
||||
|
@ -297,7 +297,7 @@ namespace MCGalaxy.Commands
|
||||
// I need to add the ability to delete a single zone, I need help!
|
||||
if (value == "ALL" || value == "") {
|
||||
Command zone = Command.all.Find("zone");
|
||||
Command click = Command.all.Find("click");
|
||||
Command click = Command.all.Find("mark");
|
||||
zone.Use(p, "del all");
|
||||
click.Use(p, "0 0 0");
|
||||
}
|
||||
|
12
GUI/Window.Designer.cs
generated
12
GUI/Window.Designer.cs
generated
@ -40,18 +40,6 @@ namespace MCGalaxy.Gui
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
protected override void WndProc(ref Message msg)
|
||||
{
|
||||
/*const int WM_SIZE = 0x0005;
|
||||
const int SIZE_MINIMIZED = 1;
|
||||
if ((msg.Msg == WM_SIZE) && ((int)msg.WParam == SIZE_MINIMIZED) && (Window.Minimize != null))
|
||||
{
|
||||
this.Window_Minimize(this, EventArgs.Empty);
|
||||
}*/
|
||||
|
||||
base.WndProc(ref msg);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
|
Loading…
x
Reference in New Issue
Block a user