Project cleanup pre merge.
This commit is contained in:
@@ -16,70 +16,70 @@ import engine.objects.PlayerCharacter;
|
||||
|
||||
public class JumpCmd extends AbstractDevCmd {
|
||||
|
||||
public JumpCmd() {
|
||||
public JumpCmd() {
|
||||
super("jump");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void _doCmd(PlayerCharacter pc, String[] words,
|
||||
AbstractGameObject target) {
|
||||
// Arg Count Check
|
||||
if (words.length != 2) {
|
||||
this.sendUsage(pc);
|
||||
return;
|
||||
}
|
||||
@Override
|
||||
protected void _doCmd(PlayerCharacter pc, String[] words,
|
||||
AbstractGameObject target) {
|
||||
// Arg Count Check
|
||||
if (words.length != 2) {
|
||||
this.sendUsage(pc);
|
||||
return;
|
||||
}
|
||||
|
||||
//test
|
||||
//test
|
||||
|
||||
if (words[0].equalsIgnoreCase("face")){
|
||||
if (words[0].equalsIgnoreCase("face")) {
|
||||
|
||||
try {
|
||||
float range = Float.parseFloat(words[1]);
|
||||
Vector3fImmutable newLoc = pc.getFaceDir().scaleAdd(range, pc.getLoc());
|
||||
pc.teleport(newLoc);
|
||||
try {
|
||||
float range = Float.parseFloat(words[1]);
|
||||
Vector3fImmutable newLoc = pc.getFaceDir().scaleAdd(range, pc.getLoc());
|
||||
pc.teleport(newLoc);
|
||||
|
||||
|
||||
} catch (NumberFormatException e) {
|
||||
this.throwbackError(pc, ""
|
||||
+ " failed to parse to Floats");
|
||||
return;
|
||||
} catch (NumberFormatException e) {
|
||||
this.throwbackError(pc, ""
|
||||
+ " failed to parse to Floats");
|
||||
return;
|
||||
|
||||
}
|
||||
return;
|
||||
}
|
||||
float lat = 0.0f, lon = 0.0f;
|
||||
String latLong = '\'' + words[0] + ", " + words[1] + '\'';
|
||||
}
|
||||
return;
|
||||
}
|
||||
float lat = 0.0f, lon = 0.0f;
|
||||
String latLong = '\'' + words[0] + ", " + words[1] + '\'';
|
||||
|
||||
try {
|
||||
lat = Float.parseFloat(words[0]);
|
||||
lon = Float.parseFloat(words[1]);
|
||||
try {
|
||||
lat = Float.parseFloat(words[0]);
|
||||
lon = Float.parseFloat(words[1]);
|
||||
|
||||
} catch (NumberFormatException e) {
|
||||
this.throwbackError(pc, "Supplied LatLong: " + latLong
|
||||
+ " failed to parse to Floats");
|
||||
return;
|
||||
} catch (NumberFormatException e) {
|
||||
this.throwbackError(pc, "Supplied LatLong: " + latLong
|
||||
+ " failed to parse to Floats");
|
||||
return;
|
||||
|
||||
} catch (Exception e) {
|
||||
this.throwbackError(pc,
|
||||
"An unknown exception occurred while attempting to jump to LatLong of "
|
||||
+ latLong);
|
||||
return;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
this.throwbackError(pc,
|
||||
"An unknown exception occurred while attempting to jump to LatLong of "
|
||||
+ latLong);
|
||||
return;
|
||||
}
|
||||
|
||||
Vector3fImmutable loc = pc.getLoc();
|
||||
loc = loc.add(lat, 0f, -lon);
|
||||
pc.teleport(loc);
|
||||
}
|
||||
Vector3fImmutable loc = pc.getLoc();
|
||||
loc = loc.add(lat, 0f, -lon);
|
||||
pc.teleport(loc);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String _getHelpString() {
|
||||
return "Alters your characters position by 'lat' and 'long'. This does not transport you TO 'lat' and 'long', but rather BY 'lat' and 'long' ";
|
||||
@Override
|
||||
protected String _getHelpString() {
|
||||
return "Alters your characters position by 'lat' and 'long'. This does not transport you TO 'lat' and 'long', but rather BY 'lat' and 'long' ";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String _getUsageString() {
|
||||
return "' /jump lat long'";
|
||||
}
|
||||
@Override
|
||||
protected String _getUsageString() {
|
||||
return "' /jump lat long'";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user