mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-15 05:17:53 +00:00
Add exception handler into Ability Managers
This commit is contained in:
parent
85153cf895
commit
468232f812
5 changed files with 95 additions and 69 deletions
|
@ -2,6 +2,7 @@ package com.projectkorra.ProjectKorra.airbending;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
|
|
||||||
|
import com.projectkorra.ProjectKorra.GeneralMethods;
|
||||||
import com.projectkorra.ProjectKorra.ProjectKorra;
|
import com.projectkorra.ProjectKorra.ProjectKorra;
|
||||||
|
|
||||||
public class AirbendingManager implements Runnable {
|
public class AirbendingManager implements Runnable {
|
||||||
|
@ -14,6 +15,7 @@ public class AirbendingManager implements Runnable {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
try {
|
||||||
AirBlast.progressAll();
|
AirBlast.progressAll();
|
||||||
AirPassive.handlePassive(Bukkit.getServer());
|
AirPassive.handlePassive(Bukkit.getServer());
|
||||||
AirBurst.progressAll();
|
AirBurst.progressAll();
|
||||||
|
@ -27,6 +29,9 @@ public class AirbendingManager implements Runnable {
|
||||||
AirShield.progressAll();
|
AirShield.progressAll();
|
||||||
AirCombo.progressAll();
|
AirCombo.progressAll();
|
||||||
FlightAbility.progressAll();
|
FlightAbility.progressAll();
|
||||||
|
} catch (Exception e) {
|
||||||
|
GeneralMethods.logError(e, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@ package com.projectkorra.ProjectKorra.chiblocking;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import com.projectkorra.ProjectKorra.GeneralMethods;
|
||||||
import com.projectkorra.ProjectKorra.ProjectKorra;
|
import com.projectkorra.ProjectKorra.ProjectKorra;
|
||||||
|
|
||||||
public class ChiblockingManager implements Runnable {
|
public class ChiblockingManager implements Runnable {
|
||||||
|
@ -15,12 +16,16 @@ public class ChiblockingManager implements Runnable {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
try {
|
||||||
ChiPassive.handlePassive();
|
ChiPassive.handlePassive();
|
||||||
WarriorStance.progressAll();
|
WarriorStance.progressAll();
|
||||||
AcrobatStance.progressAll();
|
AcrobatStance.progressAll();
|
||||||
for(Player player : Bukkit.getOnlinePlayers()) {
|
for(Player player : Bukkit.getOnlinePlayers()) {
|
||||||
Smokescreen.removeFromHashMap(player);
|
Smokescreen.removeFromHashMap(player);
|
||||||
}
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
GeneralMethods.logError(e, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -2,6 +2,7 @@ package com.projectkorra.ProjectKorra.earthbending;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
|
|
||||||
|
import com.projectkorra.ProjectKorra.GeneralMethods;
|
||||||
import com.projectkorra.ProjectKorra.ProjectKorra;
|
import com.projectkorra.ProjectKorra.ProjectKorra;
|
||||||
import com.projectkorra.ProjectKorra.RevertChecker;
|
import com.projectkorra.ProjectKorra.RevertChecker;
|
||||||
|
|
||||||
|
@ -14,6 +15,7 @@ public class EarthbendingManager implements Runnable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void run() {
|
public void run() {
|
||||||
|
try {
|
||||||
EarthPassive.revertSands();
|
EarthPassive.revertSands();
|
||||||
EarthPassive.handleMetalPassives();
|
EarthPassive.handleMetalPassives();
|
||||||
RevertChecker.revertEarthBlocks();
|
RevertChecker.revertEarthBlocks();
|
||||||
|
@ -29,5 +31,8 @@ public class EarthbendingManager implements Runnable {
|
||||||
LavaSurge.progressAll();
|
LavaSurge.progressAll();
|
||||||
LavaFlow.progressAll();
|
LavaFlow.progressAll();
|
||||||
EarthSmash.progressAll();
|
EarthSmash.progressAll();
|
||||||
|
} catch (Exception e) {
|
||||||
|
GeneralMethods.logError(e, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
|
|
||||||
|
import com.projectkorra.ProjectKorra.GeneralMethods;
|
||||||
import com.projectkorra.ProjectKorra.ProjectKorra;
|
import com.projectkorra.ProjectKorra.ProjectKorra;
|
||||||
|
|
||||||
public class FirebendingManager implements Runnable {
|
public class FirebendingManager implements Runnable {
|
||||||
|
@ -15,6 +16,7 @@ public class FirebendingManager implements Runnable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void run() {
|
public void run() {
|
||||||
|
try {
|
||||||
FirePassive.handlePassive();
|
FirePassive.handlePassive();
|
||||||
FireJet.progressAll();
|
FireJet.progressAll();
|
||||||
Cook.progressAll();
|
Cook.progressAll();
|
||||||
|
@ -35,5 +37,9 @@ public class FirebendingManager implements Runnable {
|
||||||
FireStream.dissipateAll();
|
FireStream.dissipateAll();
|
||||||
FireStream.progressAll();
|
FireStream.progressAll();
|
||||||
FireCombo.progressAll();
|
FireCombo.progressAll();
|
||||||
|
} catch (Exception e) {
|
||||||
|
GeneralMethods.logError(e, false);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@ package com.projectkorra.ProjectKorra.waterbending;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
|
|
||||||
|
import com.projectkorra.ProjectKorra.GeneralMethods;
|
||||||
import com.projectkorra.ProjectKorra.ProjectKorra;
|
import com.projectkorra.ProjectKorra.ProjectKorra;
|
||||||
|
|
||||||
public class WaterbendingManager implements Runnable {
|
public class WaterbendingManager implements Runnable {
|
||||||
|
@ -14,6 +15,7 @@ public class WaterbendingManager implements Runnable {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
try {
|
||||||
WaterPassive.handlePassive();
|
WaterPassive.handlePassive();
|
||||||
Plantbending.regrow();
|
Plantbending.regrow();
|
||||||
Bloodbending.progressAll();
|
Bloodbending.progressAll();
|
||||||
|
@ -32,6 +34,9 @@ public class WaterbendingManager implements Runnable {
|
||||||
IceBlast.progressAll();
|
IceBlast.progressAll();
|
||||||
WaterWave.progressAll();
|
WaterWave.progressAll();
|
||||||
WaterCombo.progressAll();
|
WaterCombo.progressAll();
|
||||||
|
} catch (Exception e) {
|
||||||
|
GeneralMethods.logError(e, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue