Require an extra perm to see mb/portal contents in /b

This commit is contained in:
UnknownShadow200 2017-08-13 10:29:13 +10:00
parent e26cd5f960
commit cfb63bf014
2 changed files with 13 additions and 8 deletions

View File

@ -19,8 +19,8 @@ using System;
using System.Collections.Generic;
using System.Data;
using MCGalaxy.DB;
using MCGalaxy.SQL;
using MCGalaxy.Maths;
using MCGalaxy.SQL;
namespace MCGalaxy.Commands.Info {
public sealed class CmdAbout : Command {
@ -33,6 +33,9 @@ namespace MCGalaxy.Commands.Info {
public override CommandAlias[] Aliases {
get { return new [] { new CommandAlias("BInfo"), new CommandAlias("WhoDid") }; }
}
public override CommandPerm[] ExtraPerms {
get { return new[] { new CommandPerm(LevelPermission.AdvBuilder, "+ can see portal/MB data of a block") }; }
}
public override void Use(Player p, string message) {
Player.Message(p, "Break/build a block to display information.");
@ -64,8 +67,10 @@ namespace MCGalaxy.Commands.Info {
Player.Message(p, "Block ({0}, {1}, {2}): &f{3} = {4}%S.",
x, y, z, block.RawID, blockName);
if (HasExtraPerm(p, 1)) {
BlockDBChange.OutputMessageBlock(p, block, x, y, z);
BlockDBChange.OutputPortal(p, block, x, y, z);
}
Server.DoGC();
return true;
}