Quick fix for /paste throwing a NullReferenceException. (Thanks goodlyay)

This commit is contained in:
UnknownShadow200 2016-03-10 18:30:27 +11:00
parent fbd3db48eb
commit 17eb068d51

View File

@ -143,8 +143,13 @@ namespace MCGalaxy.Drawing.Ops {
if (!op.CanDraw(x1, y1, z1, x2, y2, z2, p, out affected))
return false;
if (brush != null) {
const string format = "{0}({1}): affecting up to {2} blocks";
Player.SendMessage(p, String.Format(format, op.Name, brush.Name, affected));
} else {
const string format = "{0}: affecting up to {1} blocks";
Player.SendMessage(p, String.Format(format, op.Name, affected));
}
bool needReveal = op.DetermineDrawOpMethod(p.level, affected);
op.Perform(x1, y1, z1, x2, y2, z2, p, p.level, brush);