mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
@@ -112,9 +112,14 @@ public class ConsoleCommandInterpreter {
|
||||
registerCommand(new String[]{"teleport", "to"}, s -> {
|
||||
if(s.length<2)
|
||||
return "Command needs 2 parameter";
|
||||
WorldStage.getInstance().GetPlayer().setPosition(Integer.parseInt(s[0]),Integer.parseInt(s[1]));
|
||||
|
||||
return "teleport to ("+s[0]+","+s[1]+")";
|
||||
try {
|
||||
int x = Integer.parseInt(s[0]);
|
||||
int y = Integer.parseInt(s[1]);
|
||||
WorldStage.getInstance().GetPlayer().setPosition(x,y);
|
||||
return "teleport to ("+s[0]+","+s[1]+")";
|
||||
} catch (Exception e) {
|
||||
return "Exception occured, Invalid input";
|
||||
}
|
||||
});
|
||||
registerCommand(new String[]{"teleport", "to", "poi"}, s -> {
|
||||
if(s.length<1)
|
||||
|
||||
Reference in New Issue
Block a user