Skip to content

Commit e1b6a08

Browse files
committed
Fix Bloodbending and Bloodpuppet crash
- Fix an issue with these abilities that would cause them to call a Bukkit method that doesn't properly handle a zero case under certain configurations.
1 parent dd4b7a0 commit e1b6a08

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/com/jedk1/jedcore/ability/waterbending/BloodPuppet.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ private boolean canAttack() {
123123

124124
private boolean grab() {
125125
List<Entity> entities = new ArrayList<Entity>();
126-
for (int i = 0; i < distance; i++) {
126+
for (int i = 1; i < distance; i++) {
127127
Location location = null;
128128
if (bloodpuppetThroughBlocks) {
129129
location = player.getTargetBlock((HashSet<Material>) null, i).getLocation();

src/com/jedk1/jedcore/ability/waterbending/Bloodbending.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ private void launch() {
9999

100100
private boolean grab() {
101101
List<Entity> entities = new ArrayList<Entity>();
102-
for (int i = 0; i < distance; i++) {
102+
for (int i = 1; i < distance; i++) {
103103
Location location;
104104
if (bloodbendingThroughBlocks) {
105105
location = player.getTargetBlock((HashSet<Material>) null, i).getLocation();

0 commit comments

Comments
 (0)