removed get side in redstone
This commit is contained in:
parent
72e71c8e36
commit
916831743e
@ -15,7 +15,7 @@ class Redstone extends CLIBase {
|
|||||||
public function invoke(handle:TermHandle):Future<Bool> {
|
public function invoke(handle:TermHandle):Future<Bool> {
|
||||||
var subcommand = handle.args[0];
|
var subcommand = handle.args[0];
|
||||||
|
|
||||||
var side:Null<Side> = getSide(handle.args[1]);
|
var side:Null<Side> = handle.args[1];
|
||||||
if (side == null) {
|
if (side == null) {
|
||||||
handle.writeLn("Invalid side");
|
handle.writeLn("Invalid side");
|
||||||
return Future.sync(false);
|
return Future.sync(false);
|
||||||
@ -36,23 +36,4 @@ class Redstone extends CLIBase {
|
|||||||
|
|
||||||
return Future.sync(true);
|
return Future.sync(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getSide(side:String):Null<Side> {
|
|
||||||
switch (side) {
|
|
||||||
case "top":
|
|
||||||
return Side.Top;
|
|
||||||
case "bottom":
|
|
||||||
return Side.Bottom;
|
|
||||||
case "left":
|
|
||||||
return Side.Left;
|
|
||||||
case "right":
|
|
||||||
return Side.Right;
|
|
||||||
case "front":
|
|
||||||
return Side.Front;
|
|
||||||
case "back":
|
|
||||||
return Side.Back;
|
|
||||||
default:
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user