mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2024-11-23 18:55:30 +01:00
Residence plugin support for fly
This commit is contained in:
parent
2fef576a48
commit
62c819e611
6
pom.xml
6
pom.xml
@ -190,5 +190,11 @@
|
|||||||
<version>LATEST</version>
|
<version>LATEST</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.Zrips</groupId>
|
||||||
|
<artifactId>Residence</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
<version>4.9.0.6</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
package com.songoda.skyblock.island;
|
package com.songoda.skyblock.island;
|
||||||
|
|
||||||
|
import com.bekvon.bukkit.residence.Residence;
|
||||||
|
import com.bekvon.bukkit.residence.api.ResidenceApi;
|
||||||
|
import com.bekvon.bukkit.residence.containers.Flags;
|
||||||
|
import com.bekvon.bukkit.residence.protection.ClaimedResidence;
|
||||||
import com.google.common.base.Preconditions;
|
import com.google.common.base.Preconditions;
|
||||||
import com.songoda.core.compatibility.CompatibleMaterial;
|
import com.songoda.core.compatibility.CompatibleMaterial;
|
||||||
import com.songoda.core.compatibility.CompatibleSound;
|
import com.songoda.core.compatibility.CompatibleSound;
|
||||||
@ -47,6 +51,7 @@ import org.bukkit.configuration.ConfigurationSection;
|
|||||||
import org.bukkit.configuration.file.FileConfiguration;
|
import org.bukkit.configuration.file.FileConfiguration;
|
||||||
import org.bukkit.configuration.file.YamlConfiguration;
|
import org.bukkit.configuration.file.YamlConfiguration;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.plugin.Plugin;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@ -1380,6 +1385,16 @@ public class IslandManager {
|
|||||||
if (player.getGameMode() == GameMode.CREATIVE || player.getGameMode() == GameMode.SPECTATOR || player.hasPermission("essentials.fly") || player.hasPermission("cmi.command.fly"))
|
if (player.getGameMode() == GameMode.CREATIVE || player.getGameMode() == GameMode.SPECTATOR || player.hasPermission("essentials.fly") || player.hasPermission("cmi.command.fly"))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// Residence support
|
||||||
|
if (Bukkit.getServer().getPluginManager().getPlugin("Residence") != null) {
|
||||||
|
ClaimedResidence res = Residence.getInstance().getResidenceManagerAPI().getByLoc(player.getLocation());
|
||||||
|
if(res != null){
|
||||||
|
if(res.getPermissions().has(Flags.fly, false)){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Island island = getIslandAtLocation(player.getLocation());
|
Island island = getIslandAtLocation(player.getLocation());
|
||||||
|
|
||||||
UpgradeManager upgradeManager = skyblock.getUpgradeManager();
|
UpgradeManager upgradeManager = skyblock.getUpgradeManager();
|
||||||
|
@ -5,7 +5,7 @@ api-version: 1.13
|
|||||||
description: A unique SkyBlock plugin
|
description: A unique SkyBlock plugin
|
||||||
author: Songoda
|
author: Songoda
|
||||||
authors: [Fabrimat]
|
authors: [Fabrimat]
|
||||||
softdepend: [HolographicDisplays, Holograms, CMI, PlaceholderAPI, MVdWPlaceholderAPI, Vault, Reserve, LeaderHeads, EpicSpawners, WildStacker, UltimateStacker, WorldEdit]
|
softdepend: [HolographicDisplays, Holograms, CMI, PlaceholderAPI, MVdWPlaceholderAPI, Vault, Reserve, LeaderHeads, EpicSpawners, WildStacker, UltimateStacker, WorldEdit, Residence]
|
||||||
loadbefore: [Multiverse-Core, ProtocolLib]
|
loadbefore: [Multiverse-Core, ProtocolLib]
|
||||||
commands:
|
commands:
|
||||||
island:
|
island:
|
||||||
|
Loading…
Reference in New Issue
Block a user