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 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.
@@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
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?
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
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
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
Underrated channel, So fucking good.
Very good and helpful, Thank you so much!
Excellent tutor! Thank you!
That intro tho. Sheesh!
bussing bussing
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)
}
Yes! Looking back, I forgot why I used the ArrayList...... good eye though! ;)
@@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.
@@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
Argonyte | It is instead “if(player.getAllowFlight()){“
if(!player.getAllowFlight(){player.setAllowFlight()}
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?
is normal, thats something mojang change with permission, u can just set a custom message when the player dont have the permission
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
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
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
import java.util.ArrayList;, greys out
How do I make it a jar file?
Episode 38 shows this!
I take fall damage tf
he has god mode on
Lol wasn't expecting to get a heart thanks! :D also grabbing the players fall distance wasn't that hard so yeet
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