Spigot Plugin Development - 11 - Fly Plugin 🚰

แชร์
ฝัง
  • เผยแพร่เมื่อ 12 ม.ค. 2025

ความคิดเห็น • 36

  • @nadavmagen3028
    @nadavmagen3028 5 ปีที่แล้ว +9

    Underrated channel, So fucking good.

  • @KimberleyColours
    @KimberleyColours 2 ปีที่แล้ว +1

    Very good and helpful, Thank you so much!

  • @IGXDStudios
    @IGXDStudios 2 ปีที่แล้ว +1

    Excellent tutor! Thank you!

  • @falc0n2222
    @falc0n2222 3 ปีที่แล้ว +2

    That intro tho. Sheesh!

  • @3lixirGaming
    @3lixirGaming 5 ปีที่แล้ว +12

    Is there no .isAllowFlight() method that you can check instead of the list?
    For example;
    if(player.isAllowFlight()){
    player.setAllowFlight(false)
    }else{
    player.setAllowFlight(true)
    }

    • @KodySimpson
      @KodySimpson  5 ปีที่แล้ว +3

      Yes! Looking back, I forgot why I used the ArrayList...... good eye though! ;)

    • @3lixirGaming
      @3lixirGaming 5 ปีที่แล้ว +1

      @@KodySimpson Thanks, I've made some plugins so I know my general way about but the plugins I've made were for craftbukkit 1.8 (ew, I know). They were made in 2014 so I don't know the latest API. I am going back in to plugin dev though.
      It just made sense that there would be a method called that since the methods are basically setters and getters.

    • @Revanant_
      @Revanant_ 5 ปีที่แล้ว

      @@KodySimpson I am not sure but in order to access .isAllowFlight which Library you will need. is it just public boolean isAllowFlight(){ }. Sorry I am really new to Plugin Development and I wanted to give this if statement a try rather than an Array. It keeps showing me an Error on isAllowFlight

    • @swofty7695
      @swofty7695 5 ปีที่แล้ว +1

      Argonyte | It is instead “if(player.getAllowFlight()){“

    • @zsolti7837
      @zsolti7837 4 ปีที่แล้ว

      if(!player.getAllowFlight(){player.setAllowFlight()}

  • @furkan2388
    @furkan2388 ปีที่แล้ว

    I don't know if I'm doing something wrong, but in this plugin, if the user doesn't have authorization, the command behaves as if it doesn't exist. How can I fix this?

    • @richardgonzalez7256
      @richardgonzalez7256 ปีที่แล้ว

      is normal, thats something mojang change with permission, u can just set a custom message when the player dont have the permission

  • @lolgamerslol5248
    @lolgamerslol5248 2 ปีที่แล้ว

    Hey how can i make it that the player can fly when wearing iron boots called "FlyBoots" and only the player Named "lolgamerslol" can fly with them

    • @rtzgf67games7
      @rtzgf67games7 2 ปีที่แล้ว +1

      Try putting this into an if statement: player.getInventory().getBoots().getType() == Material.LEATHER_BOOTS && player.getInventory().getBoots().getItemMeta().getDisplayName() == "FlyBoots"
      EDIT: You can figure out the player name yourself (it's not that hard ;))
      EDIT 2: I read iron boots as leather boots just replace LEATHER with IRON

  • @balda2125
    @balda2125 2 ปีที่แล้ว +3

    It has no sense to check if the target has the permission. You can't allow a player to fly using /fly if the target doesn't have the permission
    Should remove the permission check in the FlyMethod

  • @juicy9934
    @juicy9934 3 ปีที่แล้ว

    import java.util.ArrayList;, greys out

  • @aura_0003
    @aura_0003 5 ปีที่แล้ว +3

    How do I make it a jar file?

    • @KodySimpson
      @KodySimpson  5 ปีที่แล้ว

      Episode 38 shows this!

  • @xfadedxshadow
    @xfadedxshadow 4 ปีที่แล้ว +5

    I take fall damage tf

    • @signalised9540
      @signalised9540 4 ปีที่แล้ว

      he has god mode on

    • @xfadedxshadow
      @xfadedxshadow 4 ปีที่แล้ว

      Lol wasn't expecting to get a heart thanks! :D also grabbing the players fall distance wasn't that hard so yeet

    • @roguire14
      @roguire14 2 ปีที่แล้ว

      yeah but how do we cancel that ? i tried using the setFallDistance to an incredibly low number but it will also prevent damage for futur fall damage, i tried using the e.setCancelled(true) in a listener for player fall damage but i have no idea how to have access to the array containing the flying player