mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 05:06:44 +01:00
Fixed SQLite errors
Added stacktraces to clear (Settings.DEBUG)
This commit is contained in:
parent
0d0825d614
commit
04167997ad
@ -9,24 +9,14 @@
|
||||
|
||||
package com.intellectualcrafters.plot;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Chunk;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.World;
|
||||
import com.intellectualcrafters.plot.database.DBFunc;
|
||||
import org.bukkit.*;
|
||||
import org.bukkit.block.Biome;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.Sign;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.intellectualcrafters.plot.database.DBFunc;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* plot functions
|
||||
@ -562,6 +552,12 @@ public class PlotHelper {
|
||||
SetBlockFast.update(requester);
|
||||
return;
|
||||
} catch (Exception e) {
|
||||
if(Settings.DEBUG) {
|
||||
PlotMain.sendConsoleSenderMessage(C.PREFIX.s() + "Debug Mode Enabled -> Throwing epic stacktrace.");
|
||||
e.printStackTrace();
|
||||
} else {
|
||||
PlotMain.sendConsoleSenderMessage(C.PREFIX.s() + "Something went wrong with plot clearing... Enable debug to get stacktraces.");
|
||||
}
|
||||
PlayerFunctions.sendMessage(requester, C.PREFIX.s() + "&cPlot clear failed... Trying again...");
|
||||
}
|
||||
}
|
||||
|
@ -277,10 +277,7 @@ public class DBFunc {
|
||||
// each time.
|
||||
HashMap<String, Object> settings = getSettings(id);
|
||||
UUID owner = UUID.fromString(r.getString("owner"));
|
||||
Biome plotBiome = Biome.valueOf((String) settings.get("biome"));
|
||||
if (plotBiome == null) {
|
||||
plotBiome = Biome.FOREST;
|
||||
}
|
||||
Biome plotBiome = Biome.FOREST;
|
||||
String[] flags_string;
|
||||
if (settings.get("flags") == null) {
|
||||
flags_string = new String[] {};
|
||||
@ -315,6 +312,10 @@ public class DBFunc {
|
||||
}
|
||||
PlotHomePosition position = null;
|
||||
for (PlotHomePosition plotHomePosition : PlotHomePosition.values()) {
|
||||
if (settings.get("position") == null) {
|
||||
position = PlotHomePosition.DEFAULT;
|
||||
break;
|
||||
}
|
||||
if (plotHomePosition.isMatching((String) settings.get("position"))) {
|
||||
position = plotHomePosition;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user