Comment out/remove the /speed walk code, until the client properly supports this function.

This commit is contained in:
KHobbits 2012-08-26 19:53:58 +01:00
parent 65741403e0
commit 298f3dc3b2
2 changed files with 22 additions and 14 deletions

View File

@ -39,30 +39,38 @@ public class Commandspeed extends EssentialsCommand
boolean isBypass = user.isAuthorized("essentials.speed.bypass");
if (args.length == 1)
{
isFly = user.isFlying();
//isFly = user.isFlying();
isFly = true;
speed = getMoveSpeed(args[0]);
}
else
{
isFly = isFlyMode(args[0]);
speed = getMoveSpeed(args[1]);
if (args.length > 2 && user.isAuthorized("essentials.speed.others"))
//isFly = isFlyMode(args[0]);
//speed = getMoveSpeed(args[1]);
//if (args.length > 2 && user.isAuthorized("essentials.speed.others"))
//{
// speedOtherPlayers(server, user, isFly, isBypass, speed, args[2]);
// return;
//}
isFly = true;
speed = getMoveSpeed(args[0]);
if (user.isAuthorized("essentials.speed.others"))
{
speedOtherPlayers(server, user, isFly, isBypass, speed, args[2]);
speedOtherPlayers(server, user, isFly, isBypass, speed, args[1]);
return;
}
}
if (isFly)
{
//if (isFly)
//{
user.setFlySpeed(getRealMoveSpeed(speed, isFly, isBypass));
user.sendMessage(_("moveSpeed", _("flying"), speed, user.getDisplayName()));
}
else
{
user.setWalkSpeed(getRealMoveSpeed(speed, isFly, isBypass));
user.sendMessage(_("moveSpeed", _("walking"), speed, user.getDisplayName()));
}
//}
//else
//{
// user.setWalkSpeed(getRealMoveSpeed(speed, isFly, isBypass));
// user.sendMessage(_("moveSpeed", _("walking"), speed, user.getDisplayName()));
//}
}
private void speedOtherPlayers(final Server server, final CommandSender sender, final boolean isFly, final boolean isBypass, final float speed, final String target)

View File

@ -328,7 +328,7 @@ commands:
aliases: [espawnmob,mob,emob]
speed:
description: Change your speed limits
usage: /<command> [fly|walk] [speed] [player]
usage: /<command> [speed] [player]
aliases: [flyspeed,walkspeed,fspeed,wspeed,eflyspeed,ewalkspeed,efspeed,ewspeed,espeed]
sudo:
description: Make another user perform a command.