-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c6a1f9a
commit 2d24ddf
Showing
5 changed files
with
33 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
server/src/main/java/org/galliumpowered/GalliumConsole.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package org.galliumpowered; | ||
|
||
import net.minecraft.server.Main; | ||
import net.minecrell.terminalconsole.SimpleTerminalConsole; | ||
|
||
public class GalliumConsole extends SimpleTerminalConsole { | ||
@Override | ||
protected boolean isRunning() { | ||
return Mod.getMinecraftServer().isRunning(); | ||
} | ||
|
||
@Override | ||
protected void runCommand(String command) { | ||
Main.dedicatedServer.handleConsoleInput(command, Main.dedicatedServer.createCommandSourceStack()); | ||
} | ||
|
||
@Override | ||
protected void shutdown() { | ||
Mod.getMinecraftServer().halt(false); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters