mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-28 21:56:28 +01:00
Clean up YAML storage methods
This commit is contained in:
parent
0ba111ec6a
commit
d3c3b1d6c9
@ -55,13 +55,10 @@ public class SeparatedYamlStorage implements StorageImplementation {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init() throws Exception {
|
public void init() throws Exception {
|
||||||
// TODO Auto-generated method stub
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void close() {
|
public void close() {
|
||||||
// TODO Auto-generated method stub
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
@ -377,7 +374,7 @@ public class SeparatedYamlStorage implements StorageImplementation {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void saveQuester(final IQuester quester) throws Exception {
|
public void saveQuester(final IQuester quester) {
|
||||||
final FileConfiguration data = quester.getBaseData();
|
final FileConfiguration data = quester.getBaseData();
|
||||||
try {
|
try {
|
||||||
data.save(new File(directoryPath + File.separator + quester.getUUID() + ".yml"));
|
data.save(new File(directoryPath + File.separator + quester.getUUID() + ".yml"));
|
||||||
@ -387,13 +384,13 @@ public class SeparatedYamlStorage implements StorageImplementation {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteQuester(final UUID uniqueId) throws Exception {
|
public void deleteQuester(final UUID uniqueId) {
|
||||||
final File f = new File(directoryPath + File.separator + uniqueId + ".yml");
|
final File f = new File(directoryPath + File.separator + uniqueId + ".yml");
|
||||||
f.delete();
|
f.delete();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getQuesterLastKnownName(final UUID uniqueId) throws Exception {
|
public String getQuesterLastKnownName(final UUID uniqueId) {
|
||||||
IQuester quester = plugin.getQuester(uniqueId);
|
IQuester quester = plugin.getQuester(uniqueId);
|
||||||
if (quester != null) {
|
if (quester != null) {
|
||||||
quester.hardClear();
|
quester.hardClear();
|
||||||
@ -404,7 +401,7 @@ public class SeparatedYamlStorage implements StorageImplementation {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Collection<UUID> getSavedUniqueIds() throws Exception {
|
public Collection<UUID> getSavedUniqueIds() {
|
||||||
final Collection<UUID> ids = new ConcurrentSkipListSet<>();
|
final Collection<UUID> ids = new ConcurrentSkipListSet<>();
|
||||||
final File folder = new File(directoryPath);
|
final File folder = new File(directoryPath);
|
||||||
if (!folder.exists()) {
|
if (!folder.exists()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user