Hi there, I'm building a plugin but now i'm quite stuck. How can I do something like if the block behind/before/right/left the current block is powered, then do something with the current block.
Code:java Block block = wherever you get the block from; Block northBlock = block.getRelative(-1, 0, 0);Block southBlock = block.getRelative(1, 0, 0);Block eastBlock = block.getRelative(0, 0, -1);Block westBlock = block.getRelative(0, 0, 1); Block aboveBlock = block.getRelative(0, 1, 0);Block belowBlock = block.getRelative(0, -1, 0); whateverBlockYouWantToCheck.isPowered(); There are different types of .isPowered(), I have never used isPowered() so I haven't gotten into it though. Hope I helped Btw: The method takes x, y, z and returns a block in case you didn't figure it out ^^