Fix /gb copy without arguments or one argument throwing an error, guns should default to disabled on levels.

This commit is contained in:
UnknownShadow200 2016-04-24 07:23:57 +10:00
parent 15d947cc6f
commit 214edcb4ca
3 changed files with 5 additions and 5 deletions

View File

@ -90,8 +90,7 @@ namespace MCGalaxy.Commands
if (AddMe) { pos.X = xx; pos.Y = yy; pos.Z = zz; buffer.Add(pos); }
}
if (buffer.Count > p.group.maxBlocks)
{
if (buffer.Count > p.group.maxBlocks) {
Player.SendMessage(p, "You tried to hollow more than " + buffer.Count + " blocks.");
Player.SendMessage(p, "You cannot hollow more than " + p.group.maxBlocks + ".");
return;

View File

@ -101,7 +101,8 @@ namespace MCGalaxy.Commands {
}
void CopyHandler(Player p, string[] parts, bool global) {
int srcId, dstId;
if (parts.Length <= 2) { Help(p); return; }
int srcId, dstId;
if (!CheckBlockId(p, parts[1], global, out srcId)) return;
if (!CheckBlockId(p, parts[2], global, out dstId)) return;
BlockDefinition[] defs = global ? BlockDefinition.GlobalDefs : p.level.CustomBlockDefs;

View File

@ -134,8 +134,8 @@ namespace MCGalaxy
public bool finite;
[ConfigBool("GrowTrees", "General", null, false)]
public bool growTrees;
[ConfigBool("Guns", "General", null, true)]
public bool guns = true;
[ConfigBool("Guns", "General", null, false)]
public bool guns = false;
public byte jailrotx, jailroty;
/// <summary> Color of the clouds (RGB packed into an int). Set to -1 to use client defaults. </summary>