mirror of
https://github.com/Phoenix616/RandomTeleport.git
synced 2025-02-16 20:41:21 +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) {
|
public void writeMap(Object object, String outputFile) {
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
File file = new File(getDataFolder().getPath() + "/" + outputFile);
|
File file = new File(getDataFolder(), outputFile);
|
||||||
if (!file.isFile()) {
|
if (!file.isFile()) {
|
||||||
if(!file.createNewFile()){
|
if(!file.createNewFile()){
|
||||||
throw new IOException("Error creating new file: " + file.getPath());
|
throw new IOException("Error creating new file: " + file.getPath());
|
||||||
@ -580,7 +580,7 @@ public class RandomTeleport extends JavaPlugin implements CommandExecutor {
|
|||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public Object readMap(String inputFile) {
|
public Object readMap(String inputFile) {
|
||||||
HashMap<Object, Object> map = new HashMap<Object,Object>();
|
HashMap<Object, Object> map = new HashMap<Object,Object>();
|
||||||
File file = new File(getDataFolder().getPath() + "/" + inputFile);
|
File file = new File(getDataFolder(), inputFile);
|
||||||
if (!file.isFile()) {
|
if (!file.isFile()) {
|
||||||
getLogger().log(Level.INFO, "No file found in " + file.getPath());
|
getLogger().log(Level.INFO, "No file found in " + file.getPath());
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user