-
Total de itens
775 -
Registro em
-
Última visita
Respostas na Comunidade
-
ExtraPlays's postagem in [HTML/CSS] Problema com estilo das letras was marked as the answer
n olhei seu css, mas tenta assim:
form > li { font-family: Verdana, sans-serif; font-size: 16px; } -
ExtraPlays's postagem in [Erro] Bans was marked as the answer
Você ta verificando se o player e null e ta banindo....
Não use == para strings...
E você ta pegando o OffilinePlayer...
-
ExtraPlays's postagem in centralizar o formulario was marked as the answer
Centraliza usando as grids do Bootstrap
<div class="container"> <div class="col-md-3"></div> <div class="col-md-6"> <div class="form-area"> <form role="form" method="post" action="enviar.php"> <br style="clear:both"> <h3 style="margin-bottom: 25px; text-align: center;">Formulario de confirmação</h3> <div class="form-group"> <input type="text" class="form-control" id="name" name="nick" placeholder="Nick" required> </div> <div class="form-group"> <input type="text" class="form-control" id="email" name="email" placeholder="Email" required> </div> <div class="form-group"> <textarea class="form-control" type="textarea" id="codigo" placeholder="Mensagem" maxlength="140" rows="7"></textarea> <span class="help-block"><p id="characterLeft" class="help-block ">Mande uma print do seu codigo de confirmação</p></span> </div> <button type="button" id="submit" name="submit" class="btn btn-primary pull-right">ENVIAR</button> </form> </div> </div> <div class="col-md-3"></div> </div> -
ExtraPlays's postagem in [Resolvido] [Duvida] [JAVA] setar um local was marked as the answer
Claro né, até porque o correto é: new Location(String, double, double, double) ou new Location(String, double, double, double, float, float);
Pra setar:
public void set(Location loc){ getConfig().set("x", loc.getX()); getConfig().set("y", loc.getY()); getConfig().set("z", loc.getZ()); getConfig().set("yaw", loc.getYaw()); getConfig().set("pitch", loc.getPitch()); getConfig().set("mundo", loc.getWorld().getName()); saveConfig(); } Pra pegar:
public Location get(){ double x = getConfig().getDouble("x"); double y = getConfig().getDouble("y"); double z = getConfig().getDouble("z"); float yaw = (float)getConfig().getDouble("yaw"); float pitch = (float)getConfig().getDouble("pitch"); String mundo = getConfig().getString("mundo"); Location l = new Location(Bukkit.getWorld(mundo), x, y, z, yaw, pitch); return l; } Google Mandou Lembranças
-
ExtraPlays's postagem in [Resolvido] [Duvida] Mostrar o Ping was marked as the answer
Tem que usar CraftPlayer...
Player p = (Player)sender; int ping = ((CraftPlayer)p).getHandle().ping; -
ExtraPlays's postagem in [Resolvido] [CMD] Erro /Duvida was marked as the answer
Da algum erro quando você digita o comando?
Registrou o Comando na plugin.yml e na classe principal?
-
ExtraPlays's postagem in [Resolvido] [duvida][urgente] Verificar enchant e level was marked as the answer
Player p = //Blablaa
ItemStack hand = p.getItemInHand();
if (hand.getEnchantments() != null){ // Verifica se o item possui encantamento
Map<Enchantment, Integer> enchants = hand.getEnchantments(); // Faz um map pegando todos os Encantamentos do item
if (enchants.containsKey(Enchantment. NomeDoEncantamento){ // Verifica se contem X encantamento
int level = enchants.get(Enchantment. NomeDoEncantamento); // Pega o Level do Encantamento X
// Faz Alguma coisa '-'
}
}
-
ExtraPlays's postagem in [Resolvido] Cavalos was marked as the answer
Horse horse = (Horse) p.getWorld().spawnEntity(p.getLocation(), EntityType.HORSE); pra deixar adulto
horse.setAdult(); pra colocar a cela
horse.getInventory().setSaddle(new ItemStack(Material.SADDLE, 1)); para poder domar
horse.setTamed(true); para o player ser dono do cavalo
horse.setOwner(p) Ai pra não pode hitar voce tem que verificar no EntityDamageByEntityEvent se oque o player ta hitando e um cavalo.... e Cancela o evento
-
ExtraPlays's postagem in [Resolvido] [duvida] Void was marked as the answer
Public bem dizer que voce "pode acessar em qualquer lugar"
Private: A única classe que tem acesso ao atributo é a própria classe que o define
Tem Void, Boolean, String, Int. etc...
Recomendo você assistir alguns videos de java já que não sabe a diferença entre public e private
@Edit:
Modifier | Class | Package | Subclass | World
————————————+———————+—————————+——————————+———————
public | ✔ | ✔ | ✔ | ✔
————————————+———————+—————————+——————————+———————
protected | ✔ | ✔ | ✔ | ✘
————————————+———————+—————————+——————————+———————
no modifier | ✔ | ✔ | ✘ | ✘
————————————+———————+—————————+——————————+———————
private | ✔ | ✘ | ✘ | ✘
-
ExtraPlays's postagem in [Resolvido] [duvida] Algumas duvidas was marked as the answer
Sim, Porque eu pedi para a staff mover o topico...
@Topic Duvidas resolvidas?
-
ExtraPlays's postagem in [Resolvido] [Duvida] Api Legendchat was marked as the answer
usa uma hashmap e verifica se contem o player e seta a tag com o valor da hash
tipo assim kk
HashMap<String, String> map = new HashMap<>(); @EventHandler public void aoFalarL(ChatMessageEvent e){ Player p = e.getSender(); if (e.getTags().contains('tag') && map.containsKey(p.getName())){ e.setTagValue("tag", map.get(p.getNAme())) } } pra quando clicar
@EventHandler public void onClick(InventoryClickEvent e) { Player p = (Player) e.getWhoClicked(); if (e.getInventory().getName().equalsIgnoreCase(getConfig().getString("Nome_Do_Gui"))) { if (e.getCurrentItem().getType() == Material.NAME_TAG) { e.setCancelled(true); p.closeInventory(); for (String mensagem : getConfig().getStringList("Tag_Escolhida")) { p.sendMessage(mensagem.replaceAll("&", "§").replaceAll("<player>", p.getName())); } map.put(p.getName(), SUA TAG); } } } } ai voce salva os dados na config quando o server desligar
e quando iniciar carrega os dados na hashmap
-
ExtraPlays's postagem in [Resolvido] DEV -> preciso de ajuda '-' (scheduleSyncDelayedTask) was marked as the answer
no scheduler onde ta o manager.getInstance() tem que ser a instancia da sua classe principal
recomendo usar constructor ou coloca isso na main
public static Main getInstance(){ return (Main) bukkit.getPluginManager().getPlugin("NOme do seu pl da plugin.yml"); } -
ExtraPlays's postagem in [Resolvido] Olá duvida sobre quebrar bloco evento;-; was marked as the answer
sabe usar api vault?
HashMap<String, Integer> jobs = new HashMap<String, Integer>(); @SuppressWarnings("deprecation") @EventHandler public void aoQuebrar(BlockBreakEvent e){ Block bloco = e.getBlock(); Player p = e.getPlayer(); int dinheiro = getConfig().getInt("Dinheiro"); ItemStack spruce = new ItemStack((Material.getMaterial(5)), 1, (short) 1); ItemStack birch = new ItemStack((Material.getMaterial(5)), 1, (short) 2); ItemStack jungle = new ItemStack((Material.getMaterial(17)), 1, (short) 3); ItemStack oak = new ItemStack((Material.getMaterial(5)), 1); if (bloco == spruce || bloco == oak || bloco == jungle || bloco == birch){ int blocosq = jobs.get(p.getName()); if (jobs.containsKey(p.getName())){ jobs.put(p.getName(), (blocosq + 1)); // da o dinheiro pro player for (String s : getConfig().getStringList("Nome"){ p.sendMessage(s.replace("@BlocosQuebrados", jobs.get(p..getName()).replace("@LenhadorMoney", dinheiro).replace("&", "§"); } } } } -
ExtraPlays's postagem in [Entregue] [Pedido] Staff Online em Gui! was marked as the answer
Ta aí
Download
-
ExtraPlays's postagem in [Entregue] [Pedido] Scoreboard was marked as the answer
Ta ai
as print vc ja tem ne..
Download
-
ExtraPlays's postagem in [Entregue] [Plugin] Kit Em Gui was marked as the answer
tem o pl de kits em gui do proyx ja viu?
me adiciona skype: extra.plays
-
ExtraPlays's postagem in [Entregue] Pedido ScoreBoard Simples was marked as the answer
assim ta bom?
Essa Score foi feita com teams então ela não vai piscar
@Edit: Download Removido por Mim....
Quando entrar me chama no Skype extra.plays, que vou trocar o estilo da score
-
ExtraPlays's postagem in [Resolvido] [Dúvida] LegendChat ( API ) was marked as the answer
Clique
Pegar o Canal
getChannel() -
ExtraPlays's postagem in [Resolvido] [Dúvida] PEX was marked as the answer
public static void setPlayerPrefix(Player p, String prefixo, String mundo) {
PermissionsEx.getUser(p.getName()).setPrefix(prefixo, mundo);
}
pra usar
setPlayerPrefix(p, "xablau", p.getWorld().getName());
-
ExtraPlays's postagem in [Resolvido] [Ajuda] Scoreboard + Caracteres was marked as the answer
@SuppressWarnings("deprecation") @EventHandler public void AoEntrar(PlayerJoinEvent e) { final Player p = e.getPlayer(); final Scoreboard board = Bukkit.getScoreboardManager().getNewScoreboard(); Objective obj = board.registerNewObjective("noflicker", "dummy"); obj.setDisplayName("§b§lArkham§3§lCraft"); obj.setDisplaySlot(DisplaySlot.SIDEBAR); Score es = obj.getScore(ChatColor.BLUE + " "); es.setScore(52); Score rank = obj.getScore("§e>> Rank: " +Pex.getPlayerGroupPrefix(p).replace("[", "").replace("]", "")); rank.setScore(51); Score es1 = obj.getScore(ChatColor.RED + " "); es1.setScore(50); Score money = obj.getScore(ChatColor.YELLOW + ">> Dinheiro: "); money.setScore(49); Score es3 = obj.getScore(ChatColor.AQUA + " "); es3.setScore(48); if (getClanManager().getClanPlayer(p.getName()) != null){ Score clan = obj.getScore("§e>> Clan: " + getClanManager().getClanPlayer(p.getName()).getTagLabel()); clan.setScore(47); }else { Score clan = obj.getScore("§e>> Clan: §6[Nenhum]"); clan.setScore(47); } Score es5 = obj.getScore(ChatColor.AQUA.toString()); es5.setScore(46); Team Money = board.registerNewTeam("Money"); Money.addEntry(ChatColor.YELLOW + ">> Dinheiro: "); Money.setSuffix("" + econ.getBalance(p.getName())); p.setScoreboard(board); BukkitScheduler sh = Bukkit.getScheduler(); sh.scheduleSyncRepeatingTask(this, new Runnable() { @Override public void run() { board.getTeam("Money").setSuffix("§6" + econ.getBalance(p.getName())); } }, 0, 2 * 20L); } Eu uso esse codigo, mais ele buga quando faço mais de um Team da uma lida ae aqui atualiza de boa sem piscar
-
ExtraPlays's postagem in [Resolvido] [Dúvida] Scoreboard Com + de 32 caracteres was marked as the answer
@SuppressWarnings("deprecation") public class ScoreBoardMain implements Listener { public OfflinePlayer getText(String string) { //altere o numero 40 string = string.length() > 40 ? string.substring(0, 40) : string; return Bukkit.getOfflinePlayer(string); } @EventHandler public void aoEntrar(PlayerJoinEvent e) { Player p = e.getPlayer(); Scoreboard score = Bukkit.getScoreboardManager().getNewScoreboard(); Objective obj = score.registerNewObjective("teste", "dummy"); obj.setDisplaySlot(DisplaySlot.SIDEBAR); obj.setDisplayName("§6§l" + p.getName()); obj.getScore(getText("§a§lXablau")).setScore(15); p.setScoreboard(score); } } ps: N fui eu que fiz
-
ExtraPlays's postagem in [Resolvido] cuboid + Blocos was marked as the answer
https://bukkit.org/threads/protection-region-cuboid-creation.164161/
Nao vou explicar pois estou meio ocupado
FileConfiguration configpos = Main.getMain().GetConfig("posicoes");
FileConfiguration configpos2 = Main.getMain().GetConfig("posicoes2");
@EventHandler(ignoreCancelled = true, priority = EventPriority.LOW)
public void onPlayerInteract(PlayerInteractEvent e) {
Player p = e.getPlayer();
if (e.getAction() == Action.RIGHT_CLICK_BLOCK) {
if (e.getItem() != null) {
if (e.getItem().getType() == Material.GOLD_AXE) {
configpos.set("Pos1.X" , e.getClickedBlock().getX());
configpos.set("Pos1.Y" , e.getClickedBlock().getY());
configpos.set("Pos1.Z" , e.getClickedBlock().getZ());
configpos.set("Pos1.Mundo" , p.getWorld().getName());
Main.getMain().SaveConfig("posicoes");
p.sendMessage("§2Posicao 1 setada em: §aX: " + e.getClickedBlock().getX() + " §aY: " + e.getClickedBlock().getY() + " Z: " + e.getClickedBlock().getZ());
}
}
} else if (e.getAction() == Action.LEFT_CLICK_BLOCK){
if (e.getItem() != null) {
if (e.getItem().getType() == Material.GOLD_AXE) {
configpos2.set("Pos2.X" , e.getClickedBlock().getX());
configpos2.set("Pos2.Y" , e.getClickedBlock().getY());
configpos2.set("Pos2.Z" , e.getClickedBlock().getZ());
configpos2.set("Pos2.Mundo" , p.getWorld().getName());
Main.getMain().SaveConfig("posicoes2");
p.sendMessage("§2Posicao 2 setada em: §aX: " + e.getClickedBlock().getX() + " §aY: " + e.getClickedBlock().getY() + " Z: " + e.getClickedBlock().getZ());
}
}
}
}
Location loc1 = new Location(
Bukkit.getWorld(configpos.getString("Pos1.Mundo")),
configpos.getDouble("Pos1.X"),
configpos.getDouble("Pos1.Y"),
configpos.getDouble("Pos1.Z"));
Location loc2 = new Location(
Bukkit.getServer().getWorld(configpos2.getString("Pos2.Mundo")),
configpos2.getDouble("Pos2.X"),
configpos2.getDouble("Pos2.Y"),
configpos2.getDouble("Pos2.Z"));
Cuboid cuboid = new Cuboid(loc1, loc2);
for (Block block : cuboid)
block.setType(Material.getMaterial(7));
-
ExtraPlays's postagem in [Resolvido] Se o nome do item clicado no GUI estiver no arquivo... was marked as the answer
@EventHandler
public void aoClicarInv(InventoryClickEvent e) {
if (e.getInventory().getName().equalsIgnoreCase("§bSuper §2Usuarios")) {
ItemStack clicado = e.getCurrentItem();
if (clicado.getItemMeta().getDisplayName().equalsIgnoreCase("NOME")) {
Bukkit.broadcastMessage("sOlAdO");
}
}
}
-
ExtraPlays's postagem in [Resolvido] [Duvida] Bukkit Item was marked as the answer
@EventHandler
public void aoQuebrar(BlockBreakEvent e){
Player p = e.getPlayer();
//se o bloco quebrado for a sponja
if (e.getBlock().getType() == Material.SPONGE){
ItemStack mao = new ItemStack(Material.ACTIVATOR_RAIL);
mao.getItemMeta().getDisplayName().equalsIgnoreCase("Chave de luck block");
//se o item na mao for o gancho
if (p.getItemInHand() == mao){
p.sendMessage("vc quebrou a esponja e perdeu uma chave");
}
}
}
-
ExtraPlays's postagem in [Resolvido] Ajuda was marked as the answer
Tenta por isso no @Eventhandler
@EventHandler(priority = EventPriority.HIGHEST) @Override public void onEnable() { if (!new File(getDataFolder(), "config.yml").exists()){ saveDefaultConfig(); } mensagens.add(getConfig().getString("motd").replace("&", "§")); mensagens.add(getConfig().getString("motd2").replace("&", "§")); mensagens.add(getConfig().getString("motd3").replace("&", "§")); mensagens.add(getConfig().getString("motd4").replace("&", "§")); getServer().getPluginManager().registerEvents(this, this); } Poe isso no default
default: e.setMotd(mensagens.get(1)); break;