Commits

Parker Hawke authored and md_5 committed 77e690b4291
#836: Add missing API for explosive minecarts
No tags

src/main/java/org/bukkit/entity/minecart/ExplosiveMinecart.java

Modified
1 1 package org.bukkit.entity.minecart;
2 2
3 3 import org.bukkit.entity.Minecart;
4 4
5 5 /**
6 6 * Represents a Minecart with TNT inside it that can explode when triggered.
7 7 */
8 8 public interface ExplosiveMinecart extends Minecart {
9 +
10 + /**
11 + * Set the fuse ticks of this minecart.
12 + *
13 + * If the fuse ticks are set to a non-zero value, this will ignite the
14 + * explosive.
15 + *
16 + * @param ticks the ticks
17 + */
18 + public void setFuseTicks(int ticks);
19 +
20 + /**
21 + * Get the fuse ticks of this minecart.
22 + *
23 + * If the fuse ticks reach 0, the minecart will explode.
24 + *
25 + * @return the fuse ticks, or -1 if this minecart's fuse has not yet been
26 + * ignited
27 + */
28 + public int getFuseTicks();
29 +
30 + /**
31 + * Ignite this minecart's fuse naturally.
32 + */
33 + public void ignite();
34 +
35 + /**
36 + * Check whether or not this minecart's fuse has been ignited.
37 + *
38 + * @return true if ignited, false otherwise
39 + */
40 + public boolean isIgnited();
41 +
42 + /**
43 + * Immediately explode this minecart with the power assumed by its current
44 + * movement.
45 + */
46 + public void explode();
47 +
48 + /**
49 + * Immediately explode this minecart with the given power.
50 + *
51 + * @param power the power to use. Must be positive and cannot exceed 5.0
52 + */
53 + public void explode(double power);
9 54 }

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut