public class SQLManager extends AbstractDB
Modifier and Type | Field and Description |
---|---|
java.lang.String |
CREATE_HELPERS
|
java.lang.String |
CREATE_PLOT
|
java.lang.String |
CREATE_PLOTS
|
java.lang.String |
CREATE_SETTINGS
|
java.lang.String |
GET_ALL_PLOTS
|
java.lang.String |
SET_OWNER
|
everyone
Constructor and Description |
---|
SQLManager(java.sql.Connection c,
java.lang.String p)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
createAllSettingsAndHelpers(java.util.ArrayList<Plot> plots) |
void |
createPlot(Plot plot)
Create a plot
|
void |
createPlots(java.util.ArrayList<Plot> plots)
Create a plot
|
void |
createPlotSettings(int id,
Plot plot)
Create plot settings
|
void |
createTables(java.lang.String database,
boolean add_constraint)
Create tables
|
void |
delete(java.lang.String world,
Plot plot)
Delete a plot
|
java.util.ArrayList<PlotComment> |
getComments(java.lang.String world,
Plot plot,
int tier) |
int |
getId(java.lang.String world,
PlotId id2) |
java.util.LinkedHashMap<java.lang.String,java.util.HashMap<PlotId,Plot>> |
getPlots()
|
double |
getRatings(Plot plot) |
java.util.HashMap<java.lang.String,java.lang.Object> |
getSettings(int id)
|
void |
purge(java.lang.String world)
|
void |
purge(java.lang.String world,
PlotId id) |
void |
removeComment(java.lang.String world,
Plot plot,
PlotComment comment)
|
void |
removeDenied(java.lang.String world,
Plot plot,
org.bukkit.OfflinePlayer player) |
void |
removeHelper(java.lang.String world,
Plot plot,
org.bukkit.OfflinePlayer player) |
void |
removeTrusted(java.lang.String world,
Plot plot,
org.bukkit.OfflinePlayer player) |
void |
setAlias(java.lang.String world,
Plot plot,
java.lang.String alias) |
void |
setComment(java.lang.String world,
Plot plot,
PlotComment comment)
|
void |
setDenied(java.lang.String world,
Plot plot,
org.bukkit.OfflinePlayer player) |
void |
setFlags(int id,
Flag[] flags) |
void |
setFlags(java.lang.String world,
Plot plot,
Flag[] flags) |
void |
setHelper(java.lang.String world,
Plot plot,
org.bukkit.OfflinePlayer player) |
void |
setMerged(java.lang.String world,
Plot plot,
boolean[] merged) |
void |
setOwner(Plot plot,
java.util.UUID uuid)
Set Plot owner
|
void |
setPosition(java.lang.String world,
Plot plot,
java.lang.String position) |
void |
setTrusted(java.lang.String world,
Plot plot,
org.bukkit.OfflinePlayer player) |
public final java.lang.String SET_OWNER
public final java.lang.String GET_ALL_PLOTS
public final java.lang.String CREATE_PLOTS
public final java.lang.String CREATE_SETTINGS
public final java.lang.String CREATE_HELPERS
public final java.lang.String CREATE_PLOT
public SQLManager(java.sql.Connection c, java.lang.String p)
c
- connectionp
- prefixpublic void setOwner(Plot plot, java.util.UUID uuid)
setOwner
in
class AbstractDB
plot
- Plot Objectuuid
- Owner UUIDpublic void createAllSettingsAndHelpers(java.util.ArrayList<Plot> plots)
createAllSettingsAndHelpers
in
class AbstractDB
public void createPlots(java.util.ArrayList<Plot> plots)
createPlots
in
class AbstractDB
plots
-public void createPlot(Plot plot)
createPlot
in
class AbstractDB
plot
-public void createTables(java.lang.String database, boolean add_constraint) throws java.sql.SQLException
createTables
in
class AbstractDB
java.sql.SQLException
public void delete(java.lang.String world, Plot plot)
delete
in
class AbstractDB
plot
-public void createPlotSettings(int id, Plot plot)
createPlotSettings
in
class AbstractDB
id
-plot
-public int getId(java.lang.String world, PlotId id2)
getId
in
class AbstractDB
public java.util.LinkedHashMap<java.lang.String,java.util.HashMap<PlotId,Plot>> getPlots()
getPlots
in
class AbstractDB
public void setMerged(java.lang.String world, Plot plot, boolean[] merged)
setMerged
in
class AbstractDB
public void setFlags(java.lang.String world, Plot plot, Flag[] flags)
setFlags
in
class AbstractDB
public void setFlags(int id, Flag[] flags)
public void setAlias(java.lang.String world, Plot plot, java.lang.String alias)
setAlias
in
class AbstractDB
plot
-alias
-public void purge(java.lang.String world, PlotId id)
purge
in
class AbstractDB
public void purge(java.lang.String world)
purge
in
class AbstractDB
public void setPosition(java.lang.String world, Plot plot, java.lang.String position)
setPosition
in
class AbstractDB
plot
-position
-public java.util.HashMap<java.lang.String,java.lang.Object> getSettings(int id)
getSettings
in
class AbstractDB
id
-public void removeComment(java.lang.String world, Plot plot, PlotComment comment)
removeComment
in
class AbstractDB
public java.util.ArrayList<PlotComment> getComments(java.lang.String world, Plot plot, int tier)
getComments
in
class AbstractDB
public void setComment(java.lang.String world, Plot plot, PlotComment comment)
setComment
in
class AbstractDB
public void removeHelper(java.lang.String world, Plot plot, org.bukkit.OfflinePlayer player)
removeHelper
in
class AbstractDB
plot
-player
-public void removeTrusted(java.lang.String world, Plot plot, org.bukkit.OfflinePlayer player)
removeTrusted
in
class AbstractDB
plot
-player
-public void setHelper(java.lang.String world, Plot plot, org.bukkit.OfflinePlayer player)
setHelper
in
class AbstractDB
plot
-player
-public void setTrusted(java.lang.String world, Plot plot, org.bukkit.OfflinePlayer player)
setTrusted
in
class AbstractDB
plot
-player
-public void removeDenied(java.lang.String world, Plot plot, org.bukkit.OfflinePlayer player)
removeDenied
in
class AbstractDB
plot
-player
-public void setDenied(java.lang.String world, Plot plot, org.bukkit.OfflinePlayer player)
setDenied
in
class AbstractDB
plot
-player
-public double getRatings(Plot plot)
getRatings
in
class AbstractDB