This is peeing me off

Status
This thread has been locked.
PebbleHost
High performance, consistent uptime and fast support. Minecraft hosting that just works.

Tripps

SysAdmin | Developer
Premium
Feedback score
19
Posts
784
Reactions
313
Resources
0
You could just do

@EventHandler
public void onJoin(PlayerJoinEvent e) {
Player player = e.getPlayer();
if(player.hasPermission("fly.join.allow")) {
Bukkit.dispatchCommand(player, "fly");
}
}

But with this code if your using essentials the player will be essentials.fly or what ever core your using they will need fly permissions or

@EventHandler
public void onJoin(PlayerJoinEvent e) {
Player player = e.getPlayer();
if(player.hasPermission("fly.join.allow")) {
player.setFlying(true);
player.sendMessage(ChatColor.GREEN + "You have logged in with /fly enabled");
}
}


Thanks for reading -
notG6
Don't even check for the permission, just check if their flight is set to allow.
 
Status
This thread has been locked.
Top