mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-25 06:04:46 -04:00
Also restrict with /skin bot and /model bot
This commit is contained in:
parent
0ea046961a
commit
fa817a7c8b
@ -18,7 +18,7 @@
|
||||
using System;
|
||||
using MCGalaxy.Bots;
|
||||
|
||||
namespace MCGalaxy.Commands.CPE {
|
||||
namespace MCGalaxy.Commands.CPE {
|
||||
public class CmdModel : EntityPropertyCmd {
|
||||
public override string name { get { return "model"; } }
|
||||
public override string shortcut { get { return "setmodel"; } }
|
||||
@ -40,6 +40,11 @@ namespace MCGalaxy.Commands.CPE {
|
||||
}
|
||||
|
||||
protected override void SetBotData(Player p, PlayerBot bot, string[] args) {
|
||||
if (p != null && !bot.level.BuildAccess.CheckDetailed(p)) {
|
||||
Player.Message(p, "Hence, you cannot the model of that bot.");
|
||||
return;
|
||||
}
|
||||
|
||||
string model = GetModel(p, args, 2);
|
||||
bot.model = model;
|
||||
Entities.UpdateModel(bot.id, model, bot.level, null);
|
||||
|
@ -37,6 +37,11 @@ namespace MCGalaxy.Commands.CPE {
|
||||
}
|
||||
|
||||
protected override void SetBotData(Player p, PlayerBot bot, string[] args) {
|
||||
if (p != null && !bot.level.BuildAccess.CheckDetailed(p)) {
|
||||
Player.Message(p, "Hence, you cannot the skin of that bot.");
|
||||
return;
|
||||
}
|
||||
|
||||
string skin = GetSkin(p, args, 2, bot.name);
|
||||
if (skin == null) return;
|
||||
bot.SkinName = skin;
|
||||
|
Loading…
x
Reference in New Issue
Block a user