Skip to content

Commit b3679a0

Browse files
committed
Removed unused execute from the command.
1 parent 8a1f105 commit b3679a0

File tree

1 file changed

+0
-28
lines changed

1 file changed

+0
-28
lines changed

TFly/Commands/CommandFlyAdmin.cs

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -87,33 +87,5 @@ public override bool ExecutionRequested(IRocketPlayer caller, string[] args)
8787
UChatHelper.SendCommandReply(Plugin, caller, "success_fly_changed_all");
8888
return true;
8989
}
90-
91-
public void Execute(IRocketPlayer caller, string[] args)
92-
{
93-
UnturnedPlayer player = (UnturnedPlayer)caller;
94-
TFlyComponent comp = player.GetComponent<TFlyComponent>();
95-
96-
if (DateTime.Now < comp.Cooldown && !player.HasPermission(TFly.Instance.Config.PermissionAdmin))
97-
{
98-
UChatHelper.SendCommandReply(TFly.Instance, caller, "error_command_cooldown", Convert.ToInt32((comp.Cooldown - DateTime.Now).TotalSeconds).ToString());
99-
return;
100-
}
101-
102-
TFlyComponent cp = player.GetComponent<TFlyComponent>();
103-
104-
if (cp.IsFlying)
105-
{
106-
comp.SetFlySpeed(TFly.Instance.Config.DefaultFlySpeed);
107-
comp.SetFlightMode(false);
108-
comp.Cooldown = DateTime.Now.AddSeconds(TFly.Instance.Config.CooldownInSeconds);
109-
}
110-
else
111-
{
112-
comp.SetFlySpeed(TFly.Instance.Config.DefaultFlySpeed);
113-
comp.SetFlightMode(true);
114-
comp.Cooldown = DateTime.Now.AddSeconds(TFly.Instance.Config.CooldownInSeconds);
115-
}
116-
117-
}
11890
}
11991
}

0 commit comments

Comments
 (0)