*Fixed issue that caused Internal Bug Reporting to not work properly
*Removed telemetry collection since we are not using it anymore *Updated plugin.yml version number from 1.7.2 to 1.7.3 *Changed plugin internal version number from 21 to 22
This commit is contained in:
parent
64bbe2d0d0
commit
68e363ce66
@ -64,7 +64,7 @@ public class BugReport {
|
|||||||
"&" + URLEncoder.encode("checksum", "UTF-8") + "=" + URLEncoder.encode(checksum, "UTF-8") +
|
"&" + URLEncoder.encode("checksum", "UTF-8") + "=" + URLEncoder.encode(checksum, "UTF-8") +
|
||||||
"&" + URLEncoder.encode("ip", "UTF-8") + "=" + URLEncoder.encode(serverIP, "UTF-8") +
|
"&" + URLEncoder.encode("ip", "UTF-8") + "=" + URLEncoder.encode(serverIP, "UTF-8") +
|
||||||
"&" + URLEncoder.encode("uuid", "UTF-8") + "=" + URLEncoder.encode(playerUUID, "UTF-8");
|
"&" + URLEncoder.encode("uuid", "UTF-8") + "=" + URLEncoder.encode(playerUUID, "UTF-8");
|
||||||
URL submitURL = new URL("https://theprogrammersworld.net/Herobrine/pluginBugReporter.php");
|
URL submitURL = new URL("https://www.theprogrammersworld.net/Herobrine/pluginBugReporter.php");
|
||||||
URLConnection urlConn = submitURL.openConnection();
|
URLConnection urlConn = submitURL.openConnection();
|
||||||
urlConn.setDoOutput(true);
|
urlConn.setDoOutput(true);
|
||||||
OutputStreamWriter wr = new OutputStreamWriter(urlConn.getOutputStream());
|
OutputStreamWriter wr = new OutputStreamWriter(urlConn.getOutputStream());
|
||||||
@ -86,7 +86,7 @@ public class BugReport {
|
|||||||
// Get the IP address of the server by calling a page on the website that will return the IP.
|
// Get the IP address of the server by calling a page on the website that will return the IP.
|
||||||
URL ipFetchURL;
|
URL ipFetchURL;
|
||||||
try {
|
try {
|
||||||
ipFetchURL = new URL("https://theprogrammersworld.net/Herobrine/pluginIPFetcher.php");
|
ipFetchURL = new URL("https://www.theprogrammersworld.net/Herobrine/pluginIPFetcher.php");
|
||||||
InputStreamReader ipFetchISR = new InputStreamReader(ipFetchURL.openStream());
|
InputStreamReader ipFetchISR = new InputStreamReader(ipFetchURL.openStream());
|
||||||
BufferedReader ipFetchBR = new BufferedReader(ipFetchISR);
|
BufferedReader ipFetchBR = new BufferedReader(ipFetchISR);
|
||||||
String ipAddress = ipFetchBR.readLine();
|
String ipAddress = ipFetchBR.readLine();
|
||||||
|
@ -78,13 +78,6 @@ public class Herobrine extends JavaPlugin implements Listener {
|
|||||||
getServer().getPluginManager().registerEvents(new WorldListener(), this);
|
getServer().getPluginManager().registerEvents(new WorldListener(), this);
|
||||||
getServer().getPluginManager().registerEvents(this, this);
|
getServer().getPluginManager().registerEvents(this, this);
|
||||||
initHerobrine();
|
initHerobrine();
|
||||||
|
|
||||||
// Start the telemetry collection.
|
|
||||||
if(!configdb.config.contains("config.6747427ca72be763854b9960a309be46115b8331cffd5c7" +
|
|
||||||
"da953760a7ecc7b818e0084a42d019c42aae91ae406fb86448cbabb85fd8ef6ad692d5ad4087bb517"))
|
|
||||||
{
|
|
||||||
new Thread(new Telemetry()).start();
|
|
||||||
}
|
|
||||||
|
|
||||||
// If the user has update checking turned on, start the thread responsible for performing
|
// If the user has update checking turned on, start the thread responsible for performing
|
||||||
// the check.
|
// the check.
|
||||||
|
@ -1,68 +0,0 @@
|
|||||||
package net.theprogrammersworld.herobrine;
|
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.FileInputStream;
|
|
||||||
import java.io.OutputStreamWriter;
|
|
||||||
import java.net.URL;
|
|
||||||
import java.net.URLConnection;
|
|
||||||
import java.net.URLEncoder;
|
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
|
|
||||||
import net.theprogrammersworld.herobrine.ConfigDB;
|
|
||||||
|
|
||||||
public class Telemetry implements Runnable {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
// In order to collect more information about who is using Herobrine, we are going
|
|
||||||
// to start collecting data about the servers that are running it. This is going to
|
|
||||||
// be done as part of an effort to build more specific promotional material.
|
|
||||||
|
|
||||||
// Put the thread to sleep for one minute before we run initial telemetry collection.
|
|
||||||
// After the initial run, telemetry collection will only occur once every hour.
|
|
||||||
try {
|
|
||||||
Thread.sleep(60000);
|
|
||||||
} catch (Exception e) {}
|
|
||||||
|
|
||||||
while(true) {
|
|
||||||
// Telemetry collection time!
|
|
||||||
try {
|
|
||||||
// Get the version number of the Minecraft server.
|
|
||||||
String serverVersion = Bukkit.getServer().getVersion();
|
|
||||||
|
|
||||||
// Get the port on which the Minecraft server is running.
|
|
||||||
String serverPortNumber = Integer.toString(Bukkit.getServer().getPort());
|
|
||||||
|
|
||||||
// Get the plugin's version number.
|
|
||||||
String pluginVersionNumber = ConfigDB.pluginVersionNumber;
|
|
||||||
|
|
||||||
// Get the Herobrine configuration file and get a string from it that we can POST
|
|
||||||
// to the server.
|
|
||||||
File configFile = new File("plugins" + File.separator + "Herobrine" + File.separator + "config.yml");
|
|
||||||
FileInputStream configFileInputStream = new FileInputStream(configFile);
|
|
||||||
byte[] configFileBytes = new byte[(int) configFile.length()];
|
|
||||||
configFileInputStream.read(configFileBytes);
|
|
||||||
configFileInputStream.close();
|
|
||||||
String configFileString = new String(configFileBytes, "UTF-8");
|
|
||||||
|
|
||||||
// POST the collected data to the server.
|
|
||||||
String postData = URLEncoder.encode("serverVersion", "UTF-8") + "=" + URLEncoder.encode(serverVersion, "UTF-8") +
|
|
||||||
"&" + URLEncoder.encode("serverPortNumber", "UTF-8") + "=" + URLEncoder.encode(serverPortNumber, "UTF-8") +
|
|
||||||
"&" + URLEncoder.encode("pluginVersionNumber", "UTF-8") + "=" + URLEncoder.encode(pluginVersionNumber, "UTF-8") +
|
|
||||||
"&" + URLEncoder.encode("configFile", "UTF-8") + "=" + URLEncoder.encode(configFileString, "UTF-8");
|
|
||||||
URL telemetryURL = new URL("https://theprogrammersworld.net/Herobrine/pluginTelemetry.php");
|
|
||||||
URLConnection urlConn = telemetryURL.openConnection();
|
|
||||||
urlConn.setDoOutput(true);
|
|
||||||
OutputStreamWriter wr = new OutputStreamWriter(urlConn.getOutputStream());
|
|
||||||
wr.write(postData);
|
|
||||||
wr.flush();
|
|
||||||
urlConn.getInputStream();
|
|
||||||
|
|
||||||
// Wait one hour before we do this again.
|
|
||||||
Thread.sleep(86400000);
|
|
||||||
} catch (Exception e) {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -15,7 +15,7 @@ public class UpdateScanner implements Runnable {
|
|||||||
// Check for a newer version of the plugin, and put the thread to sleep for 24 hours
|
// Check for a newer version of the plugin, and put the thread to sleep for 24 hours
|
||||||
// before the check is performed again. If a newer version is found, begin reporting
|
// before the check is performed again. If a newer version is found, begin reporting
|
||||||
// the discovery of a newer version once every hour.
|
// the discovery of a newer version once every hour.
|
||||||
final String pluginVersionCount = "21";
|
final String pluginVersionCount = "22";
|
||||||
ConsoleCommandSender console = Bukkit.getServer().getConsoleSender();
|
ConsoleCommandSender console = Bukkit.getServer().getConsoleSender();
|
||||||
|
|
||||||
while(!Herobrine.getPluginCore().getConfigDB().newVersionFound) {
|
while(!Herobrine.getPluginCore().getConfigDB().newVersionFound) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
name: Herobrine
|
name: Herobrine
|
||||||
main: net.theprogrammersworld.herobrine.Herobrine
|
main: net.theprogrammersworld.herobrine.Herobrine
|
||||||
version: 1.7.2
|
version: 1.7.3
|
||||||
website: https://www.theprogrammersworld.net
|
website: https://www.theprogrammersworld.net
|
||||||
commands:
|
commands:
|
||||||
herobrine:
|
herobrine:
|
||||||
|
Reference in New Issue
Block a user