forked from SteamWar/SteamWar
Fix NoClipCommand
This commit is contained in:
@@ -139,6 +139,7 @@ public class NoClipCommand extends SWCommand implements Listener {
|
|||||||
|
|
||||||
@EventHandler(ignoreCancelled = true)
|
@EventHandler(ignoreCancelled = true)
|
||||||
public void onBlock(BlockCanBuildEvent event) {
|
public void onBlock(BlockCanBuildEvent event) {
|
||||||
|
if (event.getPlayer() == null) return;
|
||||||
if (SWPlayer.of(event.getPlayer()).hasComponent(NoClipData.class)) {
|
if (SWPlayer.of(event.getPlayer()).hasComponent(NoClipData.class)) {
|
||||||
event.setBuildable(true);
|
event.setBuildable(true);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user