Ir para conteúdo

_Kurimatzu_

Membros
  • Total de itens

    368
  • Registro em

  • Última visita

Tudo que _Kurimatzu_ postou

  1. Não era bem isso, eu tive que usar NMS.. Resolvido.
  2. Estou 'tentando' fazer uma fornalha virtual,(de cada jogador) estou usando esse codigo. Inventory inv = Bukkit.createInventory(p2, InventoryType.FURNACE); FurnaceInventory inv2 = (FurnaceInventory) inv; Porém quando eu converto Inventario para o inventario de fornalha da esse erro: Caused by: java.lang.ClassCastException: org.bukkit.craftbukkit.v1_8_R3.inventory.CraftInventoryCustom cannot be cast to org.bukkit.inventory.FurnaceInventory Alguém sabe o por quê?
  3. Eu sei que ta bem zoado, eu fiquei a tarde toda pesquisando e colocando (!=) por quê tava dando null ;-;
  4. Slá converter dados do mysql e jogar na hash slá , vai na criatividade.
  5. Eu usei esse método para pegar os dados do mysql e colocar em uma hashmap. Realmente, é bem útil.
  6. for(OfflinePlayer f : Bukkit.getOfflinePlayers()) { if(f.hasPlayedBefore()) { if(f != null) { OfflinePlayer player = Bukkit.getOfflinePlayer(f.getUniqueId()); if(player.hasPlayedBefore()) { if(player != null) { OfflinePlayer targetPlayer = Bukkit.getServer().getPlayer(player.getName() != null ? player.getName() : ""); if(targetPlayer != null) { Player p = targetPlayer.getPlayer(); // GG // } } } } } } } (eu sei que tem vários operadores de negação (!=) mais depois de pesquisar muito consegui D:)
  7. _Kurimatzu_

    Marca Marca

    O Objetivo e marcar tudo oque a pessoa falou. QUE COMECE AGORA.
  8. Sua sugestão: Dar permissão para voltar a Skin 3.0 (eu voltei para 2.0 e não existe mais a opção da 3.0 e nem da 1.0) Porque nós devíamos adicionar ela: Slá, vai que o cara n gosta da 2.0 aí volta para 3.0 depois n da mais para voltar para 2.0 '-'
  9. Eu kAddon http://gamersboard.com.br/topic/13131-kaddon-meu-primeiro-projetoaddon-para-skript-152/ Descrição: Um pequeno addon para Skript Imagens: null Comandos: null Permissões: null Dependências: null Versões: 1.5.2 até 1.8.9 Download: https://mega.nz/#!n15ViQwD!JF8v0rC1wh8cMRVZQ3W-b-sQ5Om1CmvggoI20FW_jSw Categoria do Plugin: Addon para Skript -q
  10. PARA DE USAR SKRIPT™ Eu acho que plugin é melhor, tem mais possibilidades, enfim, boa sorte com seu canal.
  11. Qual foi o primeiro servidor de minecraft que você entrou? R: McPVP.
  12. @EventHandler public void crafting(CraftItemEvent e){ for(String s : cCraftBans.getStringList("cCraft.blocked")) { String[] metadata = s.split(":"); ItemStack i = e.getRecipe().getResult(); Material tipo = Material.getMaterial(Integer.valueOf(s)); System.out.println(tipo); if(i.getType() == tipo) { e.setCancelled(true); e.getWhoClicked().closeInventory(); ((Player)e.getWhoClicked()).sendMessage("§cEsse item está bloqueado."); } if(i.getData() == null) return; if(i.getData().getData() == 0) return; System.out.println(metadata[0]); if(i.getData().getData() == (byte)Byte.valueOf(metadata[0])) { e.setCancelled(true); e.getWhoClicked().closeInventory(); ((Player)e.getWhoClicked()).sendMessage("§cEsse item está bloqueado."); } } } } Tenta
  13. @EventHandler public void crafting(CraftItemEvent e){ for(String s : cCraftBans.getStringList("cCraft.blocked")) { String[] metadata = s.split(":"); ItemStack i = e.getRecipe().getResult(); Material tipo = Material.getMaterial(Integer.valueOf(s)); System.out.println(tipo); if(i.getType() == tipo) { e.setCancelled(true); e.getWhoClicked().closeInventory(); e.getWhoClicked().sendMessage("§cEsse item está bloqueado."); } if(i.getData() == null) return; if(i.getData().getData() == 0) return; System.out.println(metadata[0]); if(i.getData().getData() == (byte)Byte.valueOf(metadata[0])) { e.setCancelled(true); e.getWhoClicked().closeInventory(); e.getWhoClicked().sendMessage("§cEsse item está bloqueado."); } } } } Tenta aí
  14. package me.google.mms; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.bukkit.Bukkit; import org.bukkit.Material; import org.bukkit.configuration.file.YamlConfiguration; import org.bukkit.entity.Player; import org.bukkit.event.Event.Result; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.inventory.CraftItemEvent; import org.bukkit.inventory.ItemStack; import org.bukkit.plugin.java.JavaPlugin; public class Main extends JavaPlugin implements Listener{ public static File CraftBans = new File("./plugins/<seu_plugin>/bans.yml"); public static YamlConfiguration cCraftBans = YamlConfiguration.loadConfiguration(CraftBans); public void onEnable() { Bukkit.getPluginManager().registerEvents(this, this); Setup(); } public void Setup() { ArrayList<String> blocked = new ArrayList<>(); // Adiciona os items // // : = meta data // blocked.add("351:4"); blocked.add("2:2"); cCraftBans.set("cCraft.blocked", blocked); try { cCraftBans.save(CraftBans); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } @EventHandler public void crafting(CraftItemEvent e){ for(String s : cCraftBans.getStringList("cCraft.blocked")) { String[] metadata = s.split(":"); ItemStack i = e.getRecipe().getResult(); if(i.getItemMeta() != null) { if(metadata == null) { Material tipo = Material.getMaterial(s.toUpperCase()); if(i.getType() == tipo) { e.setCancelled(true); e.getWhoClicked().closeInventory(); e.getWhoClicked().sendMessage("§cEsse item está bloqueado."); } } else { if(i.getData().getData() == (byte)Byte.valueOf(metadata[0])) { e.setCancelled(true); e.getWhoClicked().closeInventory(); e.getWhoClicked().sendMessage("§cEsse item está bloqueado."); } } } } } } Deve está errado, testa aí. ;-;
  15. Formatar o tempo , tipo assim Eu tenho 120 segundos aí ficaria assim: 2min 0sg 1min 59sg Se eu tenho horas ficaria assim: 1hora 59min 2sg Se eu tenho dias ficaria assim: 1 dia 5min 3seg. Entendeu?
  16. Queria formatar o tempo +- assim. // 2 minutos // Tempo = 120; Aí ficaria assim 2min 0sg 1min 59sg Se o tempo for em horas ficaria assim: 10h 15min 10seg Em dias: 1 dia , 1 hora , 3 segundos. Alguém pode fazer esses métodos? ;-;
  17. Aqui nunca centraliza .-. @EventHandler public void ab(PlayerInteractEvent e) { CenterMessage.sendCenteredMessage(e.getPlayer(), "§a§m-----------------------------" + "\n" + "§eVocê conseguiu 1 diamante!\n" + "§aAgora você pode acessar o site minecraft.com.mibr e entrar e comprsar vip." + "\n" + "§a§m-----------------------------"); } (NÃO LIGUE PARA A MENSAGEM , EU ESCREVI ERRADO DE PROPÓSITO.) Por que não centraliza? ;-;
×
×
  • Criar Novo...