mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-11 11:40:40 +00:00
Fix some runtime errors
Fixed an error in plugin, made the config load before the Methods
This commit is contained in:
parent
797e19a820
commit
3d4fe77ee9
4 changed files with 18 additions and 17 deletions
Binary file not shown.
|
@ -72,13 +72,6 @@ public class Methods {
|
|||
Methods.plugin = plugin;
|
||||
}
|
||||
|
||||
private static boolean allowharmless = plugin.getConfig().getBoolean("Properties.RegionProtection.AllowHarmlessAbilities");
|
||||
private static boolean respectWorldGuard = plugin.getConfig().getBoolean("Properties.RegionProtection.RespectWorldGuard");
|
||||
private static boolean respectPreciousStones = plugin.getConfig().getBoolean("Properties.RegionProtection.RespectPreciousStones");
|
||||
private static boolean respectFactions = plugin.getConfig().getBoolean("Properties.RegionProtection.RespectFactions");
|
||||
private static boolean respectTowny = plugin.getConfig().getBoolean("Properties.RegionProtection.RespectTowny");
|
||||
private static boolean respectGriefPrevention = plugin.getConfig().getBoolean("Properties.RegionProtection.RespectGriefPrevention");
|
||||
|
||||
private static final ItemStack pickaxe = new ItemStack(
|
||||
Material.DIAMOND_PICKAXE);
|
||||
public static ConcurrentHashMap<Block, Information> movedearth = new ConcurrentHashMap<Block, Information>();
|
||||
|
@ -566,9 +559,9 @@ public class Methods {
|
|||
for (double i = 0; i <= range; i++) {
|
||||
Block block = location.clone().add(vector.clone().multiply(i))
|
||||
.getBlock();
|
||||
if (isRegionProtectedFromBuild(player, "RaiseEarth",
|
||||
location))
|
||||
continue;
|
||||
if (isRegionProtectedFromBuild(player, "RaiseEarth",
|
||||
location))
|
||||
continue;
|
||||
if (isEarthbendable(player, block)) {
|
||||
return block;
|
||||
}
|
||||
|
@ -606,9 +599,9 @@ public class Methods {
|
|||
for (double i = 0; i <= range; i++) {
|
||||
Block block = location.clone().add(vector.clone().multiply(i))
|
||||
.getBlock();
|
||||
if (isRegionProtectedFromBuild(player, "WaterManipulation",
|
||||
location))
|
||||
continue;
|
||||
if (isRegionProtectedFromBuild(player, "WaterManipulation",
|
||||
location))
|
||||
continue;
|
||||
if (isWaterbendable(block, player)
|
||||
&& (!isPlant(block) || plantbending)) {
|
||||
if (TempBlock.isTempBlock(block)) {
|
||||
|
@ -1240,6 +1233,13 @@ public class Methods {
|
|||
public static boolean isRegionProtectedFromBuild(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");
|
||||
|
||||
Set<String> ignite = AbilityModuleManager.igniteabilities;
|
||||
Set<String> explode = AbilityModuleManager.explodeabilities;
|
||||
// List<Abilities> ignite = new ArrayList<Abilities>();
|
||||
|
|
|
@ -20,11 +20,12 @@ public class ProjectKorra extends JavaPlugin {
|
|||
ProjectKorra.log = this.getLogger();
|
||||
plugin = this;
|
||||
|
||||
new AbilityModuleManager(this);
|
||||
new ConfigManager(this);
|
||||
new Methods(this);
|
||||
|
||||
new Commands(this);
|
||||
new AbilityModuleManager(this);
|
||||
new ConfigManager(this);
|
||||
|
||||
|
||||
DBConnection.host = getConfig().getString("Storage.MySQL.host");
|
||||
DBConnection.port = getConfig().getInt("Storage.MySQL.port");
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
name: ProjectKorra
|
||||
author: ProjectKorra
|
||||
version: 1.1.0 BETA 2
|
||||
version: 1.1.0 BETA 3
|
||||
main: com.projectkorra.ProjectKorra.ProjectKorra
|
||||
commands:
|
||||
projectkorra:
|
||||
|
@ -62,7 +62,7 @@ permissions:
|
|||
bending.ability.WaterManipulation: true
|
||||
bending.ability.WaterSpout: true
|
||||
bending.ability.Plantbending: true
|
||||
bending.message.nightmessage
|
||||
bending.message.nightmessage: true
|
||||
bending.earth:
|
||||
default: true
|
||||
description: Grants access to all Earthbending abilities.
|
||||
|
|
Loading…
Reference in a new issue