mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-08-04 19:46:38 +00:00
Merge pull request #234 from StrangeOne101/master
Fix Earth Passive and Commands
This commit is contained in:
commit
93543139c6
6 changed files with 45 additions and 47 deletions
|
@ -953,7 +953,8 @@ public class GeneralMethods {
|
||||||
* @return The ChatColor to be used
|
* @return The ChatColor to be used
|
||||||
*/
|
*/
|
||||||
public static ChatColor getComboColor(String combo) {
|
public static ChatColor getComboColor(String combo) {
|
||||||
for (ComboAbility comboability : ComboManager.comboAbilityList) {
|
for (String ability : ComboManager.comboAbilityList.keySet()) {
|
||||||
|
ComboAbility comboability = ComboManager.comboAbilityList.get(ability);
|
||||||
if (!comboability.getName().equalsIgnoreCase(combo)) {
|
if (!comboability.getName().equalsIgnoreCase(combo)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -1889,11 +1890,12 @@ public class GeneralMethods {
|
||||||
ab.stop();
|
ab.stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
HashSet<ComboManager.ComboAbility> combos = ComboManager.comboAbilityList;
|
HashMap<String, ComboManager.ComboAbility> combos = ComboManager.comboAbilityList;
|
||||||
for (ComboManager.ComboAbility c : combos)
|
for (String combo : combos.keySet()) {
|
||||||
|
ComboManager.ComboAbility c = combos.get(combo);
|
||||||
if (c.getComboType() instanceof ComboAbilityModule)
|
if (c.getComboType() instanceof ComboAbilityModule)
|
||||||
((ComboAbilityModule) c.getComboType()).stop();
|
((ComboAbilityModule) c.getComboType()).stop();
|
||||||
|
}
|
||||||
AirMethods.stopBending();
|
AirMethods.stopBending();
|
||||||
EarthMethods.stopBending();
|
EarthMethods.stopBending();
|
||||||
WaterMethods.stopBending();
|
WaterMethods.stopBending();
|
||||||
|
|
|
@ -22,7 +22,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||||
public class ComboManager {
|
public class ComboManager {
|
||||||
private static final long CLEANUP_DELAY = 20 * 60 * 60;
|
private static final long CLEANUP_DELAY = 20 * 60 * 60;
|
||||||
public static ConcurrentHashMap<String, ArrayList<AbilityInformation>> recentlyUsedAbilities = new ConcurrentHashMap<String, ArrayList<AbilityInformation>>();
|
public static ConcurrentHashMap<String, ArrayList<AbilityInformation>> recentlyUsedAbilities = new ConcurrentHashMap<String, ArrayList<AbilityInformation>>();
|
||||||
public static HashSet<ComboAbility> comboAbilityList = new HashSet<ComboAbility>();
|
public static HashMap<String, ComboAbility> comboAbilityList = new HashMap<String, ComboAbility>();
|
||||||
public static HashMap<String, String> authors = new HashMap<String, String>();
|
public static HashMap<String, String> authors = new HashMap<String, String>();
|
||||||
public static HashMap<String, String> descriptions = new HashMap<String, String>();
|
public static HashMap<String, String> descriptions = new HashMap<String, String>();
|
||||||
public static HashMap<String, String> instructions = new HashMap<String, String>();
|
public static HashMap<String, String> instructions = new HashMap<String, String>();
|
||||||
|
@ -33,7 +33,7 @@ public class ComboManager {
|
||||||
fireKick.add(new AbilityInformation("FireBlast", ClickType.LEFT_CLICK));
|
fireKick.add(new AbilityInformation("FireBlast", ClickType.LEFT_CLICK));
|
||||||
fireKick.add(new AbilityInformation("FireBlast", ClickType.SHIFT_DOWN));
|
fireKick.add(new AbilityInformation("FireBlast", ClickType.SHIFT_DOWN));
|
||||||
fireKick.add(new AbilityInformation("FireBlast", ClickType.LEFT_CLICK));
|
fireKick.add(new AbilityInformation("FireBlast", ClickType.LEFT_CLICK));
|
||||||
comboAbilityList.add(new ComboAbility("FireKick", fireKick, FireCombo.class));
|
comboAbilityList.put("FireKick", new ComboAbility("FireKick", fireKick, FireCombo.class));
|
||||||
descriptions.put("FireKick", "A short ranged arc of fire launches from the player's feet dealing moderate damage to enemies.");
|
descriptions.put("FireKick", "A short ranged arc of fire launches from the player's feet dealing moderate damage to enemies.");
|
||||||
instructions.put("FireKick", "FireBlast > FireBlast > (Hold Shift) > FireBlast.");
|
instructions.put("FireKick", "FireBlast > FireBlast > (Hold Shift) > FireBlast.");
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ public class ComboManager {
|
||||||
fireSpin.add(new AbilityInformation("FireShield", ClickType.LEFT_CLICK));
|
fireSpin.add(new AbilityInformation("FireShield", ClickType.LEFT_CLICK));
|
||||||
fireSpin.add(new AbilityInformation("FireShield", ClickType.SHIFT_DOWN));
|
fireSpin.add(new AbilityInformation("FireShield", ClickType.SHIFT_DOWN));
|
||||||
fireSpin.add(new AbilityInformation("FireShield", ClickType.SHIFT_UP));
|
fireSpin.add(new AbilityInformation("FireShield", ClickType.SHIFT_UP));
|
||||||
comboAbilityList.add(new ComboAbility("FireSpin", fireSpin, FireCombo.class));
|
comboAbilityList.put("FireSpin", new ComboAbility("FireSpin", fireSpin, FireCombo.class));
|
||||||
descriptions.put("FireSpin", "A circular array of fire that causes damage and massive knockback to nearby enemies.");
|
descriptions.put("FireSpin", "A circular array of fire that causes damage and massive knockback to nearby enemies.");
|
||||||
instructions.put("FireSpin", "FireBlast > FireBlast > FireShield > (Tap Shift).");
|
instructions.put("FireSpin", "FireBlast > FireBlast > FireShield > (Tap Shift).");
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ public class ComboManager {
|
||||||
jetBlast.add(new AbilityInformation("FireShield", ClickType.SHIFT_DOWN));
|
jetBlast.add(new AbilityInformation("FireShield", ClickType.SHIFT_DOWN));
|
||||||
jetBlast.add(new AbilityInformation("FireShield", ClickType.SHIFT_UP));
|
jetBlast.add(new AbilityInformation("FireShield", ClickType.SHIFT_UP));
|
||||||
jetBlast.add(new AbilityInformation("FireJet", ClickType.LEFT_CLICK));
|
jetBlast.add(new AbilityInformation("FireJet", ClickType.LEFT_CLICK));
|
||||||
comboAbilityList.add(new ComboAbility("JetBlast", jetBlast, FireCombo.class));
|
comboAbilityList.put("JetBlast", new ComboAbility("JetBlast", jetBlast, FireCombo.class));
|
||||||
descriptions.put("JetBlast", "Create an explosive blast that propels your FireJet at higher speeds.");
|
descriptions.put("JetBlast", "Create an explosive blast that propels your FireJet at higher speeds.");
|
||||||
instructions.put("JetBlast", "FireJet (Tap Shift) > FireJet (Tap Shift) > FireShield (Tap Shift) > FireJet.");
|
instructions.put("JetBlast", "FireJet (Tap Shift) > FireJet (Tap Shift) > FireShield (Tap Shift) > FireJet.");
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ public class ComboManager {
|
||||||
jetBlaze.add(new AbilityInformation("Blaze", ClickType.SHIFT_DOWN));
|
jetBlaze.add(new AbilityInformation("Blaze", ClickType.SHIFT_DOWN));
|
||||||
jetBlaze.add(new AbilityInformation("Blaze", ClickType.SHIFT_UP));
|
jetBlaze.add(new AbilityInformation("Blaze", ClickType.SHIFT_UP));
|
||||||
jetBlaze.add(new AbilityInformation("FireJet", ClickType.LEFT_CLICK));
|
jetBlaze.add(new AbilityInformation("FireJet", ClickType.LEFT_CLICK));
|
||||||
comboAbilityList.add(new ComboAbility("JetBlaze", jetBlaze, FireCombo.class));
|
comboAbilityList.put("JetBlaze", new ComboAbility("JetBlaze", jetBlaze, FireCombo.class));
|
||||||
descriptions.put("JetBlaze", "Damages and burns all enemies in the proximity of your FireJet.");
|
descriptions.put("JetBlaze", "Damages and burns all enemies in the proximity of your FireJet.");
|
||||||
instructions.put("JetBlaze", "FireJet (Tap Shift) > FireJet (Tap Shift) > Blaze (Tap Shift) > FireJet.");
|
instructions.put("JetBlaze", "FireJet (Tap Shift) > FireJet (Tap Shift) > Blaze (Tap Shift) > FireJet.");
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ public class ComboManager {
|
||||||
fireWheel.add(new AbilityInformation("FireShield", ClickType.RIGHT_CLICK));
|
fireWheel.add(new AbilityInformation("FireShield", ClickType.RIGHT_CLICK));
|
||||||
fireWheel.add(new AbilityInformation("FireShield", ClickType.RIGHT_CLICK));
|
fireWheel.add(new AbilityInformation("FireShield", ClickType.RIGHT_CLICK));
|
||||||
fireWheel.add(new AbilityInformation("Blaze", ClickType.SHIFT_UP));
|
fireWheel.add(new AbilityInformation("Blaze", ClickType.SHIFT_UP));
|
||||||
comboAbilityList.add(new ComboAbility("FireWheel", fireWheel, FireCombo.class));
|
comboAbilityList.put("FireWheel", new ComboAbility("FireWheel", fireWheel, FireCombo.class));
|
||||||
descriptions.put("FireWheel", "A high-speed wheel of fire that travels along the ground for long distances dealing high damage.");
|
descriptions.put("FireWheel", "A high-speed wheel of fire that travels along the ground for long distances dealing high damage.");
|
||||||
instructions.put("FireWheel", "FireShield (Hold Shift) > Right Click a block in front of you twice > Switch to Blaze > Release Shift.");
|
instructions.put("FireWheel", "FireShield (Hold Shift) > Right Click a block in front of you twice > Switch to Blaze > Release Shift.");
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ public class ComboManager {
|
||||||
twister.add(new AbilityInformation("AirShield", ClickType.SHIFT_UP));
|
twister.add(new AbilityInformation("AirShield", ClickType.SHIFT_UP));
|
||||||
twister.add(new AbilityInformation("Tornado", ClickType.SHIFT_DOWN));
|
twister.add(new AbilityInformation("Tornado", ClickType.SHIFT_DOWN));
|
||||||
twister.add(new AbilityInformation("AirBlast", ClickType.LEFT_CLICK));
|
twister.add(new AbilityInformation("AirBlast", ClickType.LEFT_CLICK));
|
||||||
comboAbilityList.add(new ComboAbility("Twister", twister, AirCombo.class));
|
comboAbilityList.put("Twister", new ComboAbility("Twister", twister, AirCombo.class));
|
||||||
descriptions.put("Twister", "Create a cyclone of air that travels along the ground grabbing nearby entities.");
|
descriptions.put("Twister", "Create a cyclone of air that travels along the ground grabbing nearby entities.");
|
||||||
instructions.put("Twister", "AirShield (Tap Shift) > Tornado (Hold Shift) > AirBlast (Left Click)");
|
instructions.put("Twister", "AirShield (Tap Shift) > Tornado (Hold Shift) > AirBlast (Left Click)");
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ public class ComboManager {
|
||||||
airStream.add(new AbilityInformation("AirShield", ClickType.SHIFT_DOWN));
|
airStream.add(new AbilityInformation("AirShield", ClickType.SHIFT_DOWN));
|
||||||
airStream.add(new AbilityInformation("AirSuction", ClickType.LEFT_CLICK));
|
airStream.add(new AbilityInformation("AirSuction", ClickType.LEFT_CLICK));
|
||||||
airStream.add(new AbilityInformation("AirBlast", ClickType.LEFT_CLICK));
|
airStream.add(new AbilityInformation("AirBlast", ClickType.LEFT_CLICK));
|
||||||
comboAbilityList.add(new ComboAbility("AirStream", airStream, AirCombo.class));
|
comboAbilityList.put("AirStream", new ComboAbility("AirStream", airStream, AirCombo.class));
|
||||||
descriptions.put("AirStream", "Control a large stream of air that grabs onto enemies allowing you to direct them temporarily.");
|
descriptions.put("AirStream", "Control a large stream of air that grabs onto enemies allowing you to direct them temporarily.");
|
||||||
instructions.put("AirStream", "AirShield (Hold Shift) > AirSuction (Left Click) > AirBlast (Left Click)");
|
instructions.put("AirStream", "AirShield (Hold Shift) > AirSuction (Left Click) > AirBlast (Left Click)");
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ public class ComboManager {
|
||||||
* AbilityInformation("AirScooter",ClickType.SHIFTDOWN));
|
* AbilityInformation("AirScooter",ClickType.SHIFTDOWN));
|
||||||
* airSlice.add(new
|
* airSlice.add(new
|
||||||
* AbilityInformation("AirScooter",ClickType.LEFTCLICK));
|
* AbilityInformation("AirScooter",ClickType.LEFTCLICK));
|
||||||
* comboAbilityList.add(new
|
* comboAbilityList.put(new
|
||||||
* ComboAbility("AirSlice",airSlice,AirCombo.class));
|
* ComboAbility("AirSlice",airSlice,AirCombo.class));
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -113,14 +113,14 @@ public class ComboManager {
|
||||||
airSweep.add(new AbilityInformation("AirSwipe", ClickType.LEFT_CLICK));
|
airSweep.add(new AbilityInformation("AirSwipe", ClickType.LEFT_CLICK));
|
||||||
airSweep.add(new AbilityInformation("AirBurst", ClickType.SHIFT_DOWN));
|
airSweep.add(new AbilityInformation("AirBurst", ClickType.SHIFT_DOWN));
|
||||||
airSweep.add(new AbilityInformation("AirBurst", ClickType.LEFT_CLICK));
|
airSweep.add(new AbilityInformation("AirBurst", ClickType.LEFT_CLICK));
|
||||||
comboAbilityList.add(new ComboAbility("AirSweep", airSweep, AirCombo.class));
|
comboAbilityList.put("AirSweep", new ComboAbility("AirSweep", airSweep, AirCombo.class));
|
||||||
descriptions.put("AirSweep", "Sweep the air in front of you hitting multiple enemies, causing moderate damage and a large knockback. The radius and direction of AirSweep is controlled by moving your mouse in a sweeping motion. For example, if you want to AirSweep upward, then move your mouse upward right after you left click AirBurst");
|
descriptions.put("AirSweep", "Sweep the air in front of you hitting multiple enemies, causing moderate damage and a large knockback. The radius and direction of AirSweep is controlled by moving your mouse in a sweeping motion. For example, if you want to AirSweep upward, then move your mouse upward right after you left click AirBurst");
|
||||||
instructions.put("AirSweep", "AirSwipe (Left Click) > AirSwipe (Left Click) > AirBurst (Hold Shift) > AirBurst (Left Click)");
|
instructions.put("AirSweep", "AirSwipe (Left Click) > AirSwipe (Left Click) > AirBurst (Hold Shift) > AirBurst (Left Click)");
|
||||||
|
|
||||||
ArrayList<AbilityInformation> iceWave = new ArrayList<AbilityInformation>();
|
ArrayList<AbilityInformation> iceWave = new ArrayList<AbilityInformation>();
|
||||||
iceWave.add(new AbilityInformation("WaterSpout", ClickType.SHIFT_UP));
|
iceWave.add(new AbilityInformation("WaterSpout", ClickType.SHIFT_UP));
|
||||||
iceWave.add(new AbilityInformation("PhaseChange", ClickType.LEFT_CLICK));
|
iceWave.add(new AbilityInformation("PhaseChange", ClickType.LEFT_CLICK));
|
||||||
comboAbilityList.add(new ComboAbility("IceWave", iceWave, WaterCombo.class));
|
comboAbilityList.put("IceWave", new ComboAbility("IceWave", iceWave, WaterCombo.class));
|
||||||
descriptions.put("IceWave", "PhaseChange your WaterWave into an IceWave that freezes and damages enemies.");
|
descriptions.put("IceWave", "PhaseChange your WaterWave into an IceWave that freezes and damages enemies.");
|
||||||
instructions.put("IceWave", "Create a WaterSpout Wave > PhaseChange (Left Click)");
|
instructions.put("IceWave", "Create a WaterSpout Wave > PhaseChange (Left Click)");
|
||||||
|
|
||||||
|
@ -131,7 +131,7 @@ public class ComboManager {
|
||||||
* icePillar.add(new AbilityInformation("IceSpike",
|
* icePillar.add(new AbilityInformation("IceSpike",
|
||||||
* ClickType.LEFT_CLICK)); icePillar.add(new
|
* ClickType.LEFT_CLICK)); icePillar.add(new
|
||||||
* AbilityInformation("WaterSpout", ClickType.LEFT_CLICK));
|
* AbilityInformation("WaterSpout", ClickType.LEFT_CLICK));
|
||||||
* comboAbilityList.add(new ComboAbility("IcePillar", icePillar,
|
* comboAbilityList.put(new ComboAbility("IcePillar", icePillar,
|
||||||
* WaterCombo.class));
|
* WaterCombo.class));
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -140,23 +140,23 @@ public class ComboManager {
|
||||||
iceBullet.add(new AbilityInformation("WaterBubble", ClickType.SHIFT_UP));
|
iceBullet.add(new AbilityInformation("WaterBubble", ClickType.SHIFT_UP));
|
||||||
iceBullet.add(new AbilityInformation("IceBlast", ClickType.SHIFT_DOWN));
|
iceBullet.add(new AbilityInformation("IceBlast", ClickType.SHIFT_DOWN));
|
||||||
iceBullet.add(new AbilityInformation("IceBlast", ClickType.LEFT_CLICK));
|
iceBullet.add(new AbilityInformation("IceBlast", ClickType.LEFT_CLICK));
|
||||||
comboAbilityList.add(new ComboAbility("IceBullet", iceBullet, WaterCombo.class));
|
comboAbilityList.put("IceBullet", new ComboAbility("IceBullet", iceBullet, WaterCombo.class));
|
||||||
descriptions.put("IceBullet", "Using a large cavern of ice, you can punch ice shards at your opponent causing moderate damage. To rapid fire, you must alternate between Left clicking and right clicking with IceBlast.");
|
descriptions.put("IceBullet", "Using a large cavern of ice, you can punch ice shards at your opponent causing moderate damage. To rapid fire, you must alternate between Left clicking and right clicking with IceBlast.");
|
||||||
instructions.put("IceBullet", "WaterBubble (Tap Shift) > IceBlast (Hold Shift) > IceBlast (Left Click) > Wait for ice to Form > Then alternate between Left and Right click with IceBlast");
|
instructions.put("IceBullet", "WaterBubble (Tap Shift) > IceBlast (Hold Shift) > IceBlast (Left Click) > Wait for ice to Form > Then alternate between Left and Right click with IceBlast");
|
||||||
|
|
||||||
ArrayList<AbilityInformation> iceBulletLeft = new ArrayList<AbilityInformation>();
|
ArrayList<AbilityInformation> iceBulletLeft = new ArrayList<AbilityInformation>();
|
||||||
iceBulletLeft.add(new AbilityInformation("IceBlast", ClickType.LEFT_CLICK));
|
iceBulletLeft.add(new AbilityInformation("IceBlast", ClickType.LEFT_CLICK));
|
||||||
comboAbilityList.add(new ComboAbility("IceBulletLeftClick", iceBulletLeft, WaterCombo.class));
|
comboAbilityList.put("IceBulletLeftClick", new ComboAbility("IceBulletLeftClick", iceBulletLeft, WaterCombo.class));
|
||||||
ArrayList<AbilityInformation> iceBulletRight = new ArrayList<AbilityInformation>();
|
ArrayList<AbilityInformation> iceBulletRight = new ArrayList<AbilityInformation>();
|
||||||
iceBulletRight.add(new AbilityInformation("IceBlast", ClickType.RIGHT_CLICK));
|
iceBulletRight.add(new AbilityInformation("IceBlast", ClickType.RIGHT_CLICK));
|
||||||
comboAbilityList.add(new ComboAbility("IceBulletRightClick", iceBulletRight, WaterCombo.class));
|
comboAbilityList.put("IceBulletRightClick", new ComboAbility("IceBulletRightClick", iceBulletRight, WaterCombo.class));
|
||||||
|
|
||||||
ArrayList<AbilityInformation> immobilize = new ArrayList<AbilityInformation>();
|
ArrayList<AbilityInformation> immobilize = new ArrayList<AbilityInformation>();
|
||||||
immobilize.add(new AbilityInformation("QuickStrike", ClickType.LEFT_CLICK));
|
immobilize.add(new AbilityInformation("QuickStrike", ClickType.LEFT_CLICK));
|
||||||
immobilize.add(new AbilityInformation("SwiftKick", ClickType.LEFT_CLICK));
|
immobilize.add(new AbilityInformation("SwiftKick", ClickType.LEFT_CLICK));
|
||||||
immobilize.add(new AbilityInformation("QuickStrike", ClickType.LEFT_CLICK));
|
immobilize.add(new AbilityInformation("QuickStrike", ClickType.LEFT_CLICK));
|
||||||
immobilize.add(new AbilityInformation("QuickStrike", ClickType.LEFT_CLICK));
|
immobilize.add(new AbilityInformation("QuickStrike", ClickType.LEFT_CLICK));
|
||||||
comboAbilityList.add(new ComboAbility("Immobilize", immobilize, ChiCombo.class));
|
comboAbilityList.put("Immobilize", new ComboAbility("Immobilize", immobilize, ChiCombo.class));
|
||||||
descriptions.put("Immobilize", "Immobilizes the opponent for several seconds.");
|
descriptions.put("Immobilize", "Immobilizes the opponent for several seconds.");
|
||||||
instructions.put("Immobilize", "QuickStrike (Left Click) > SwiftKick (Left Click) > QuickStrike (Left Click) > QuickStrike (Left Click)");
|
instructions.put("Immobilize", "QuickStrike (Left Click) > SwiftKick (Left Click) > QuickStrike (Left Click) > QuickStrike (Left Click)");
|
||||||
|
|
||||||
|
@ -186,13 +186,9 @@ public class ComboManager {
|
||||||
else if (comboAbil.getComboType().equals(ChiCombo.class))
|
else if (comboAbil.getComboType().equals(ChiCombo.class))
|
||||||
new ChiCombo(player, comboAbil.getName());
|
new ChiCombo(player, comboAbil.getName());
|
||||||
else {
|
else {
|
||||||
for (ComboAbility ca : comboAbilityList) {
|
if (comboAbil.getComboType() instanceof ComboAbilityModule) {
|
||||||
if (comboAbil.getName().equals(ca.getName())) {
|
((ComboAbilityModule) comboAbil.getComboType()).createNewComboInstance(player);
|
||||||
if (ca.getComboType() instanceof ComboAbilityModule) {
|
return;
|
||||||
((ComboAbilityModule) ca.getComboType()).createNewComboInstance(player);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -227,7 +223,8 @@ public class ComboManager {
|
||||||
*/
|
*/
|
||||||
public static ComboAbility checkForValidCombo(Player player) {
|
public static ComboAbility checkForValidCombo(Player player) {
|
||||||
ArrayList<AbilityInformation> playerCombo = getRecentlyUsedAbilities(player, 8);
|
ArrayList<AbilityInformation> playerCombo = getRecentlyUsedAbilities(player, 8);
|
||||||
for (ComboAbility customAbility : comboAbilityList) {
|
for (String ability : comboAbilityList.keySet()) {
|
||||||
|
ComboAbility customAbility = comboAbilityList.get(ability);
|
||||||
ArrayList<AbilityInformation> abilityCombo = customAbility.getAbilities();
|
ArrayList<AbilityInformation> abilityCombo = customAbility.getAbilities();
|
||||||
int size = abilityCombo.size();
|
int size = abilityCombo.size();
|
||||||
|
|
||||||
|
@ -288,9 +285,9 @@ public class ComboManager {
|
||||||
*/
|
*/
|
||||||
public static ArrayList<String> getCombosForElement(Element element) {
|
public static ArrayList<String> getCombosForElement(Element element) {
|
||||||
ArrayList<String> list = new ArrayList<String>();
|
ArrayList<String> list = new ArrayList<String>();
|
||||||
for (ComboAbility comboab : comboAbilityList) {
|
for (String comboab : descriptions.keySet()) {
|
||||||
if (GeneralMethods.getAbilityElement(comboab.getAbilities().get(0).getAbilityName()) == element)
|
if (GeneralMethods.getAbilityElement(comboAbilityList.get(comboab).getAbilities().get(0).getAbilityName()) == element)
|
||||||
list.add(comboab.getName());
|
list.add(comboab);
|
||||||
}
|
}
|
||||||
Collections.sort(list);
|
Collections.sort(list);
|
||||||
return list;
|
return list;
|
||||||
|
|
|
@ -26,7 +26,7 @@ public class ComboModuleManager {
|
||||||
private void loadComboModules() {
|
private void loadComboModules() {
|
||||||
for (ComboAbilityModule cm : combo) {
|
for (ComboAbilityModule cm : combo) {
|
||||||
cm.onThisLoad();
|
cm.onThisLoad();
|
||||||
ComboManager.comboAbilityList.add(new ComboManager.ComboAbility(cm.getName(), cm.getCombination(), cm));
|
ComboManager.comboAbilityList.put(cm.getName(), new ComboManager.ComboAbility(cm.getName(), cm.getCombination(), cm));
|
||||||
ComboManager.descriptions.put(cm.getName(), cm.getDescription());
|
ComboManager.descriptions.put(cm.getName(), cm.getDescription());
|
||||||
ComboManager.instructions.put(cm.getName(), cm.getInstructions());
|
ComboManager.instructions.put(cm.getName(), cm.getInstructions());
|
||||||
ComboManager.authors.put(cm.getName(), cm.getAuthor());
|
ComboManager.authors.put(cm.getName(), cm.getAuthor());
|
||||||
|
|
|
@ -102,7 +102,7 @@ public class Commands {
|
||||||
@Override
|
@Override
|
||||||
public boolean onCommand(CommandSender s, Command c, String label, String[] args) {
|
public boolean onCommand(CommandSender s, Command c, String label, String[] args) {
|
||||||
for (int i = 0; i < args.length; i++) {
|
for (int i = 0; i < args.length; i++) {
|
||||||
args[i] = args[i].toLowerCase();
|
args[i] = args[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (args.length == 0) {
|
if (args.length == 0) {
|
||||||
|
|
|
@ -41,9 +41,10 @@ public class HelpCommand extends PKCommand {
|
||||||
} else if (Arrays.asList(Commands.comboaliases).contains(arg)) { //bending help elementcombo
|
} else if (Arrays.asList(Commands.comboaliases).contains(arg)) { //bending help elementcombo
|
||||||
sender.sendMessage(ChatColor.GOLD + "Proper Usage: " + ChatColor.RED + "/bending display " + arg + ChatColor.GOLD + " or " + ChatColor.RED + "/bending help <comboname>");
|
sender.sendMessage(ChatColor.GOLD + "Proper Usage: " + ChatColor.RED + "/bending display " + arg + ChatColor.GOLD + " or " + ChatColor.RED + "/bending help <comboname>");
|
||||||
} else if (GeneralMethods.abilityExists(arg)) { //bending help ability
|
} else if (GeneralMethods.abilityExists(arg)) { //bending help ability
|
||||||
ChatColor color = GeneralMethods.getAbilityColor(arg);
|
String ability = GeneralMethods.getAbility(arg);
|
||||||
sender.sendMessage(color + arg + " - ");
|
ChatColor color = GeneralMethods.getAbilityColor(ability);
|
||||||
sender.sendMessage(AbilityModuleManager.descriptions.get(GeneralMethods.getAbility(arg)));
|
sender.sendMessage(color + ability + " - ");
|
||||||
|
sender.sendMessage(color + AbilityModuleManager.descriptions.get(GeneralMethods.getAbility(ability)));
|
||||||
} else if (Arrays.asList(Commands.airaliases).contains(args.get(0))) {
|
} else if (Arrays.asList(Commands.airaliases).contains(args.get(0))) {
|
||||||
sender.sendMessage(AirMethods.getAirColor() + "Air is the element of freedom. Airbenders are natural pacifists and " + "great explorers. There is nothing stopping them from scaling the tallest of mountains and walls easily. They specialize in redirection, " + "from blasting things away with gusts of winds, to forming a shield around them to prevent damage. Easy to get across flat terrains, " + "such as oceans, there is practically no terrain off limits to Airbenders. They lack much raw damage output, but make up for it with " + "with their ridiculous amounts of utility and speed.");
|
sender.sendMessage(AirMethods.getAirColor() + "Air is the element of freedom. Airbenders are natural pacifists and " + "great explorers. There is nothing stopping them from scaling the tallest of mountains and walls easily. They specialize in redirection, " + "from blasting things away with gusts of winds, to forming a shield around them to prevent damage. Easy to get across flat terrains, " + "such as oceans, there is practically no terrain off limits to Airbenders. They lack much raw damage output, but make up for it with " + "with their ridiculous amounts of utility and speed.");
|
||||||
sender.sendMessage(ChatColor.YELLOW + "Learn More: " + ChatColor.DARK_AQUA + "http://tinyurl.com/qffg9m3");
|
sender.sendMessage(ChatColor.YELLOW + "Learn More: " + ChatColor.DARK_AQUA + "http://tinyurl.com/qffg9m3");
|
||||||
|
|
|
@ -11,6 +11,7 @@ import org.bukkit.Sound;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.block.BlockFace;
|
import org.bukkit.block.BlockFace;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.material.MaterialData;
|
||||||
import org.bukkit.potion.PotionEffect;
|
import org.bukkit.potion.PotionEffect;
|
||||||
import org.bukkit.potion.PotionEffectType;
|
import org.bukkit.potion.PotionEffectType;
|
||||||
|
|
||||||
|
@ -20,7 +21,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||||
public class EarthPassive {
|
public class EarthPassive {
|
||||||
|
|
||||||
public static ConcurrentHashMap<Block, Long> sandblocks = new ConcurrentHashMap<Block, Long>();
|
public static ConcurrentHashMap<Block, Long> sandblocks = new ConcurrentHashMap<Block, Long>();
|
||||||
public static ConcurrentHashMap<Block, Material> sandidentities = new ConcurrentHashMap<Block, Material>();
|
public static ConcurrentHashMap<Block, MaterialData> sandidentities = new ConcurrentHashMap<Block, MaterialData>();
|
||||||
|
|
||||||
private static final long duration = ProjectKorra.plugin.getConfig().getLong("Abilities.Earth.Passive.Duration");
|
private static final long duration = ProjectKorra.plugin.getConfig().getLong("Abilities.Earth.Passive.Duration");
|
||||||
private static int sandspeed = ProjectKorra.plugin.getConfig().getInt("Properties.Earth.Passive.SandRunPower");
|
private static int sandspeed = ProjectKorra.plugin.getConfig().getInt("Properties.Earth.Passive.SandRunPower");
|
||||||
|
@ -32,9 +33,9 @@ public class EarthPassive {
|
||||||
}
|
}
|
||||||
if (EarthMethods.isEarthbendable(player, block) || EarthMethods.isTransparentToEarthbending(player, block)) {
|
if (EarthMethods.isEarthbendable(player, block) || EarthMethods.isTransparentToEarthbending(player, block)) {
|
||||||
if (!EarthMethods.isTransparentToEarthbending(player, block)) {
|
if (!EarthMethods.isTransparentToEarthbending(player, block)) {
|
||||||
Material type = block.getType();
|
MaterialData type = block.getState().getData();
|
||||||
if (GeneralMethods.isSolid(block.getRelative(BlockFace.DOWN))) {
|
if (GeneralMethods.isSolid(block.getRelative(BlockFace.DOWN))) {
|
||||||
if (type == Material.RED_SANDSTONE) {
|
if (type.getItemType() == Material.RED_SANDSTONE) {
|
||||||
byte data = (byte) 0x1;
|
byte data = (byte) 0x1;
|
||||||
block.setType(Material.SAND);
|
block.setType(Material.SAND);
|
||||||
block.setData(data);
|
block.setData(data);
|
||||||
|
@ -51,8 +52,8 @@ public class EarthPassive {
|
||||||
for (Block affectedBlock : GeneralMethods.getBlocksAroundPoint(block.getLocation(), 2)) {
|
for (Block affectedBlock : GeneralMethods.getBlocksAroundPoint(block.getLocation(), 2)) {
|
||||||
if (EarthMethods.isEarthbendable(player, affectedBlock)) {
|
if (EarthMethods.isEarthbendable(player, affectedBlock)) {
|
||||||
if (GeneralMethods.isSolid(affectedBlock.getRelative(BlockFace.DOWN))) {
|
if (GeneralMethods.isSolid(affectedBlock.getRelative(BlockFace.DOWN))) {
|
||||||
Material type = affectedBlock.getType();
|
MaterialData type = affectedBlock.getState().getData();
|
||||||
if (type == Material.RED_SANDSTONE) {
|
if (type.getItemType() == Material.RED_SANDSTONE) {
|
||||||
byte data = (byte) 0x1;
|
byte data = (byte) 0x1;
|
||||||
affectedBlock.setType(Material.SAND);
|
affectedBlock.setType(Material.SAND);
|
||||||
affectedBlock.setData(data);
|
affectedBlock.setData(data);
|
||||||
|
@ -80,15 +81,12 @@ public class EarthPassive {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void revertSand(Block block) {
|
public static void revertSand(Block block) {
|
||||||
Material type = sandidentities.get(block);
|
MaterialData materialdata = sandidentities.get(block);
|
||||||
sandidentities.remove(block);
|
sandidentities.remove(block);
|
||||||
sandblocks.remove(block);
|
sandblocks.remove(block);
|
||||||
if (block.getType() == Material.SAND) {
|
if (block.getType() == Material.SAND) {
|
||||||
if (block.getData() == (byte) 0x1) {
|
block.setType(materialdata.getItemType());
|
||||||
block.setType(type);
|
block.setData(materialdata.getData());
|
||||||
} else {
|
|
||||||
block.setType(type);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue