Daylight detector protections.

Now requires build trust to invert (right click).
This commit is contained in:
ryanhamshire 2015-01-12 21:57:06 -08:00
parent 78c346f789
commit ec7346ec43

View File

@ -1391,8 +1391,15 @@ class PlayerEventHandler implements Listener
}
}
//apply rule for note blocks and repeaters
else if(clickedBlock != null && clickedBlockType == Material.NOTE_BLOCK || clickedBlockType == Material.DIODE_BLOCK_ON || clickedBlockType == Material.DIODE_BLOCK_OFF)
//apply rule for note blocks and repeaters and daylight sensors
else if(clickedBlock != null &&
(
clickedBlockType == Material.NOTE_BLOCK ||
clickedBlockType == Material.DIODE_BLOCK_ON ||
clickedBlockType == Material.DIODE_BLOCK_OFF) ||
clickedBlockType == Material.DAYLIGHT_DETECTOR ||
clickedBlockType == Material.DAYLIGHT_DETECTOR_INVERTED
)
{
if(playerData == null) playerData = this.dataStore.getPlayerData(player.getUniqueId());
Claim claim = this.dataStore.getClaimAt(clickedBlock.getLocation(), false, playerData.lastClaim);