forked from nisovin/MagicSpells
-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8db69b7
commit efb3d0f
Showing
7 changed files
with
186 additions
and
0 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
core/src/main/java/com/nisovin/magicspells/castmodifiers/conditions/BuildableCondition.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.nisovin.magicspells.castmodifiers.conditions; | ||
|
||
import org.bukkit.Location; | ||
import org.bukkit.entity.LivingEntity; | ||
|
||
import com.nisovin.magicspells.castmodifiers.Condition; | ||
|
||
public class BuildableCondition extends Condition { | ||
|
||
@Override | ||
public boolean initialize(String var) { | ||
return true; | ||
} | ||
|
||
@Override | ||
public boolean check(LivingEntity livingEntity) { | ||
return false; | ||
} | ||
|
||
@Override | ||
public boolean check(LivingEntity livingEntity, LivingEntity target) { | ||
return false; | ||
} | ||
|
||
@Override | ||
public boolean check(LivingEntity livingEntity, Location location) { | ||
return location.getBlock().isBuildable(); | ||
} | ||
|
||
} |
30 changes: 30 additions & 0 deletions
30
core/src/main/java/com/nisovin/magicspells/castmodifiers/conditions/BurnableCondition.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.nisovin.magicspells.castmodifiers.conditions; | ||
|
||
import org.bukkit.Location; | ||
import org.bukkit.entity.LivingEntity; | ||
|
||
import com.nisovin.magicspells.castmodifiers.Condition; | ||
|
||
public class BurnableCondition extends Condition { | ||
|
||
@Override | ||
public boolean initialize(String var) { | ||
return true; | ||
} | ||
|
||
@Override | ||
public boolean check(LivingEntity livingEntity) { | ||
return false; | ||
} | ||
|
||
@Override | ||
public boolean check(LivingEntity livingEntity, LivingEntity target) { | ||
return false; | ||
} | ||
|
||
@Override | ||
public boolean check(LivingEntity livingEntity, Location location) { | ||
return location.getBlock().isBurnable(); | ||
} | ||
|
||
} |
30 changes: 30 additions & 0 deletions
30
core/src/main/java/com/nisovin/magicspells/castmodifiers/conditions/CollidableCondition.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.nisovin.magicspells.castmodifiers.conditions; | ||
|
||
import org.bukkit.Location; | ||
import org.bukkit.entity.LivingEntity; | ||
|
||
import com.nisovin.magicspells.castmodifiers.Condition; | ||
|
||
public class CollidableCondition extends Condition { | ||
|
||
@Override | ||
public boolean initialize(String var) { | ||
return true; | ||
} | ||
|
||
@Override | ||
public boolean check(LivingEntity livingEntity) { | ||
return false; | ||
} | ||
|
||
@Override | ||
public boolean check(LivingEntity livingEntity, LivingEntity target) { | ||
return false; | ||
} | ||
|
||
@Override | ||
public boolean check(LivingEntity livingEntity, Location location) { | ||
return location.getBlock().isCollidable(); | ||
} | ||
|
||
} |
30 changes: 30 additions & 0 deletions
30
core/src/main/java/com/nisovin/magicspells/castmodifiers/conditions/PassableCondition.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.nisovin.magicspells.castmodifiers.conditions; | ||
|
||
import org.bukkit.Location; | ||
import org.bukkit.entity.LivingEntity; | ||
|
||
import com.nisovin.magicspells.castmodifiers.Condition; | ||
|
||
public class PassableCondition extends Condition { | ||
|
||
@Override | ||
public boolean initialize(String var) { | ||
return true; | ||
} | ||
|
||
@Override | ||
public boolean check(LivingEntity livingEntity) { | ||
return false; | ||
} | ||
|
||
@Override | ||
public boolean check(LivingEntity livingEntity, LivingEntity target) { | ||
return false; | ||
} | ||
|
||
@Override | ||
public boolean check(LivingEntity livingEntity, Location location) { | ||
return location.getBlock().isPassable(); | ||
} | ||
|
||
} |
30 changes: 30 additions & 0 deletions
30
.../src/main/java/com/nisovin/magicspells/castmodifiers/conditions/ReplaceableCondition.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.nisovin.magicspells.castmodifiers.conditions; | ||
|
||
import org.bukkit.Location; | ||
import org.bukkit.entity.LivingEntity; | ||
|
||
import com.nisovin.magicspells.castmodifiers.Condition; | ||
|
||
public class ReplaceableCondition extends Condition { | ||
|
||
@Override | ||
public boolean initialize(String var) { | ||
return true; | ||
} | ||
|
||
@Override | ||
public boolean check(LivingEntity livingEntity) { | ||
return false; | ||
} | ||
|
||
@Override | ||
public boolean check(LivingEntity livingEntity, LivingEntity target) { | ||
return false; | ||
} | ||
|
||
@Override | ||
public boolean check(LivingEntity livingEntity, Location location) { | ||
return location.getBlock().isReplaceable(); | ||
} | ||
|
||
} |
30 changes: 30 additions & 0 deletions
30
core/src/main/java/com/nisovin/magicspells/castmodifiers/conditions/SolidCondition.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.nisovin.magicspells.castmodifiers.conditions; | ||
|
||
import org.bukkit.Location; | ||
import org.bukkit.entity.LivingEntity; | ||
|
||
import com.nisovin.magicspells.castmodifiers.Condition; | ||
|
||
public class SolidCondition extends Condition { | ||
|
||
@Override | ||
public boolean initialize(String var) { | ||
return true; | ||
} | ||
|
||
@Override | ||
public boolean check(LivingEntity livingEntity) { | ||
return false; | ||
} | ||
|
||
@Override | ||
public boolean check(LivingEntity livingEntity, LivingEntity target) { | ||
return false; | ||
} | ||
|
||
@Override | ||
public boolean check(LivingEntity livingEntity, Location location) { | ||
return location.getBlock().isSolid(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters