mirror of
https://github.com/Phoenix616/RandomTeleport.git
synced 2024-11-22 10:36:00 +01:00
Merge branch 'master' of https://github.com/Phoenix616/RandomTeleport
This commit is contained in:
commit
efde1188f5
@ -554,7 +554,7 @@ public class RandomTeleport extends JavaPlugin implements CommandExecutor {
|
||||
public void writeMap(Object object, String outputFile) {
|
||||
try
|
||||
{
|
||||
File file = new File(getDataFolder().getPath() + "/" + outputFile);
|
||||
File file = new File(getDataFolder(), outputFile);
|
||||
if (!file.isFile()) {
|
||||
if(!file.createNewFile()){
|
||||
throw new IOException("Error creating new file: " + file.getPath());
|
||||
@ -580,7 +580,7 @@ public class RandomTeleport extends JavaPlugin implements CommandExecutor {
|
||||
@SuppressWarnings("unchecked")
|
||||
public Object readMap(String inputFile) {
|
||||
HashMap<Object, Object> map = new HashMap<Object,Object>();
|
||||
File file = new File(getDataFolder().getPath() + "/" + inputFile);
|
||||
File file = new File(getDataFolder(), inputFile);
|
||||
if (!file.isFile()) {
|
||||
getLogger().log(Level.INFO, "No file found in " + file.getPath());
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user