55
66import org .bukkit .Bukkit ;
77import org .bukkit .Location ;
8+ import org .bukkit .Material ;
89import org .bukkit .block .Block ;
910import org .bukkit .entity .Player ;
1011import org .bukkit .plugin .Plugin ;
2930import com .wasteofplastic .askyblock .ASkyBlockAPI ;
3031import com .wasteofplastic .askyblock .Island ;
3132
33+ import me .ryanhamshire .GriefPrevention .Claim ;
34+ import me .ryanhamshire .GriefPrevention .GriefPrevention ;
3235import net .milkbowl .vault .permission .Permission ;
3336import net .sacredlabyrinth .phaed .simpleclans .Clan ;
3437import net .sacredlabyrinth .phaed .simpleclans .ClanPlayer ;
@@ -48,6 +51,7 @@ public class Dependency {
4851 protected static PlotAPI plotapi ;
4952 protected static Plugin simpleclans = null ;
5053 protected static ClanManager clanmanager = null ;
54+ protected static Plugin griefprevention = null ;
5155
5256 public Dependency (Plugin plugin ){
5357 // WorldGuard
@@ -81,6 +85,8 @@ public Dependency(Plugin plugin){
8185 if (simpleclans != null ){
8286 clanmanager = ((SimpleClans )simpleclans ).getClanManager ();
8387 }
88+ // GreifPrevention
89+ griefprevention = plugin .getServer ().getPluginManager ().getPlugin ("GriefPrevention" );
8490 }
8591
8692 @ SuppressWarnings ("deprecation" )
@@ -160,6 +166,12 @@ public static boolean isProtectedFrom(Block block, Player player){
160166 if (simpleclans != null ){
161167 // TODO or not todo
162168 }
169+ if (griefprevention != null ){
170+ Claim claim = GriefPrevention .instance .dataStore .getClaimAt (block .getLocation (), false , null );
171+ if (claim != null ){
172+ if (claim .allowBuild (player , Material .WALL_SIGN ) != null ) return true ;
173+ }
174+ }
163175 return false ;
164176 }
165177
0 commit comments