mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-27 15:30:58 -04:00
Quick fix for /paste throwing a NullReferenceException. (Thanks goodlyay)
This commit is contained in:
parent
fbd3db48eb
commit
17eb068d51
@ -143,8 +143,13 @@ namespace MCGalaxy.Drawing.Ops {
|
|||||||
|
|
||||||
if (!op.CanDraw(x1, y1, z1, x2, y2, z2, p, out affected))
|
if (!op.CanDraw(x1, y1, z1, x2, y2, z2, p, out affected))
|
||||||
return false;
|
return false;
|
||||||
|
if (brush != null) {
|
||||||
const string format = "{0}({1}): affecting up to {2} blocks";
|
const string format = "{0}({1}): affecting up to {2} blocks";
|
||||||
Player.SendMessage(p, String.Format(format, op.Name, brush.Name, affected));
|
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);
|
bool needReveal = op.DetermineDrawOpMethod(p.level, affected);
|
||||||
op.Perform(x1, y1, z1, x2, y2, z2, p, p.level, brush);
|
op.Perform(x1, y1, z1, x2, y2, z2, p, p.level, brush);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user