mirror of
https://github.com/songoda/EpicVouchers.git
synced 2024-12-23 00:57:40 +01:00
Check for the vouchers file before saving it.
This commit is contained in:
parent
771be1ac6c
commit
ac7ac899b7
@ -23,6 +23,7 @@ import org.bukkit.Material;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
import org.bukkit.plugin.PluginManager;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@ -92,7 +93,9 @@ public class EpicVouchers extends SongodaPlugin {
|
||||
manager.registerEvents(new PlayerInteractListener(this), this);
|
||||
manager.registerEvents(new PlayerCommandListener(), this);
|
||||
|
||||
saveResource("vouchers.yml", false);
|
||||
|
||||
if (!new File(this.getDataFolder(), "vouchers.yml").exists())
|
||||
saveResource("vouchers.yml", false);
|
||||
vouchersConfig.load();
|
||||
|
||||
loadVouchersFromFile();
|
||||
|
Loading…
Reference in New Issue
Block a user