mirror of
https://gitlab.com/SamB440/rpgregions-2.git
synced 2026-01-04 15:31:38 +00:00
feature: add region templates (/rpgre)
This commit is contained in:
@@ -347,9 +347,8 @@ public class ConfiguredRegion {
|
||||
return file;
|
||||
}
|
||||
|
||||
public void save(IRPGRegionsAPI plugin) {
|
||||
public void save(IRPGRegionsAPI plugin, File file) {
|
||||
try {
|
||||
File file = this.findFile(plugin);
|
||||
if (file == null) file = new File(plugin.getDataFolder() + "/regions/" + this.id + ".json");
|
||||
try (Writer writer = new FileWriter(file)) {
|
||||
Gson gson = plugin.getGson();
|
||||
@@ -361,6 +360,14 @@ public class ConfiguredRegion {
|
||||
}
|
||||
}
|
||||
|
||||
public void save(IRPGRegionsAPI plugin) {
|
||||
try {
|
||||
this.save(plugin, this.findFile(plugin));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public boolean delete(IRPGRegionsAPI plugin) {
|
||||
try {
|
||||
File file = this.findFile(plugin);
|
||||
|
||||
Reference in New Issue
Block a user