mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-11 19:50:37 +00:00
Disable Bending per world w/ Config
This commit is contained in:
parent
1e2eee1035
commit
3ba8a6d273
3 changed files with 9 additions and 0 deletions
|
@ -85,6 +85,11 @@ public class ConfigManager {
|
||||||
|
|
||||||
config.addDefault("Properties.Chi.CanBendWithWeapons", true);
|
config.addDefault("Properties.Chi.CanBendWithWeapons", true);
|
||||||
|
|
||||||
|
ArrayList<String> disabledWorlds = new ArrayList<String>();
|
||||||
|
disabledWorlds.add("TestWorld");
|
||||||
|
disabledWorlds.add("TestWorld2");
|
||||||
|
config.addDefault("Properties.DisabledWorlds", disabledWorlds);
|
||||||
|
|
||||||
config.addDefault("Abilities.AvatarState.Enabled", true);
|
config.addDefault("Abilities.AvatarState.Enabled", true);
|
||||||
config.addDefault("Abilities.AvatarState.Description", "The signature ability of the Avatar, this is a toggle. Click to activate to become "
|
config.addDefault("Abilities.AvatarState.Description", "The signature ability of the Avatar, this is a toggle. Click to activate to become "
|
||||||
+ "nearly unstoppable. While in the Avatar State, the user takes severely reduced damage from "
|
+ "nearly unstoppable. While in the Avatar State, the user takes severely reduced damage from "
|
||||||
|
|
|
@ -261,6 +261,7 @@ public class Methods {
|
||||||
BendingPlayer bPlayer = getBendingPlayer(player);
|
BendingPlayer bPlayer = getBendingPlayer(player);
|
||||||
Player p = Bukkit.getPlayer(player);
|
Player p = Bukkit.getPlayer(player);
|
||||||
if (bPlayer == null) return false;
|
if (bPlayer == null) return false;
|
||||||
|
if (plugin.getConfig().getStringList("Properties.DisabledWorlds") != null && plugin.getConfig().getStringList("Properties.DisabledWorlds").contains(p.getWorld().getName())) return false;
|
||||||
if (Commands.isToggledForAll) return false;
|
if (Commands.isToggledForAll) return false;
|
||||||
if (!bPlayer.isToggled) return false;
|
if (!bPlayer.isToggled) return false;
|
||||||
if (p == null) return false;
|
if (p == null) return false;
|
||||||
|
|
|
@ -65,6 +65,9 @@ Properties:
|
||||||
DayFactor: 1.5
|
DayFactor: 1.5
|
||||||
Chi:
|
Chi:
|
||||||
CanBendWithWeapons: false
|
CanBendWithWeapons: false
|
||||||
|
DisabledWorlds:
|
||||||
|
- TestWorld
|
||||||
|
- TestWorld2
|
||||||
Abilities:
|
Abilities:
|
||||||
AvatarState:
|
AvatarState:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
Loading…
Reference in a new issue