Ir para conteúdo

TequilAxBr

Membros VIP
  • Total de itens

    1.909
  • Registro em

  • Última visita

Tudo que TequilAxBr postou

  1. Hypixel apesar de te sido banido
  2. Salvei o tópico nos favoritos, vou tentar durante a madrugada.
  3. Obs: Respeitando os espaços: estantes: - ' x, y, z, comando'
  4. Futuramente estarei fazendo um plugin desse tipo.
  5. Se for realmente por causa das instancias, sim estou, vou fazer o teste de outro jeito então,
  6. Olá a todos, bom estou criando um plugin, porem estou tendo um problema, minha ArrayList do tipo String onde armazeno Nicks de jogadores, ela está resetando do nada, isso já aconteceu comigo uma vez e tive que abandonar o projeto e não quero abandonar esse... Estou criando a ArrayList desse jeito: ArrayList<String> participantes = new ArrayList<>(); //Crio a Array Estou adicionando assim: participantes.add(p.getName()); Não é porquê não estou adicionando os jogadores, sim estou, já imprimi o valor da ArrayList no console e me mostra os nicks corretamente, estou sem saber oque fazer, não estou dando clear na ArrayList, já retirei TODOS SEM EXCEÇÕES participantes.clear()... Alguém? Classe onde estou "gerenciando" minha ArrayList package tequilaxbr.bkiller; import java.util.ArrayList; import java.util.HashMap; import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.configuration.file.FileConfiguration; import org.bukkit.configuration.file.YamlConfiguration; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.entity.PlayerDeathEvent; import tequilaxbr.bkiller.Utils.Serialize; public class Maneger{ public YamlConfiguration d = Main.data.getConfig(); public FileConfiguration c = Main.getMe().getConfig(); //Arrays e HashMaps public ArrayList<String> participantes = new ArrayList<>(); public HashMap<String, Integer> kills = new HashMap<>(); // public void sendMessage(String path, Player p){ p.sendMessage(c.getString("Mensagens." + path).replaceAll("&", "§")); } public void setLocation(String name, Player p){ String local = Serialize.serializeLocation(p.getLocation(), true); d.set("Locais." + name, local); Main.getMe().data.saveConfig(); sendMessage("Sets." + name, p); } public void teleporteLocation(String name, Player p){ Location local = Serialize.deserializeLocation(d.getString("Locais." + name), true); p.teleport(local); sendMessage("Teleportes." + name, p); } public void teleportAllPlayers(String name){ for(String allP : participantes){ Player allPp = Bukkit.getServer().getPlayer(allP); teleporteLocation(name, allPp); } } public void addPlayerKiller(Player p){ participantes.add(p.getName()); Bukkit.broadcastMessage("" + participantes); kills.put(p.getName(), 0); teleporteLocation("Spawn", p); } public void removePlayerKiller(Player p){ participantes.remove(p.getName()); kills.remove(p.getName()); teleporteLocation("Saida", p); } public void messagePlayerRemovido(Player p){ for(String up : c.getStringList("Mensagens.Player-Removido")){ for(Player all : Bukkit.getOnlinePlayers()){ all.sendMessage(up.replaceAll("@participantes", "" + participantes.size()).replaceAll("@p", "" + p.getName()).replaceAll("&", "§")); } } } public void verifyWinner(Player p){ if(killer == Status.INICIADO){ if(participantes.size() == 1){ for(String up : c.getStringList("Mensagens.Winner")){ for(Player all : Bukkit.getOnlinePlayers()){ all.sendMessage(up.replaceAll("@vencedor", "" + participantes.get(0)).replaceAll("&", "§")); } } d.set("Killer", participantes.get(0)); Main.getMe().saveConfig(); //fecharKiller(); } } } //Enum public Status killer = Status.FECHADO; public void abrirKiller(){ killer = Status.ANUNCIANDO; anuncio(c.getInt("Anuncios.Quantidade")); } public void iniciarKiller(){ killer = Status.INICIADO; if(participantes.size() < c.getInt("Config.Min-Players")){ for(String msg : c.getStringList("Mensagens.Faltou-Players")){ for(Player all : Bukkit.getOnlinePlayers()){ all.sendMessage(msg.replaceAll("@participantes", "" + participantes.size()).replaceAll("@min", "" + c.getInt("Config.Min-Players")).replaceAll("&", "§")); } } teleportAllPlayers("Saida"); // fecharKiller(); return; } for(String msg : c.getStringList("Anuncios.Iniciar")){ for(Player all : Bukkit.getOnlinePlayers()){ all.sendMessage(msg.replaceAll("&", "§")); } } } /**public void fecharKiller(){ killer = Status.FECHADO; kills.clear(); participantes.clear(); teleportAllPlayers("Saida"); }*/ //Enum public void anuncio(final int quantidade){ if(quantidade == 0){ for(String msgPrepare : c.getStringList("Anuncios.Anuncio")){ for(Player all : Bukkit.getOnlinePlayers()){ all.sendMessage(msgPrepare.replaceAll("@tempo", "" + c.getInt("Anuncios.Tempo-Entre") * quantidade).replaceAll("&", "§")); } } iniciarKiller(); } if(killer != Status.ANUNCIANDO){ return; } for(String msgPrepare : c.getStringList("Anuncios.Anuncio")){ for(Player all : Bukkit.getOnlinePlayers()){ all.sendMessage(msgPrepare.replaceAll("@tempo", "" + c.getInt("Anuncios.Tempo-Entre") * quantidade).replaceAll("&", "§")); } } Bukkit.getServer().getScheduler().runTaskLater(Main.getMe(), new Runnable(){ public void run(){ if(quantidade == 0){ for(String msgPrepare : c.getStringList("Anuncios.Anuncio")){ for(Player all : Bukkit.getOnlinePlayers()){ all.sendMessage(msgPrepare.replaceAll("@tempo", "" + c.getInt("Anuncios.Tempo-Entre") * quantidade).replaceAll("&", "§")); } } iniciarKiller(); } if(killer != Status.ANUNCIANDO){ return; } anuncio(quantidade - 1); } }, c.getInt("Anuncios.Tempo-Entre") * 20); } }
  7. Vlw Opá, que bom que ajudou! Vlw! O erro do console acontece quando? O erro dos itens droparem quando o baú desaparece isso não é normal foi proposital. A sugestão vou pensar..
  8. TequilAxBr

    TGHome

    Conheço vc já, mas vc não me conhece ushsuhsushsush recomendo, o cara ai manja pakas
  9. Me add skype ae vitor.zikagg @topic: realmente, só falou verdades
  10. bRandomChest Um plugin simples, no qual você seta os baús vários e vários quantos você quiser, e ele de X em X tempo (configurável), é resetado e setado novamente em algum dos locais que você setou, com itens com porcentagem, enchants, tudo com exceção de lore.. E o melhor é FREE! Comandos | Função | Permissão /rchest create <numero> - Criar um novo baú - bRandomChest.Admin /rchest remove <numero> - Remove um baú - bRandomChest.Admin Versões | Creditos | Config Testado na 1.5.2, mas deve funcionar nas demais. | Créditos a mim @TequilAxBr | Config.yml logo abaixo: Config: Clique Aqui Atualizei a config.yml e coloquei lá uma lista com os ids dos enchants. Prints | Algo a mais. Prints: Irei colocar depois, se alguém poder tirar em quanto teste, por favor. Algo a mais: É de extrema importancia que após você seta os baús, configurar a config.yml você de reload no plugin ou reinicie o servidor, para que comece a funcionar sem problemas, caso isso não seja feito, o plugin não irá funcionar. Download Clique Aqui Sugestões/Bugs -> Envie uma MP ou comente no tópico.
  11. Está bom o plugin parabéms. Conta com sistema de multiplas páginas digamos a primeira lota ele cria a segunda?
  12. Dá pra melhorar. Pra que vc seta o prefixo dele? Põem isso em Menu GUI, com as cabeças dos staffs, pega o grupo dele do pex e taca o nick dele ai Bom plugin
  13. Já tentei isso, porem não funfou, achei outra coisa que funcionou. usei: is.setDurability((short) data); Pode fechar.
  14. Olá abigos, gostaria de saber como fazer esse sistema de data no for a slá não sei explicar.. O erro é esse: http://prntscr.com/bqj4e8 sei que os argumentos dentro do getMaterial estão errados, porem foi um jeito para explicar oque quero, gostaria de fazer isso com itens com metadata/data value, alguém por favor poderia me ajudar?
  15. Bom o macro faz isso, mas o morbid também faz, e é fácil de esconder... Os itens no inicio do video não são dropados de frente e sim de costas, talvez isso seja uma montagem...
  16. Realmente, está muito bom, coloca em MySQL, ficaria melhor ainda.
  17. Ninguem vai fazer isso de graça não.
  18. Adiciona todas as locations em uma ArrayList e randomiza ela...
  19. Ficou top, coloca sistema de limite de homes por permissão... Seria legal, colcoar o /invitehome também. E os comandos para os staffs, /listhomes <player> /home <player> <home> mesmo não estando publica para os staffs, /deletehome <player> <home>
  20. Boa , obs lembro que eu que sugeri isso em
  21. Pera ae, que daqui a pouco eu faço rsrs.
  22. '-' Seria legal fazer isso em java. '-' Partiu
×
×
  • Criar Novo...