plan manage remove bugfix

This commit is contained in:
Rsl1122 2017-02-11 12:02:56 +02:00
parent 7f29d3dcc1
commit 4e6d84cde2
8 changed files with 80 additions and 73 deletions

View File

@ -73,6 +73,7 @@ public enum Phrase {
ANALYSIS_FAIL_NO_DATA(ANALYSIS + "Analysis failed, no data in the database."),
ANALYSIS_BEGIN_ANALYSIS(ANALYSIS + "Data Fetched, beginning Analysis of data.."),
ANALYSIS_COMPLETE(ANALYSIS + "Analysis Complete."),
DATA_CORRUPTION_WARN("Some data might be corrupted: "+REPLACE0),
//
ERROR_PLANLITE("PlanLite not found, if you're have plugins using PlanAPI v1.6.0 download PlanLite."),
ERROR_CONSOLE_PLAYER("This point of code should not be accessable on console. Inform author: "+REPLACE0+" Console: REPLACE1"),

View File

@ -9,7 +9,7 @@
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
* License for more details.
*
* You should have received a copy of the License
* along with this program.
@ -51,22 +51,15 @@ import org.bukkit.plugin.PluginManager;
import org.bukkit.scheduler.BukkitRunnable;
import org.bukkit.scheduler.BukkitTask;
/* TODO 2.5.0
/* TODO 2.6.0
Placeholder API
Database cleaning
Play session lenght
- Existing data
- importing
Kills & Deaths 50%
- DB saving & Alter tables
Location Analysis to view meaningful locations on Dynmap (Investigate dynmap api)
Integrate PlanLite features to Plan and discontinue PlanLite
Seperate serverdata and userdata saving
Database Cleaning of useless data
Fix any bugs that come up
Localization
- Combine the two locale files
Security
*/
/**
*

View File

@ -80,7 +80,7 @@ public class AnalyzeCommand extends SubCommand {
sendAnalysisMessage(sender);
this.cancel();
}
if (timesrun > 45) {
if (timesrun > 10) {
sender.sendMessage(Phrase.COMMAND_TIMEOUT.parse("Analysis"));
this.cancel();
}

View File

@ -125,7 +125,7 @@ public class InspectCommand extends SubCommand {
sender.sendMessage(Phrase.CMD_FOOTER+"");
this.cancel();
}
if (timesrun > 45) {
if (timesrun > 10) {
sender.sendMessage(Phrase.COMMAND_TIMEOUT.parse("Inspect"));
this.cancel();
}

View File

@ -515,7 +515,6 @@ public abstract class SQLDB extends Database {
statement.setString(1, "" + userId);
statement.execute();
statement.close();
statement = connection.prepareStatement("DELETE FROM " + nicknamesName + " WHERE UPPER(" + nicknamesColumnUserID + ") LIKE UPPER(?)");
statement.setString(1, "" + userId);
statement.execute();
@ -524,7 +523,7 @@ public abstract class SQLDB extends Database {
statement.setString(1, "" + userId);
statement.execute();
statement.close();
statement = connection.prepareStatement("DELETE FROM " + ipsName + " WHERE UPPER(" + ipsColumnIP + ") LIKE UPPER(?)");
statement = connection.prepareStatement("DELETE FROM " + ipsName + " WHERE UPPER(" + ipsColumnUserID + ") LIKE UPPER(?)");
statement.setString(1, "" + userId);
statement.execute();
statement.close();

View File

@ -50,7 +50,7 @@ public class Response {
} else {
securityCode = requestArgs[1];
}
if (!securityCode.equals(Settings.SECURITY_CODE+"")) {
if (!securityCode.equals(Settings.SECURITY_CODE + "")) {
forbidden = true;
}
if (forbidden) {
@ -77,12 +77,22 @@ public class Response {
return;
}
if (requestHandler.checkIfCached(uuid)) {
try {
String dataHtml = requestHandler.getDataHtml(uuid);
String htmlDef = "HTTP/1.1 OK\r\n"
+ "Content-Type: text/html; charset=utf-8\r\n"
+ "Content-Length: " + dataHtml.length() + "\r\n"
+ "\r\n";
output.write((htmlDef + dataHtml).getBytes());
} catch (NullPointerException e) {
e.printStackTrace();
String errorMessage = "HTTP/1.1 404 Error\r\n"
+ "Content-Type: text/html;\r\n"
+ "Content-Length: 30\r\n"
+ "\r\n"
+ "<h1>404 - Error has occurred..</h1>";
output.write(errorMessage.getBytes());
}
return;
}
}

View File

@ -131,6 +131,7 @@ public class Analysis {
HashMap<String, Long> playtimes = new HashMap<>();
// Fill Dataset with userdata.
for (UserData uData : rawData) {
try {
if (planLiteEnabled) {
PlanLitePlayerData litePlayerData = uData.getPlanLiteData();
String town = litePlayerData.getTown();
@ -185,6 +186,9 @@ public class Analysis {
totalKills += uData.getPlayerKills();
totalMobKills += uData.getMobKills();
totalDeaths += uData.getDeaths();
} catch (NullPointerException e) {
plugin.logError(Phrase.DATA_CORRUPTION_WARN.parse(uData.getUuid()+""));
}
}
// Save Dataset to AnalysisData

View File

@ -1,7 +1,7 @@
name: Plan
author: Rsl1122
main: com.djrapitops.plan.Plan
version: 2.5.0
version: 2.5.1
commands:
plan: