Пример #1
0
 /**
  * This function checks for LWC, thus letting player create shop over existing chest
  *
  * @param block Block representing chest
  * @param player Player creating sign
  * @return false if LWC is enabled AND block protected AND player is not owner of chest
  */
 public boolean lwcCheck(final Block block, final Player player) {
   if (lwc == null) return true;
   if (lwc.getLWC().findProtection(block) == null) {
     return true; // not protected
   }
   if (!lwc.getLWC().canAdminProtection(player, block)) {
     return false; // protected by someone else
   }
   return true;
 }
Пример #2
0
 public static void loadPlugin() {
   if (lwcPlugin == null) {
     com.griefcraft.lwc.LWCPlugin lwc =
         (com.griefcraft.lwc.LWCPlugin)
             Bukkit.getServer().getPluginManager().getPlugin(WrapperManager.PLUGIN_NAME_LWC);
     if (lwc == null) {
       log.info(WrapperManager.PLUGIN_NAME_LWC + " not found");
       lwcPlugin = null;
       return;
     }
     lwcPlugin = lwc.getLWC();
   }
 }
 public static void initialize(Template instance) {
   plugin = instance;
   LWCPlugin lwcPlugin = (LWCPlugin) plugin.getServer().getPluginManager().getPlugin("LWC");
   if (lwcPlugin != null) {
     lwc = lwcPlugin.getLWC();
   }
   lockette = (Lockette) plugin.getServer().getPluginManager().getPlugin("Lockette");
   if (lwc != null && !TSettings.LowDetailMode) {
     TLogger.info("LWC version " + lwcPlugin.getDescription().getVersion() + " loaded.");
   }
   if (lockette != null && !TSettings.LowDetailMode) {
     TLogger.info("Lockette version " + lockette.getDescription().getVersion() + " loaded.");
   }
 }