SteamWar/BauSystem
Archiviert
13
0

Test autoloader fix

Dieser Commit ist enthalten in:
Lixfel 2020-07-25 10:47:28 +02:00
Ursprung 8d44e714c7
Commit 357e6451c5

Datei anzeigen

@ -4,6 +4,7 @@ import org.bukkit.Location;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.block.Block; import org.bukkit.block.Block;
import org.bukkit.block.data.BlockData; import org.bukkit.block.data.BlockData;
import org.bukkit.block.data.Directional;
import org.bukkit.block.data.Powerable; import org.bukkit.block.data.Powerable;
import org.bukkit.event.block.Action; import org.bukkit.event.block.Action;
import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.event.player.PlayerInteractEvent;
@ -31,6 +32,12 @@ class AutoLoader_15 {
powerable.setPowered(active); powerable.setPowered(active);
block.setBlockData(powerable); block.setBlockData(powerable);
block.getState().update(true); block.getState().update(true);
if(data instanceof Directional){
Directional directional = (Directional) data;
block.getRelative(directional.getFacing()).getState().update(true);
}
return true; return true;
} }