[FR]
Bonjour, ce code fonctionne pas, il ne place pas le bloc, une solution ?
[google trad]
Hello, this code does not work, it does not place the block, a solution?
Player player = (Player) sender;
CatalogType bloc = args.<CatalogType>getOne("bloc").get();
String blocId = bloc.getId();
getLogger().debug(blocId);
if(getGame().getRegistry().getType(BlockState.class, blocId).isPresent()) {
Sponge.getLogger().debug("Bloc placé");
BlockState b = Sponge.getGame().getRegistry().getType(BlockState.class, blocId).get();
Location<World> location = new Location<World>(player.getWorld(), player.getPosition().sub(0, 0, 1));
location.setBlock(b);
} else {
Sponge.getLogger().debug("Error");
}