mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-22 12:05:51 -04:00
Fix /gun blockchange handler still being called even after disabling guns on a map. (Thanks Ozy)
This commit is contained in:
parent
1fcccda0ca
commit
65bfe62051
@ -28,7 +28,9 @@ namespace MCGalaxy.Commands.Fun {
|
||||
|
||||
protected override void PlacedMark(Player p, ushort x, ushort y, ushort z, ExtBlock block) {
|
||||
p.RevertBlock(x, y, z);
|
||||
if (!CommandParser.IsBlockAllowed(p, "place", block)) return;
|
||||
if (!p.level.Config.Guns || !CommandParser.IsBlockAllowed(p, "place", block)) {
|
||||
p.ClearBlockchange(); return;
|
||||
}
|
||||
|
||||
WeaponArgs args = new WeaponArgs();
|
||||
args.player = p;
|
||||
|
@ -33,7 +33,9 @@ namespace MCGalaxy.Commands.Fun {
|
||||
p.aiming = false;
|
||||
}
|
||||
p.RevertBlock(x, y, z);
|
||||
if (!CommandParser.IsBlockAllowed(p, "place", block)) return;
|
||||
if (!p.level.Config.Guns || !CommandParser.IsBlockAllowed(p, "place", block)) {
|
||||
p.ClearBlockchange(); return;
|
||||
}
|
||||
|
||||
WeaponArgs args = new WeaponArgs();
|
||||
args.player = p;
|
||||
|
Loading…
x
Reference in New Issue
Block a user