Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //pode me ajudar a pegar um id que esta em string da config?? Já tentei com split, sem split, e não da.
- //Obs: O id, é tipo: 95:15 sabe?? Com date.
- //Vlw ae!
- int bloc = cnf.getInt("Config.BlocoParedeID");
- String blocoo = cnf.getString("Config.BlocoParedeID").split(":")[0];
- boolean ehInt = false;
- try{
- Integer.parseInt(blocoo);
- ehInt = true;
- }catch (NumberFormatException e){
- Bukkit.getConsoleSender().sendMessage("§cOps... Erro ao setar a parede!");
- Bukkit.getConsoleSender().sendMessage("§cDelete a config, para ver se arruma.");
- }
- if(!ehInt){
- Material bloco = Material.getMaterial(blocoo);
- for(Block bl : c.getBlocks()){
- if(bl == null) continue;
- bl.setType(bloco);
- }
- for(Block bl2 : b.getBlocks()){
- if(bl2 == null) continue;
- bl2.setType(bloco);
- }
- return;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement