.getVelocity, Moving to fast in console

Discussion in 'Plugin Development' started by stantheman68, Oct 17, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    stantheman68

    Hello,

    I recently created a plugin with my hopes that when you put in the command /boost it will shoot you 100 blocks on the Y axis. The plugin works, Though when I try the command on the server, It will freeze my Minecraft character and then spam this message in my server console,

    [​IMG]

    This is the code I have programmed for the plugin,
    Code:java
    1. public class SanctumCraft extends JavaPlugin{
    2. public final Logger logger = Logger.getLogger("Minecraft");
    3. public static SanctumCraft plugin;
    4.  
    5. @Override
    6. public void onDisable() {
    7. getLogger().info("Plugin Disabled.");
    8. }
    9.  
    10. @Override
    11. public void onEnable() {
    12. getLogger().info("Plugin Enabled.");
    13. }
    14.  
    15. public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args){
    16. if(cmd.getName().equalsIgnoreCase("boost")){
    17. Player p = (Player) sender;
    18. if(p.hasPermission("sanctumcraft.boost")) {
    19. }
    20. }
    21. return false;
    22. }
    23. }


    If you have any idea why it's doing this and how to fix it, Please let me know.

    Thank You


    [ I forgot to include that I tried to turn fly to true but still did not change anything. I am also opped on the server]
     
  2. Offline

    remremrem

    This will happen when the velocity is set too high. I'm not sure if this can be overridden somehow. On my server I have to keep velocity below 4. You could get around this by doing multiple boosts in series, every 5 ticks or so.
     
    tommycake50 likes this.
Thread Status:
Not open for further replies.

Share This Page