Package com.palmergames.bukkit.towny.db
Class TownyDataSource
java.lang.Object
com.palmergames.bukkit.towny.db.TownyDataSource
- Direct Known Subclasses:
TownyDatabaseHandler
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract boolean
backup()
boolean
cleanup()
abstract void
deleteDistrict
(District district) abstract void
deleteFile
(String file) abstract void
deleteHibernatedResident
(UUID uuid) abstract void
deleteJail
(Jail jail) abstract void
deleteNation
(Nation nation) abstract void
deletePlotData
(PlotBlockData plotChunk) abstract void
deletePlotGroup
(PlotGroup group) abstract void
deleteResident
(Resident resident) abstract void
deleteTown
(Town town) abstract void
deleteTownBlock
(TownBlock townBlock) abstract void
deleteWorld
(TownyWorld world) abstract void
abstract CompletableFuture
<Optional<Long>> abstract boolean
hasPlotData
(TownBlock townBlock) boolean
loadAll()
abstract boolean
abstract boolean
loadDistrict
(District district) abstract boolean
boolean
abstract boolean
abstract boolean
boolean
abstract boolean
loadNation
(Nation nation) abstract boolean
boolean
abstract PlotBlockData
loadPlotData
(TownBlock townBlock) abstract PlotBlockData
loadPlotData
(String worldName, int x, int z) abstract boolean
loadPlotGroup
(PlotGroup group) abstract boolean
boolean
abstract boolean
abstract boolean
loadResident
(Resident resident) abstract boolean
boolean
abstract boolean
abstract boolean
abstract boolean
abstract boolean
boolean
abstract boolean
loadWorld
(TownyWorld world) abstract boolean
boolean
abstract void
mergeNation
(Nation succumbingNation, Nation prevailingNation) abstract void
abstract void
abstract void
abstract @NotNull Resident
newResident
(String name) abstract @NotNull Resident
newResident
(String name, UUID uuid) abstract void
abstract void
removeDistrict
(District district) abstract void
removeJail
(Jail jail) boolean
removeNation
(@NotNull Nation nation, DeleteNationEvent.Cause cause) abstract boolean
removeNation
(@NotNull Nation nation, DeleteNationEvent.Cause cause, @Nullable org.bukkit.command.CommandSender sender) void
removeNation
(Nation nation) Deprecated.abstract void
removePlotGroup
(PlotGroup group) abstract void
removeResident
(Resident resident) boolean
removeTown
(@NotNull Town town, DeleteTownEvent.Cause cause, @Nullable org.bukkit.command.CommandSender sender) abstract boolean
removeTown
(@NotNull Town town, DeleteTownEvent.Cause cause, @Nullable org.bukkit.command.CommandSender sender, boolean delayFullRemoval) void
removeTown
(Town town) Deprecated.since 0.100.2.9 useremoveTown(Town, com.palmergames.bukkit.towny.event.DeleteTownEvent.Cause)
instead.boolean
removeTown
(Town town, DeleteTownEvent.Cause cause) abstract void
removeTownBlock
(TownBlock townBlock) abstract void
removeTownBlocks
(Town town) abstract void
removeWorld
(TownyWorld world) abstract void
renameDistrict
(District district, String newName) abstract void
renameGroup
(PlotGroup group, String newName) abstract void
renameNation
(Nation nation, String newName) abstract void
renamePlayer
(Resident resident, String newName) abstract void
renameTown
(Town town, String newName) boolean
saveAll()
boolean
abstract boolean
abstract boolean
saveDistrict
(District district) boolean
abstract boolean
saveHibernatedResident
(UUID uuid, long registered) abstract boolean
boolean
abstract boolean
saveNation
(Nation nation) boolean
abstract boolean
savePlotData
(PlotBlockData plotChunk) abstract boolean
savePlotGroup
(PlotGroup group) boolean
boolean
abstract boolean
abstract boolean
saveResident
(Resident resident) boolean
abstract boolean
abstract boolean
saveTownBlock
(TownBlock townBlock) boolean
boolean
abstract boolean
saveWorld
(TownyWorld world) boolean
-
Field Details
-
plugin
-
universe
-
-
Method Details
-
backup
- Throws:
IOException
-
loadAll
public boolean loadAll() -
saveAll
public boolean saveAll() -
saveAllWorlds
public boolean saveAllWorlds() -
saveQueues
public boolean saveQueues() -
finishTasks
public abstract void finishTasks() -
loadTownBlockList
public abstract boolean loadTownBlockList() -
loadResidentList
public abstract boolean loadResidentList() -
loadTownList
public abstract boolean loadTownList() -
loadNationList
public abstract boolean loadNationList() -
loadWorldList
public abstract boolean loadWorldList() -
loadRegenList
public abstract boolean loadRegenList() -
loadTownBlocks
public abstract boolean loadTownBlocks() -
loadJailList
public abstract boolean loadJailList() -
loadResident
-
loadTown
-
loadNation
-
loadWorld
-
loadJail
-
loadPlotGroupList
public abstract boolean loadPlotGroupList() -
loadPlotGroup
-
loadDistrictList
public abstract boolean loadDistrictList() -
loadDistrict
-
saveRegenList
public abstract boolean saveRegenList() -
saveResident
-
saveHibernatedResident
-
saveTown
-
savePlotGroup
-
saveDistrict
-
saveJail
-
saveNation
-
saveWorld
-
saveTownBlock
-
savePlotData
-
loadPlotData
-
loadPlotData
-
hasPlotData
-
deletePlotData
-
deleteResident
-
deleteHibernatedResident
-
deleteTown
-
deleteNation
-
deleteWorld
-
deleteTownBlock
-
deleteFile
-
deletePlotGroup
-
deleteDistrict
-
deleteJail
-
getHibernatedResidentRegistered
-
cleanup
public boolean cleanup() -
loadResidents
public boolean loadResidents() -
loadTowns
public boolean loadTowns() -
loadNations
public boolean loadNations() -
loadWorlds
public boolean loadWorlds() -
loadJails
public boolean loadJails() -
loadPlotGroups
public boolean loadPlotGroups() -
loadDistricts
public boolean loadDistricts() -
loadCooldowns
public abstract boolean loadCooldowns() -
saveResidents
public boolean saveResidents() -
savePlotGroups
public boolean savePlotGroups() -
saveDistricts
public boolean saveDistricts() -
saveJails
public boolean saveJails() -
saveTowns
public boolean saveTowns() -
saveNations
public boolean saveNations() -
saveWorlds
public boolean saveWorlds() -
saveTownBlocks
public boolean saveTownBlocks() -
saveCooldowns
public abstract boolean saveCooldowns() -
removeResident
-
removeTownBlock
-
removeTownBlocks
-
removeNation
public boolean removeNation(@NotNull @NotNull Nation nation, @NotNull DeleteNationEvent.Cause cause) -
removeNation
public abstract boolean removeNation(@NotNull @NotNull Nation nation, @NotNull DeleteNationEvent.Cause cause, @Nullable @Nullable org.bukkit.command.CommandSender sender) -
newResident
@NotNull public abstract @NotNull Resident newResident(String name) throws AlreadyRegisteredException, NotRegisteredException -
newResident
@NotNull public abstract @NotNull Resident newResident(String name, UUID uuid) throws AlreadyRegisteredException, NotRegisteredException -
newNation
public abstract void newNation(String name) throws AlreadyRegisteredException, NotRegisteredException -
newNation
public abstract void newNation(String name, UUID uuid) throws AlreadyRegisteredException, NotRegisteredException -
newWorld
- Throws:
AlreadyRegisteredException
-
removeTown
-
removeTown
public boolean removeTown(@NotNull @NotNull Town town, @NotNull DeleteTownEvent.Cause cause, @Nullable @Nullable org.bukkit.command.CommandSender sender) -
removeTown
public abstract boolean removeTown(@NotNull @NotNull Town town, @NotNull DeleteTownEvent.Cause cause, @Nullable @Nullable org.bukkit.command.CommandSender sender, boolean delayFullRemoval) -
removeWorld
- Throws:
UnsupportedOperationException
-
removeJail
-
removePlotGroup
-
removeDistrict
-
renameTown
public abstract void renameTown(Town town, String newName) throws AlreadyRegisteredException, NotRegisteredException -
renameNation
public abstract void renameNation(Nation nation, String newName) throws AlreadyRegisteredException, NotRegisteredException -
mergeNation
-
mergeTown
-
renamePlayer
public abstract void renamePlayer(Resident resident, String newName) throws AlreadyRegisteredException, NotRegisteredException -
renameGroup
- Throws:
AlreadyRegisteredException
-
renameDistrict
public abstract void renameDistrict(District district, String newName) throws AlreadyRegisteredException - Throws:
AlreadyRegisteredException
-
removeTown
Deprecated.since 0.100.2.9 useremoveTown(Town, com.palmergames.bukkit.towny.event.DeleteTownEvent.Cause)
instead.- Parameters:
town
-
-
removeNation
Deprecated.since 0.100.2.96 useremoveNation(Nation, com.palmergames.bukkit.towny.event.DeleteNationEvent.Cause)
instead.- Parameters:
nation
-
-
removeNation(Nation, com.palmergames.bukkit.towny.event.DeleteNationEvent.Cause)
instead.