-
Total de itens
6.151 -
Registro em
-
Última visita
Respostas na Comunidade
-
Lightwood's postagem in Como animar uma ArmorStand was marked as the answer
Só criar a armor stand e uma task pra ir mudando a localização (yaw & pitch se for pra cabeça ficar girando em torno de sí mesmo)
-
Lightwood's postagem in Pedido - No Double nickname was marked as the answer
Tem um que fiz a um tempo.. aqui..
@TOPIC: eu entendi que você não quer que os dois nicks entrem simultaneamente, mas o plugin indiretamente vai bloquear isto
-
Lightwood's postagem in Dúvida sobre execução de Threads was marked as the answer
Não necessariamente.
Salva o long System.getCurrentMillis();+o tempo da punição (que é quando o banimento expirará).
Quando o jogador tentar entrar, ou o servidor reiniciar, você verifica se o System.getCurrentMillis(); é maior ou igual (>=) ao long de quando expira, se for é porque já deu o tempo e você tira o banimento.
Recomendo a utilização de um cache, para não precisar ficar acessando o MySQL toda hora pra pegar esses dados.
-
Lightwood's postagem in Como atualizar esse inventario was marked as the answer
new BukkitRunnable() { public void run() { //abre o inventario aqui ou seta os itens dnv } }.runTaskTimer(instanceDoSeuPlugin, 100L, 100L); ## o delay/period é só exemplo, tu bota quanto quiser -
Lightwood's postagem in [Duvida] 2 duvidas em um só tópico jsjis was marked as the answer
@EventHandler public void onBreak(BlockBreakEvent e) { //faz a porcentagem. //verifica se o e.getBlock().getLocation().getWorld().getName() é o mundo que tu quer //se for dropa o item na localizaçao do bloco, ou adiciona nos drops do bloco e.getBlock().getDrops.add....blabla ou e.getBlock.getlocation.getworld.dropitemnaturally...blabla } -
Lightwood's postagem in Verificar quantidade de um item no inventário was marked as the answer
Eu uso esse método aqui (pra item sem metadata editada):
public static int getAmount(final Inventory inventory, final ItemStack item) { int count = 0; final ItemStack[] items = inventory.getContents(); for (int i = 0; i < items.length; ++i) { if (items[i] != null && items[i].getType() == item.getType() && items[i].getDurability() == item.getDurability()) { count += items[i].getAmount(); } } return count; }
Com metadata eu verifico se o nome é igual, assim:
public static int getAmount(final Inventory inventory, final ItemStack item) { int count = 0; final ItemStack[] items = inventory.getContents(); for (int i = 0; i < items.length; ++i) { if (items[i] != null && items[i].getType() == item.getType() && items[i].getDurability() == item.getDurability() && items[i].getItemMeta().getDisplayName().equals(item.getItemMeta().getDisplayName())) { count += items[i].getAmount(); } } return count; } -
Lightwood's postagem in [EU PAGO] Plugin de Encantamento was marked as the answer
Add no skype: prettybytes
-
Lightwood's postagem in Avatar com esta linda imagem was marked as the answer
Coragem.. hahahaha! Espero que goste, tá aí:
Bônus:
-
Lightwood's postagem in [Pedido] Avatar :b was marked as the answer
Olá senhorzíneo, espero que goste.
-
Lightwood's postagem in Criar arquivo. was marked as the answer
Assim ó meu bem:
File f = new File(getDataFolder(), "arquivo.yml"); //Aqui você bota o nome do arquivo e a extensão. if(!f.exists()){ //Checar se existe o arquivo saveResource("arquivo.yml", true); //Salvar o arquivo se ele não existir, vale lembrar que você precisa adicionar o resource no projeto. } YamlConfiguration yaml = YamlConfiguration.loadConfiguration(f); yaml.getString blablablablalba... -
Lightwood's postagem in [Duvida-Simples] Porque nao está pegando o yaw e o pitch ? was marked as the answer
Use float em Yaw e Pitch.
float pitch = blablalba Float.valueOf(getconfig blablalba) -
Lightwood's postagem in [Resolvido] Pagseguro was marked as the answer
Resolvido, pode fechar o tópico
-
Lightwood's postagem in [Entregue] Banner para meu SITE(minecraft) was marked as the answer
Olá, espero que goste =3
-
Lightwood's postagem in [Resolvido] E.SETCANCELLEND | HELP-ME PLS! was marked as the answer
Tente usar assim:
if (e.getInventory().getName().equals(String.valueOf("§7Under§bMC §a» Menu Geral")) { e.setCancelled(true); if (e.getCurrentItem() == null || e.getCurrentItem().getItemMeta() == null || e.getCurrentItem().getType() == Material.AIR) { return; } -
Lightwood's postagem in [Entregue] Tag No TAB was marked as the answer
Se você usar o plugin Gladiador do SubZero ele tem essa função, e é muito funcional..