add server
This commit is contained in:
parent
d5269922b9
commit
76ecfb39ab
25 changed files with 603 additions and 520 deletions
|
@ -1,7 +1,7 @@
|
|||
package game.gui;
|
||||
|
||||
import game.Game;
|
||||
import game.Server;
|
||||
import game.ServerProcess;
|
||||
import game.gui.element.Bar;
|
||||
import game.gui.element.Label;
|
||||
|
||||
|
@ -18,7 +18,7 @@ public class GuiLoading extends Gui {
|
|||
private Bar progressBar1;
|
||||
private Bar progressBar2;
|
||||
|
||||
public static GuiLoading makeLoadTask(final Server server, final String user) {
|
||||
public static GuiLoading makeLoadTask(final ServerProcess server, final String user, final byte[] key) {
|
||||
return new GuiLoading("Lade Welt ...", new Callback() {
|
||||
boolean started = false;
|
||||
|
||||
|
@ -26,8 +26,8 @@ public class GuiLoading extends Gui {
|
|||
if(!this.started && server.isStarted()) {
|
||||
this.started = true;
|
||||
// gm.displayGuiScreen(null);
|
||||
server.setVar("viewDistance", "" + gm.renderDistance);
|
||||
gm.connectToIntegrated(server, user);
|
||||
gm.debugWorld = server.getFolder() == null;
|
||||
gm.connect(null, gm.port, user, "", "", key);
|
||||
// return;
|
||||
}
|
||||
int progress = server.getProgress();
|
||||
|
@ -43,7 +43,7 @@ public class GuiLoading extends Gui {
|
|||
});
|
||||
}
|
||||
|
||||
public static GuiLoading makeIntermittentTask(final Server server) {
|
||||
public static GuiLoading makeIntermittentTask(final ServerProcess server) {
|
||||
return new GuiLoading("Lade Welt ...", new Callback() {
|
||||
public void poll(Game gm, GuiLoading gui) {
|
||||
int progress = server.getProgress();
|
||||
|
@ -63,7 +63,7 @@ public class GuiLoading extends Gui {
|
|||
});
|
||||
}
|
||||
|
||||
public static GuiLoading makeSaveTask(final Server server) {
|
||||
public static GuiLoading makeSaveTask(final ServerProcess server) {
|
||||
return new GuiLoading("Speichere Welt ...", new Callback() {
|
||||
public void poll(Game gm, GuiLoading gui) {
|
||||
if(server.isStopped()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue