Skip to content
This repository was archived by the owner on Aug 3, 2018. It is now read-only.

Commit

Permalink
Fix creating data folder
Browse files Browse the repository at this point in the history
  • Loading branch information
q1an1x committed Apr 6, 2017
1 parent 85bda0a commit d3c6231
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions nukkit/src/taylcd/TextReplacer.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import cn.nukkit.network.protocol.TextPacket;
import cn.nukkit.plugin.PluginBase;

import java.io.File;
import java.util.Calendar;
import java.util.HashMap;
import java.util.Map;
Expand All @@ -19,6 +20,9 @@ public class TextReplacer extends PluginBase implements Listener {
@Override
public void onLoad() {

File file = new File(getDataFolder(), "");
if(!file.isDirectory()) if(!file.mkdir()) getLogger().notice("Unable to create data folder.");

this.saveDefaultConfig();
this.reloadConfig();

Expand Down

0 comments on commit d3c6231

Please sign in to comment.