Support for separate Classic html folder.
This commit is contained in:
parent
d2b5c5fc4a
commit
b5da915fd8
6
trunk/dist/game/data/html_classic/readme.txt
vendored
Normal file
6
trunk/dist/game/data/html_classic/readme.txt
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
All files that are located in this folder will replace the ones from the html folder.
|
||||
|
||||
Any additional files in this folder they will work as well as if they where in the html folder.
|
||||
|
||||
WARNING
|
||||
LazyCache config at General.properties must be set as False
|
@ -137,7 +137,13 @@ public class AdminReload implements IAdminCommandHandler
|
||||
{
|
||||
final String path = st.nextToken();
|
||||
final File file = new File(Config.DATAPACK_ROOT, "data/html/" + path);
|
||||
if (file.exists())
|
||||
final File file_classic = new File(Config.DATAPACK_ROOT, "data/html_classic/" + path);
|
||||
if (Config.SERVER_CLASSIC_SUPPORT && file_classic.exists())
|
||||
{
|
||||
HtmCache.getInstance().reload(file_classic);
|
||||
AdminData.getInstance().broadcastMessageToGMs(activeChar.getName() + ": Reloaded Htm File:" + file_classic.getName() + ".");
|
||||
}
|
||||
else if (file.exists())
|
||||
{
|
||||
HtmCache.getInstance().reload(file);
|
||||
AdminData.getInstance().broadcastMessageToGMs(activeChar.getName() + ": Reloaded Htm File:" + file.getName() + ".");
|
||||
|
@ -114,7 +114,8 @@ public class HtmCache
|
||||
return null;
|
||||
}
|
||||
|
||||
final String relpath = Util.getRelativePath(Config.DATAPACK_ROOT, file);
|
||||
String relpath = Util.getRelativePath(Config.DATAPACK_ROOT, file);
|
||||
relpath = relpath.replace("_classic", "");
|
||||
String content = null;
|
||||
try (FileInputStream fis = new FileInputStream(file);
|
||||
BufferedInputStream bis = new BufferedInputStream(fis))
|
||||
|
Loading…
Reference in New Issue
Block a user