removed get side in redstone

This commit is contained in:
Djeeberjr 2023-01-27 13:39:20 +01:00
parent 72e71c8e36
commit 916831743e

View File

@ -15,7 +15,7 @@ class Redstone extends CLIBase {
public function invoke(handle:TermHandle):Future<Bool> {
var subcommand = handle.args[0];
var side:Null<Side> = getSide(handle.args[1]);
var side:Null<Side> = handle.args[1];
if (side == null) {
handle.writeLn("Invalid side");
return Future.sync(false);
@ -36,23 +36,4 @@ class Redstone extends CLIBase {
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;
}
}
}