Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>xyz.blujay</groupId>
<artifactId>ExplosiveArrows</artifactId>
<version>1.0.0</version>
<version>1.0.1</version>
<packaging>jar</packaging>

<name>ExplosiveArrows</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

public class ExplosiveArrowsAPI {
public int fuseLength;
public int explosionPower;
public String prefix;
public String usePermissionMissing;
public String craftPermissionMissing;
Expand All @@ -19,6 +20,7 @@ public class ExplosiveArrowsAPI {

public void setConfigOptions(FileConfiguration config){
this.fuseLength = config.getInt("fuseLength");
this.explosionPower = config.getInt("explosionPower");
this.prefix = ChatUtility.colorize(config.getString("prefix"));
this.usePermissionMissing = ChatUtility.colorize(config.getString("usePermissionMissing"));
this.craftPermissionMissing = ChatUtility.colorize(config.getString("craftPermissionMissing"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public void onArrowHit(org.bukkit.event.entity.ProjectileHitEvent e){

var tnt = (TNTPrimed) arrow.getWorld().spawnEntity(arrow.getLocation(), EntityType.PRIMED_TNT);
tnt.setFuseTicks(api.fuseLength);
tnt.setYield(api.explosionPower);
tnt.setSource(p);
arrow.remove();
}
Expand Down
5 changes: 4 additions & 1 deletion src/main/resources/config.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# How long should the TNT take to detonate in ticks? (80 ticks is normal tnt)
fuseLength: 20

# How big should the TNT explosion power be? (4 for normal tnt)
explosionPower: 3

# // MESSAGES \\
# Note: You can use HEX color codes, just make sure they follow the following format -> &#FFFFFF Example: &#9232A3
prefix: "&#9232A3[&#3FAFFFExplosiveArrows&#9232A3]&#3FAFFF "

usePermissionMissing: "You don't have permission to use this."
craftPermissionMissing: "You don't have permission to craft this."
craftPermissionMissing: "You don't have permission to craft this."