Fix /gun not working properly after trying to use it with a block you can't place.

This commit is contained in:
UnknownShadow200 2017-10-11 17:20:39 +11:00
parent cc2b3108c6
commit abfe6a99a1

View File

@ -28,9 +28,8 @@ namespace MCGalaxy.Commands.Fun {
protected override void PlacedMark(Player p, ushort x, ushort y, ushort z, ExtBlock block) {
p.RevertBlock(x, y, z);
if (!p.level.Config.Guns || !CommandParser.IsBlockAllowed(p, "place", block)) {
p.ClearBlockchange(); return;
}
if (!p.level.Config.Guns) { p.ClearBlockchange(); return; }
if (!CommandParser.IsBlockAllowed(p, "use", block)) return;
WeaponArgs args = new WeaponArgs();
args.player = p;