Skip to content

Commit

Permalink
Fix exceptions from disabled abilities
Browse files Browse the repository at this point in the history
- Add an extra check to disabled abilities that override core abilities.
  Fixes #24
- Increase version to 2.7.1.
  • Loading branch information
plushmonkey committed Aug 8, 2018
1 parent f71ba85 commit 737eef3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -4,7 +4,7 @@

<groupId>com.jedk1</groupId>
<artifactId>jedcore</artifactId>
<version>2.7.0-Spigot1.12.2-PK1.8.7</version>
<version>2.7.1-Spigot1.12.2-PK1.8.7</version>
<packaging>jar</packaging>
<name>JedCore</name>

Expand Down
2 changes: 1 addition & 1 deletion src/com/jedk1/jedcore/ability/firebending/Combustion.java
Expand Up @@ -41,7 +41,7 @@ public class Combustion extends CombustionAbility implements AddonAbility {
public Combustion(Player player) {
super(player);

if (!bPlayer.canBend(this) || !bPlayer.canCombustionbend() || hasAbility(player, Combustion.class)) {
if (this.player == null || !bPlayer.canBend(this) || !bPlayer.canCombustionbend() || hasAbility(player, Combustion.class)) {
return;
}

Expand Down
Expand Up @@ -45,7 +45,7 @@ public class Bloodbending extends BloodAbility implements AddonAbility {

public Bloodbending(Player player) {
super(player);
if (!isEligible(player, true)) {
if (this.player == null || !isEligible(player, true)) {
return;
}
setFields();
Expand Down

0 comments on commit 737eef3

Please sign in to comment.