mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-08-17 08:57:40 +00:00
Add Residence plugin support
- Added two new config options, Residence.Respect and Residence.Flag (in the according spot) - Residence.Respect will respect if true - Residence.Flag specifies the flag that needs to be set to true for bending to be enabled in a residence. - Is put in isRegionProtected methods
This commit is contained in:
parent
b4a7a62362
commit
cdfdcb570d
|
@ -1,60 +1,15 @@
|
|||
package com.projectkorra.projectkorra;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.io.PrintWriter;
|
||||
import java.lang.reflect.Field;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.BlockFace;
|
||||
import org.bukkit.block.BlockState;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.FallingBlock;
|
||||
import org.bukkit.entity.FallingSand;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.TNTPrimed;
|
||||
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.bukkit.plugin.PluginManager;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
import org.bukkit.util.Vector;
|
||||
import fr.neatmonster.nocheatplus.checks.CheckType;
|
||||
import fr.neatmonster.nocheatplus.hooks.NCPExemptionManager;
|
||||
import me.ryanhamshire.GriefPrevention.Claim;
|
||||
import me.ryanhamshire.GriefPrevention.GriefPrevention;
|
||||
import net.sacredlabyrinth.Phaed.PreciousStones.FieldFlag;
|
||||
import net.sacredlabyrinth.Phaed.PreciousStones.PreciousStones;
|
||||
|
||||
import com.bekvon.bukkit.residence.Residence;
|
||||
import com.bekvon.bukkit.residence.protection.ClaimedResidence;
|
||||
import com.bekvon.bukkit.residence.protection.ResidencePermissions;
|
||||
import com.google.common.reflect.ClassPath;
|
||||
import com.griefcraft.lwc.LWC;
|
||||
import com.griefcraft.lwc.LWCPlugin;
|
||||
|
@ -113,12 +68,60 @@ import com.projectkorra.projectkorra.waterbending.WaterSpout;
|
|||
import com.sk89q.worldguard.bukkit.WorldGuardPlugin;
|
||||
import com.sk89q.worldguard.protection.flags.DefaultFlag;
|
||||
|
||||
import fr.neatmonster.nocheatplus.checks.CheckType;
|
||||
import fr.neatmonster.nocheatplus.hooks.NCPExemptionManager;
|
||||
import me.ryanhamshire.GriefPrevention.Claim;
|
||||
import me.ryanhamshire.GriefPrevention.GriefPrevention;
|
||||
import net.sacredlabyrinth.Phaed.PreciousStones.FieldFlag;
|
||||
import net.sacredlabyrinth.Phaed.PreciousStones.PreciousStones;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.BlockFace;
|
||||
import org.bukkit.block.BlockState;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.FallingBlock;
|
||||
import org.bukkit.entity.FallingSand;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.TNTPrimed;
|
||||
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.bukkit.plugin.PluginManager;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.io.PrintWriter;
|
||||
import java.lang.reflect.Field;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public class GeneralMethods {
|
||||
|
@ -758,7 +761,7 @@ public class GeneralMethods {
|
|||
}
|
||||
|
||||
public static long getGlobalCooldown() {
|
||||
return plugin.getConfig().getLong("Properties.GlobalCooldown");
|
||||
return ConfigManager.defaultConfig.get().getLong("Properties.GlobalCooldown");
|
||||
}
|
||||
|
||||
@SuppressWarnings("incomplete-switch")
|
||||
|
@ -1003,7 +1006,7 @@ public class GeneralMethods {
|
|||
}
|
||||
|
||||
public static boolean isImportEnabled() {
|
||||
return plugin.getConfig().getBoolean("Properties.ImportEnabled");
|
||||
return ConfigManager.defaultConfig.get().getBoolean("Properties.ImportEnabled");
|
||||
}
|
||||
|
||||
public static boolean isInteractable(Block block) {
|
||||
|
@ -1069,13 +1072,14 @@ public class GeneralMethods {
|
|||
}
|
||||
|
||||
public static boolean isRegionProtectedFromBuildPostCache(Player player, String ability, Location loc) {
|
||||
boolean allowHarmless = plugin.getConfig().getBoolean("Properties.RegionProtection.AllowHarmlessAbilities");
|
||||
boolean respectWorldGuard = plugin.getConfig().getBoolean("Properties.RegionProtection.RespectWorldGuard");
|
||||
boolean respectPreciousStones = plugin.getConfig().getBoolean("Properties.RegionProtection.RespectPreciousStones");
|
||||
boolean respectFactions = plugin.getConfig().getBoolean("Properties.RegionProtection.RespectFactions");
|
||||
boolean respectTowny = plugin.getConfig().getBoolean("Properties.RegionProtection.RespectTowny");
|
||||
boolean respectGriefPrevention = plugin.getConfig().getBoolean("Properties.RegionProtection.RespectGriefPrevention");
|
||||
boolean respectLWC = plugin.getConfig().getBoolean("Properties.RegionProtection.RespectLWC");
|
||||
boolean allowHarmless = ConfigManager.defaultConfig.get().getBoolean("Properties.RegionProtection.AllowHarmlessAbilities");
|
||||
boolean respectWorldGuard = ConfigManager.defaultConfig.get().getBoolean("Properties.RegionProtection.RespectWorldGuard");
|
||||
boolean respectPreciousStones = ConfigManager.defaultConfig.get().getBoolean("Properties.RegionProtection.RespectPreciousStones");
|
||||
boolean respectFactions = ConfigManager.defaultConfig.get().getBoolean("Properties.RegionProtection.RespectFactions");
|
||||
boolean respectTowny = ConfigManager.defaultConfig.get().getBoolean("Properties.RegionProtection.RespectTowny");
|
||||
boolean respectGriefPrevention = ConfigManager.defaultConfig.get().getBoolean("Properties.RegionProtection.RespectGriefPrevention");
|
||||
boolean respectLWC = ConfigManager.defaultConfig.get().getBoolean("Properties.RegionProtection.RespectLWC");
|
||||
boolean respectResidence = ConfigManager.defaultConfig.get().getBoolean("Properties.RegionProtection.Residence.Respect");
|
||||
|
||||
boolean isIgnite = false;
|
||||
boolean isExplosive = false;
|
||||
|
@ -1103,6 +1107,7 @@ public class GeneralMethods {
|
|||
Plugin gpp = pm.getPlugin("GriefPrevention");
|
||||
Plugin massivecore = pm.getPlugin("MassiveCore");
|
||||
Plugin lwc = pm.getPlugin("LWC");
|
||||
Plugin residence = pm.getPlugin("Residence");
|
||||
|
||||
for (Location location : new Location[] { loc, player.getLocation() }) {
|
||||
World world = location.getWorld();
|
||||
|
@ -1219,6 +1224,14 @@ public class GeneralMethods {
|
|||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (residence != null && respectResidence) {
|
||||
ClaimedResidence res = Residence.getResidenceManager().getByLoc(loc);
|
||||
if (res != null) {
|
||||
ResidencePermissions perms = res.getPermissions();
|
||||
return perms.playerHas(player.getName(), ConfigManager.defaultConfig.get().getString("Properities.RegionProtection.Residence.Flag"), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -1257,11 +1270,11 @@ public class GeneralMethods {
|
|||
new ComboManager();
|
||||
new MultiAbilityManager();
|
||||
|
||||
DBConnection.host = plugin.getConfig().getString("Storage.MySQL.host");
|
||||
DBConnection.port = plugin.getConfig().getInt("Storage.MySQL.port");
|
||||
DBConnection.pass = plugin.getConfig().getString("Storage.MySQL.pass");
|
||||
DBConnection.db = plugin.getConfig().getString("Storage.MySQL.db");
|
||||
DBConnection.user = plugin.getConfig().getString("Storage.MySQL.user");
|
||||
DBConnection.host = ConfigManager.defaultConfig.get().getString("Storage.MySQL.host");
|
||||
DBConnection.port = ConfigManager.defaultConfig.get().getInt("Storage.MySQL.port");
|
||||
DBConnection.pass = ConfigManager.defaultConfig.get().getString("Storage.MySQL.pass");
|
||||
DBConnection.db = ConfigManager.defaultConfig.get().getString("Storage.MySQL.db");
|
||||
DBConnection.user = ConfigManager.defaultConfig.get().getString("Storage.MySQL.user");
|
||||
DBConnection.init();
|
||||
|
||||
if (!DBConnection.isOpen()) {
|
||||
|
@ -1382,12 +1395,12 @@ public class GeneralMethods {
|
|||
writeToDebug("Supported Plugins");
|
||||
writeToDebug("====================");
|
||||
|
||||
boolean respectWorldGuard = plugin.getConfig().getBoolean("Properties.RegionProtection.RespectWorldGuard");
|
||||
boolean respectPreciousStones = plugin.getConfig().getBoolean("Properties.RegionProtection.RespectPreciousStones");
|
||||
boolean respectFactions = plugin.getConfig().getBoolean("Properties.RegionProtection.RespectFactions");
|
||||
boolean respectTowny = plugin.getConfig().getBoolean("Properties.RegionProtection.RespectTowny");
|
||||
boolean respectGriefPrevention = plugin.getConfig().getBoolean("Properties.RegionProtection.RespectGriefPrevention");
|
||||
boolean respectLWC = plugin.getConfig().getBoolean("Properties.RegionProtection.RespectLWC");
|
||||
boolean respectWorldGuard = ConfigManager.defaultConfig.get().getBoolean("Properties.RegionProtection.RespectWorldGuard");
|
||||
boolean respectPreciousStones = ConfigManager.defaultConfig.get().getBoolean("Properties.RegionProtection.RespectPreciousStones");
|
||||
boolean respectFactions = ConfigManager.defaultConfig.get().getBoolean("Properties.RegionProtection.RespectFactions");
|
||||
boolean respectTowny = ConfigManager.defaultConfig.get().getBoolean("Properties.RegionProtection.RespectTowny");
|
||||
boolean respectGriefPrevention = ConfigManager.defaultConfig.get().getBoolean("Properties.RegionProtection.RespectGriefPrevention");
|
||||
boolean respectLWC = ConfigManager.defaultConfig.get().getBoolean("Properties.RegionProtection.RespectLWC");
|
||||
PluginManager pm = Bukkit.getPluginManager();
|
||||
|
||||
Plugin wgp = pm.getPlugin("WorldGuard");
|
||||
|
@ -1525,14 +1538,14 @@ public class GeneralMethods {
|
|||
|
||||
public static void setVelocity(Entity entity, Vector velocity) {
|
||||
if (entity instanceof TNTPrimed) {
|
||||
if (plugin.getConfig().getBoolean("Properties.BendingAffectFallingSand.TNT")) {
|
||||
entity.setVelocity(velocity.multiply(plugin.getConfig().getDouble("Properties.BendingAffectFallingSand.TNTStrengthMultiplier")));
|
||||
if (ConfigManager.defaultConfig.get().getBoolean("Properties.BendingAffectFallingSand.TNT")) {
|
||||
entity.setVelocity(velocity.multiply(ConfigManager.defaultConfig.get().getDouble("Properties.BendingAffectFallingSand.TNTStrengthMultiplier")));
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (entity instanceof FallingSand) {
|
||||
if (plugin.getConfig().getBoolean("Properties.BendingAffectFallingSand.Normal")) {
|
||||
entity.setVelocity(velocity.multiply(plugin.getConfig().getDouble("Properties.BendingAffectFallingSand.NormalStrengthMultiplier")));
|
||||
if (ConfigManager.defaultConfig.get().getBoolean("Properties.BendingAffectFallingSand.Normal")) {
|
||||
entity.setVelocity(velocity.multiply(ConfigManager.defaultConfig.get().getDouble("Properties.BendingAffectFallingSand.NormalStrengthMultiplier")));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -1,67 +1,5 @@
|
|||
package com.projectkorra.projectkorra;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.block.Action;
|
||||
import org.bukkit.event.block.BlockBreakEvent;
|
||||
import org.bukkit.event.block.BlockFadeEvent;
|
||||
import org.bukkit.event.block.BlockFormEvent;
|
||||
import org.bukkit.event.block.BlockFromToEvent;
|
||||
import org.bukkit.event.block.BlockIgniteEvent;
|
||||
import org.bukkit.event.block.BlockPhysicsEvent;
|
||||
import org.bukkit.event.block.BlockPlaceEvent;
|
||||
import org.bukkit.event.entity.EntityChangeBlockEvent;
|
||||
import org.bukkit.event.entity.EntityCombustEvent;
|
||||
import org.bukkit.event.entity.EntityDamageByBlockEvent;
|
||||
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
||||
import org.bukkit.event.entity.EntityDamageEvent;
|
||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
import org.bukkit.event.entity.EntityDeathEvent;
|
||||
import org.bukkit.event.entity.EntityExplodeEvent;
|
||||
import org.bukkit.event.entity.EntityInteractEvent;
|
||||
import org.bukkit.event.entity.EntityShootBowEvent;
|
||||
import org.bukkit.event.entity.EntityTargetEvent;
|
||||
import org.bukkit.event.entity.EntityTargetLivingEntityEvent;
|
||||
import org.bukkit.event.entity.EntityTeleportEvent;
|
||||
import org.bukkit.event.entity.PlayerDeathEvent;
|
||||
import org.bukkit.event.entity.ProjectileHitEvent;
|
||||
import org.bukkit.event.entity.ProjectileLaunchEvent;
|
||||
import org.bukkit.event.entity.SlimeSplitEvent;
|
||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
||||
import org.bukkit.event.inventory.InventoryType.SlotType;
|
||||
import org.bukkit.event.player.AsyncPlayerChatEvent;
|
||||
import org.bukkit.event.player.PlayerAnimationEvent;
|
||||
import org.bukkit.event.player.PlayerGameModeChangeEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEntityEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.event.player.PlayerJoinEvent;
|
||||
import org.bukkit.event.player.PlayerKickEvent;
|
||||
import org.bukkit.event.player.PlayerMoveEvent;
|
||||
import org.bukkit.event.player.PlayerQuitEvent;
|
||||
import org.bukkit.event.player.PlayerToggleFlightEvent;
|
||||
import org.bukkit.event.player.PlayerToggleSneakEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import com.projectkorra.projectkorra.ability.Ability;
|
||||
import com.projectkorra.projectkorra.ability.AddonAbility;
|
||||
import com.projectkorra.projectkorra.ability.AirAbility;
|
||||
|
@ -158,6 +96,68 @@ import com.projectkorra.projectkorra.waterbending.WaterPassive;
|
|||
import com.projectkorra.projectkorra.waterbending.WaterSpout;
|
||||
import com.projectkorra.projectkorra.waterbending.WaterSpoutWave;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.block.Action;
|
||||
import org.bukkit.event.block.BlockBreakEvent;
|
||||
import org.bukkit.event.block.BlockFadeEvent;
|
||||
import org.bukkit.event.block.BlockFormEvent;
|
||||
import org.bukkit.event.block.BlockFromToEvent;
|
||||
import org.bukkit.event.block.BlockIgniteEvent;
|
||||
import org.bukkit.event.block.BlockPhysicsEvent;
|
||||
import org.bukkit.event.block.BlockPlaceEvent;
|
||||
import org.bukkit.event.entity.EntityChangeBlockEvent;
|
||||
import org.bukkit.event.entity.EntityCombustEvent;
|
||||
import org.bukkit.event.entity.EntityDamageByBlockEvent;
|
||||
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
||||
import org.bukkit.event.entity.EntityDamageEvent;
|
||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
import org.bukkit.event.entity.EntityDeathEvent;
|
||||
import org.bukkit.event.entity.EntityExplodeEvent;
|
||||
import org.bukkit.event.entity.EntityInteractEvent;
|
||||
import org.bukkit.event.entity.EntityShootBowEvent;
|
||||
import org.bukkit.event.entity.EntityTargetEvent;
|
||||
import org.bukkit.event.entity.EntityTargetLivingEntityEvent;
|
||||
import org.bukkit.event.entity.EntityTeleportEvent;
|
||||
import org.bukkit.event.entity.PlayerDeathEvent;
|
||||
import org.bukkit.event.entity.ProjectileHitEvent;
|
||||
import org.bukkit.event.entity.ProjectileLaunchEvent;
|
||||
import org.bukkit.event.entity.SlimeSplitEvent;
|
||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
||||
import org.bukkit.event.inventory.InventoryType.SlotType;
|
||||
import org.bukkit.event.player.AsyncPlayerChatEvent;
|
||||
import org.bukkit.event.player.PlayerAnimationEvent;
|
||||
import org.bukkit.event.player.PlayerGameModeChangeEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEntityEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.event.player.PlayerJoinEvent;
|
||||
import org.bukkit.event.player.PlayerKickEvent;
|
||||
import org.bukkit.event.player.PlayerMoveEvent;
|
||||
import org.bukkit.event.player.PlayerQuitEvent;
|
||||
import org.bukkit.event.player.PlayerToggleFlightEvent;
|
||||
import org.bukkit.event.player.PlayerToggleSneakEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
public class PKListener implements Listener {
|
||||
|
||||
ProjectKorra plugin;
|
||||
|
|
|
@ -8,6 +8,7 @@ import org.bukkit.Bukkit;
|
|||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import com.bekvon.bukkit.residence.protection.FlagPermissions;
|
||||
import com.projectkorra.projectkorra.ability.CoreAbility;
|
||||
import com.projectkorra.projectkorra.ability.util.ComboManager;
|
||||
import com.projectkorra.projectkorra.ability.util.MultiAbilityManager;
|
||||
|
@ -56,7 +57,7 @@ public class ProjectKorra extends JavaPlugin {
|
|||
new Commands(this);
|
||||
new MultiAbilityManager();
|
||||
new ComboManager();
|
||||
|
||||
|
||||
Preset.loadExternalPresets();
|
||||
|
||||
DBConnection.host = getConfig().getString("Storage.MySQL.host");
|
||||
|
@ -92,6 +93,8 @@ public class ProjectKorra extends JavaPlugin {
|
|||
}
|
||||
|
||||
double cacheTime = ConfigManager.getConfig().getDouble("Properties.RegionProtection.CacheBlockTime");
|
||||
if (Bukkit.getPluginManager().getPlugin("Residence") != null)
|
||||
FlagPermissions.addFlag(ConfigManager.defaultConfig.get().getString("Properties.RegionProtection.Residence.Flag"));
|
||||
GeneralMethods.deserializeFile();
|
||||
GeneralMethods.startCacheCleaner(cacheTime);
|
||||
updater.checkUpdate();
|
||||
|
|
|
@ -171,6 +171,8 @@ public class ConfigManager {
|
|||
config.addDefault("Properties.RegionProtection.RespectTowny", true);
|
||||
config.addDefault("Properties.RegionProtection.RespectPreciousStones", true);
|
||||
config.addDefault("Properties.RegionProtection.RespectLWC", true);
|
||||
config.addDefault("Properties.RegionProtection.Residence.Flag", "bending");
|
||||
config.addDefault("Properties.RegionProtection.Residence.Respect", true);
|
||||
config.addDefault("Properties.RegionProtection.CacheBlockTime", 5000);
|
||||
|
||||
config.addDefault("Properties.Air.CanBendWithWeapons", false);
|
||||
|
|
Loading…
Reference in a new issue