Ir para conteúdo

Dery

Membros
  • Total de itens

    934
  • Registro em

  • Última visita

Respostas na Comunidade

  1. Dery's postagem in COMO FAZ UM "INSIDE" BORDER-RADIUS was marked as the answer   
    Cara, consegui isso, mas ficou com problemas de sobreposição
    https://pastebin.com/cjZ8PJDB
    https://i.imgur.com/ohbraiK.png
  2. Dery's postagem in Como faço pra checar se o slime morrer de queda? was marked as the answer   
    @EventHandler public void SlimeDeath(EntityDeathEvent e) { if(e.getEntity() instanceof Slime) { if(e.getEntity().getLastDamageCause().equals(DamageCause.FALL)) e.getDrops().clear(); } } Acho que é assim, não testei...
  3. Dery's postagem in RENOMEAR O NOME "INDEX" PARA OUTRO was marked as the answer   
    Cria um arquivo chamado ".htacess", sim, um ponto + htacess, na raiz do seu documento, ou seja, onde fica a index.
     
    Dentro dele coloque o código:
    DirectoryIndex inicio.html inicio.php
  4. Dery's postagem in Plugin Que Proíba Bug De Bloco was marked as the answer   
    Primeiro: https://dev.bukkit.org/projects/nocheatplus
    Segundo: https://dev.bukkit.org/projects/compatnocheatplus-cncp
  5. Dery's postagem in [Ajuda] Modal was marked as the answer   
    Coloca "overflow-y: auto" no .modalDialog
  6. Dery's postagem in [Jquery] data-toggle was marked as the answer   
    $("[data-toggle]").click(function (){
    var toggle = $($(this).data("toggle")).first();
    /*
     
    Faz o que é para ser feito com o modal
     
    Exemplo:
    toggle.animate({
    opacity: 1,
    top: "10%"
    });
     
    */
    });

  7. Dery's postagem in como contar quantidades de strings salvas em SQL? was marked as the answer   
    O COUNT() é uma função do sql que retorna o total de registros com base em sua pesquisa, em seu caso:
    PreparedStatement stmt = con.prepareStatement("SELECT COUNT(*) qntHomes FROM homes WHERE player=?"); stmt.setString(1, "zFork"); ResultSet set = stmt.executeQuery(); p.sendMessage("Você tem " + set.getInt("qntHomes") + " homes!"); stmt.close();
  8. Dery's postagem in Send Diferente para o TOP was marked as the answer   
    int i = 0;
    p.sendMessage("§7TOPs");
    for(String s : rank) {
    i++;
    if (i==1)
    p.sendMessage(" §e1.§6 " + s +kills.get(s));
    else if (i==2)
    p.sendMessage(" §f2.§c " + s + kills.get(s));
    else
    p.sendMessage(" Aqui é se não for nem o primeiro nem o segundo");
    }

  9. Dery's postagem in [ajuda] Lampada não quebra! was marked as the answer   
    Tente colocar o script no body
  10. Dery's postagem in Ajuda Random was marked as the answer   
    Colocou o @EventHandler?
    Registrou os eventos?
  11. Dery's postagem in PEGAR NOME E TAMANHO DO INVENTARIO PELA CONFIG? was marked as the answer   
    Não sei porque você está utilizando um método estático para criar um inventário, mas mesmo assim...
    Crie um método que instancia a sua Main class (a que herda a class JavaPlugin), pode fazer isso assim:
    public static NomedaClass getMinhaClasse(){ return (NomedaClass) Bukkit.getServer().getPluginManager().getPlugin("NomedoPlugin"); } Depois é só fazer assim:
    public static void inventario(Player p){ Inventory inv = Bukkit.createInventory(null, 9*getMinhaClasse().getConfig().getInt("TamanhoDoInv"), getMinhaClasse().getConfig().getString("NomeDoInv")); }
  12. Dery's postagem in Dúvida Config was marked as the answer   
    Usa ConfigurationSection:
    for(String item : getConfig().getConfigurationSectios("Items").getKeys(false)){ for(String item : getConfig().getConfigurationSectios("Items." + item).getKeys(false)){ // Item X criado na seção items } }
  13. Dery's postagem in [Duvida] [Dev] executar comando existente? was marked as the answer   
    Utiliza PlayerCommandPreProccessEvent, exemplo:
    @EventHandler public void MudarCmd(PlayerCommandPreProccessEvent e){ if(e.getMessage().toLowerCase().startsWith("/dia"){ e.setCancelled(true); Bukkit.dispatchCommand(Bukkit.getServer().getConsoleSender(), "time set 0"); // Faz o console executar o comando time set 0 Bukkit.dispatchCommand(e.getPlayer(), "time set 0"); // Faz o player executar o comando time set 0 } }
  14. Dery's postagem in [Resolvido] [Dúvida] ArrayList was marked as the answer   
    Player player = array.get(0); // Caso seja array de player (não recomendo utilizar) Player player = Bukkit.getServer().getPlayer(arrat.get(0)); // Caso seja array de String
  15. Dery's postagem in [Entregue] [Plugin]Não_buga_Bloco was marked as the answer   
    Creio que você está pedindo este plugin para corrigir um bug de PvP, se for isso msm, baixe o plugin CompatNoCheatPlus, você o encontra facilmente no Bukkit
  16. Dery's postagem in [Resolvido] Duvida com Config/String was marked as the answer   
    public static void setTag(Player p, String selectTag){
    for(String tags : fc.getConfigurationSection("Tags").getKeys(false)){
    if(tags.equalsIgnoreCase(selectTag)){
    if(p.hasPermission(fc.getString("Tags." + tags + ".Permission"))){
    tag.put(p.getUniqueId(), selectTag);
    hasTag.add(p);
    p.sendMessage("§eVoce esta usando a Tag §b" + selectTag + " §eagora");
    p.sendMessage("§eUse: §f/tag off §b- > Para tirar sua Tag");
    return;
    }else{
    p.sendMessage("§cVoce nao tem permissao para usar essa Tag");
    return;
    }
    return;
    }
    }
    p.sendMessage("Nao existe nenhuma tag com esse nome!");
    }
     
    public static String getPreffix(Player p){
    return fc.getString("Tags." + tag.get(p.getUniqueId()) + ".Preffix").replace("&", "§");
    }
     
    public static String getSuffix(Player p){
    return fc.getString("Tags." + tag.get(p.getUniqueId()) + ".Suffix").replace("&", "§");
    }
     
  17. Dery's postagem in [Resolvido] [Duvida] temban Com Java Calendar was marked as the answer   
    Ué, já lhe mandei o código:
    System.currentTimeMillis() + TimeUnit.seconds.toMillis(Integer.parseInt(args[1]));
  18. Dery's postagem in [Resolvido] [URGENTE Erro: invalid or corrupted file spigot.jar was marked as the answer   
    Arquivo que você baixou está corrompido? Tente baixar a jar novamente
  19. Dery's postagem in [Resolvido] [Dúvida] Cooldown was marked as the answer   
    System.currentTimeMillis() + TimeUnit.SECONDS.toMillis(60) // Adicionando 60 segundos
    System.currentTimeMillis() + TimeUnit.MINUTES.toMillis(60) // Adicionando 60 Minutos
    System.currentTimeMillis() + TimeUnit.HOURS.toMillis(60) // Adicionando 60 horas
    // E assim por diante, isso é a base
     
  20. Dery's postagem in [Resolvido] [Duvida] Sistema de KEYS was marked as the answer   
    public boolean hasKey(String key){ try{ Class.forName("com.mysql.jdbc.Driver"); String sql = "SELECT * FROM keys WHERE key='" + key + "';"; ResultSet rs = stmt.executeQuery(sql); while (rs.next()) { return rs.getString("key").equalsIgnoreCase(key)); } return false; }catch(Exception e){ e.printStackTrace(); } return false; } if(!hasKey("E8F65-E965D-V1S6A-E8R5D")){ // A key não existe Bukkit.getServer().getPluginManager().disablePlugin(this); return; }
  21. Dery's postagem in [Resolvido] [Ajuda] java.lang.ClassCastException: java.lang.Double cannot be cast to java.lang.Float was marked as the answer   
    Pq não usa getDouble ao invés de só get?
  22. Dery's postagem in [Entregue] [AnvilRegen] was marked as the answer   
    Removido a pedido do author.
     
    By:
  23. Dery's postagem in [Resolvido] [Dúvida Bukkit] Tingir Armadura was marked as the answer   
    https://bukkit.org/threads/help-bukkit-plugin-code-thing-for-dyed-leather-armor.230869/
  24. Dery's postagem in [Resolvido] [Dúvida] Desativar was marked as the answer   
    Já testou o código em outro plugin?
     
    Acho que seu plugin está bugado '-'
  25. Dery's postagem in [Resolvido] Erro no codigo was marked as the answer   
    Ao invés disso:
    Player p = (Player)sender; p2 = Bukkit.getPlayer(args[0]);//Linha 22 if(args.length == 0){ p.sendMessage("§eUse: §f/tell (player) (mensagem)"); } Coloque isso:
    if(args.length == 0){ p.sendMessage("§eUse: §f/tell (player) (mensagem)"); return true; } Player p = (Player)sender; p2 = Bukkit.getPlayer(args[0]);
×
×
  • Criar Novo...