add some debugging for #574

This commit is contained in:
RoboMWM 2019-08-11 15:29:53 -07:00
parent 9e6359b15a
commit 73325a3f8f

View File

@ -1883,7 +1883,13 @@ class PlayerEventHandler implements Listener
|| materialInHand == Material.FLINT_AND_STEEL) || materialInHand == Material.FLINT_AND_STEEL)
|| dyes.contains(materialInHand)) || dyes.contains(materialInHand))
{ {
String noBuildReason = instance.allowBuild(player, clickedBlock.getLocation(), clickedBlockType); if (instance == null)
System.out.println("[GP] instance is null which means _somebody_ did something to this plugin.");
String noBuildReason = instance
.allowBuild(player, clickedBlock
.getLocation(),
clickedBlockType);
if(noBuildReason != null) if(noBuildReason != null)
{ {
instance.sendMessage(player, TextMode.Err, noBuildReason); instance.sendMessage(player, TextMode.Err, noBuildReason);