mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-26 23:02:04 -04:00
Also restrict with /skin bot and /model bot
This commit is contained in:
parent
0ea046961a
commit
fa817a7c8b
@ -40,6 +40,11 @@ namespace MCGalaxy.Commands.CPE {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected override void SetBotData(Player p, PlayerBot bot, string[] args) {
|
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);
|
string model = GetModel(p, args, 2);
|
||||||
bot.model = model;
|
bot.model = model;
|
||||||
Entities.UpdateModel(bot.id, model, bot.level, null);
|
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) {
|
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);
|
string skin = GetSkin(p, args, 2, bot.name);
|
||||||
if (skin == null) return;
|
if (skin == null) return;
|
||||||
bot.SkinName = skin;
|
bot.SkinName = skin;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user