Skip to content

Commit

Permalink
use emotes dir entry instead of hardcoded "emotes" string
Browse files Browse the repository at this point in the history
  • Loading branch information
KosmX committed Nov 15, 2021
1 parent 4284b84 commit fa9b51d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
import io.github.kosmx.emotes.executor.dataTypes.IGetters;
import io.github.kosmx.emotes.arch.executor.types.GettersImpl;

import java.io.File;

public abstract class AbstractEmotesMain extends EmoteInstance {

@Override
Expand All @@ -18,9 +16,4 @@ public IDefaultTypes getDefaults() {
public IGetters getGetters() {
return new GettersImpl();
}

@Override
public File getExternalEmoteDir() {
return getGameDirectory().resolve("emotes").toFile();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
import io.github.kosmx.emotes.executor.dataTypes.IGetters;
import io.github.kosmx.emotes.arch.executor.types.GettersImpl;

import java.io.File;

public abstract class AbstractEmotesMain extends EmoteInstance {

@Override
Expand All @@ -19,8 +17,4 @@ public IGetters getGetters() {
return new GettersImpl();
}

@Override
public File getExternalEmoteDir() {
return getGameDirectory().resolve("emotes").toFile();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import io.github.kosmx.emotes.executor.dataTypes.IDefaultTypes;
import io.github.kosmx.emotes.executor.dataTypes.IGetters;

import java.io.File;
import java.nio.file.Path;
import java.nio.file.Paths;

Expand Down Expand Up @@ -49,9 +48,4 @@ public boolean isClient() {
public Path getGameDirectory() {
return Paths.get("");
}

@Override
public File getExternalEmoteDir() {
return Paths.get("").resolve("emotes").toFile();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ public abstract class EmoteInstance {
public abstract boolean isClient();

public abstract Path getGameDirectory();
public abstract File getExternalEmoteDir();

public File getExternalEmoteDir(){
return getGameDirectory().resolve(config.emotesDir.get()).toFile();
}

public Path getConfigPath(){
if(!Files.exists(getGameDirectory().resolve("config"))){
try {
Expand Down

0 comments on commit fa9b51d

Please sign in to comment.