Update Enderchest endpoint location
This commit is contained in:
parent
e892476ca0
commit
bfa27f2bc4
@ -8,7 +8,9 @@ package mineplex.core.common.api;
|
||||
public enum ApiHost
|
||||
{
|
||||
AMPLIFIERS("10.33.53.12", 7979),
|
||||
ANTISPAM("10.33.53.12", 8181);
|
||||
ANTISPAM("10.33.53.12", 8181),
|
||||
ENDERCHEST("10.33.53.10", 8010)
|
||||
;
|
||||
|
||||
private String _host;
|
||||
private int _port;
|
||||
|
@ -3,6 +3,7 @@ package mineplex.core.common.api.enderchest;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
import mineplex.core.common.api.ApiHost;
|
||||
import mineplex.core.common.api.ApiWebCall;
|
||||
import mineplex.core.common.util.ZipUtil;
|
||||
import mineplex.core.common.timing.TimingManager;
|
||||
@ -17,14 +18,15 @@ public class EnderchestWorldLoader
|
||||
|
||||
public EnderchestWorldLoader()
|
||||
{
|
||||
_webCall = new ApiWebCall("http://localhost:3000/");
|
||||
String url = "http://" + ApiHost.ENDERCHEST.getHost() + ":" + ApiHost.ENDERCHEST.getPort() + "/";
|
||||
_webCall = new ApiWebCall(url);
|
||||
}
|
||||
|
||||
public void loadMap(String mapType, String folder) throws HashesNotEqualException, IOException
|
||||
{
|
||||
TimingManager.start(TIMINGS_PREFIX + "DownloadMap");
|
||||
String fileName = mapType + "_map.zip";
|
||||
File f = _webCall.getFile(mapType, fileName);
|
||||
File f = _webCall.getFile("map/" + mapType + "/random", fileName);
|
||||
TimingManager.stop(TIMINGS_PREFIX + "DownloadMap");
|
||||
|
||||
TimingManager.start(TIMINGS_PREFIX + "CreateFolders");
|
||||
|
Loading…
Reference in New Issue
Block a user