Actually add fly speed command

This commit is contained in:
Spencer 2017-12-30 21:55:31 -05:00 committed by Alexander Meech
parent 91d4f1526e
commit f54b6606ab
2 changed files with 5 additions and 1 deletions

View File

@ -37,6 +37,7 @@ import mineplex.mapparser.command.CopySchematicsCommand;
import mineplex.mapparser.command.CreateCommand;
import mineplex.mapparser.command.CurrentlyLiveCommand;
import mineplex.mapparser.command.DeleteCommand;
import mineplex.mapparser.command.FlySpeedCommand;
import mineplex.mapparser.command.GameTypeCommand;
import mineplex.mapparser.command.HubCommand;
import mineplex.mapparser.command.GameTypeInfoCommand;
@ -137,6 +138,7 @@ public class MapParser extends JavaPlugin
commandModule.add(new TimeCommand(this));
commandModule.add(new MapInfoCommand(this));
commandModule.add(new ParseCommand(this));
commandModule.add(new FlySpeedCommand(this));
// Teleport-related commands
commandModule.add(new HubCommand(_teleportManager));

View File

@ -3,11 +3,12 @@ package mineplex.mapparser.command;
import org.bukkit.entity.Player;
import mineplex.core.common.util.C;
import mineplex.core.common.util.F;
import mineplex.mapparser.MapParser;
public class FlySpeedCommand extends BaseCommand
{
private final static float BASE_SPEED = 0.1F;
private final static float BASE_SPEED = 1F;
public FlySpeedCommand(MapParser plugin)
{
@ -38,6 +39,7 @@ public class FlySpeedCommand extends BaseCommand
}
player.setFlySpeed(newSpeed / 10);
message(player, "Set your flight speed to " + F.elem(newSpeed));
return true;
}
}