blob: 752eeb5e922d2245b559476acc0419aa3e568dd6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
package org.bukkit.entity;
import org.bukkit.block.Block;
/**
* Represents an arrow.
*/
public interface Arrow extends Projectile {
/**
* Gets the knockback strength for an arrow, which is the
* {@link org.bukkit.enchantments.Enchantment#KNOCKBACK KnockBack} level
* of the bow that shot it.
*
* @return the knockback strength value
*/
public int getKnockbackStrength();
/**
* Sets the knockback strength for an arrow.
*
* @param knockbackStrength the knockback strength value
*/
public void setKnockbackStrength(int knockbackStrength);
/**
* Gets whether this arrow is critical.
* <p>
* Critical arrows have increased damage and cause particle effects.
* <p>
* Critical arrows generally occur when a player fully draws a bow before
* firing.
*
* @return true if it is critical
*/
public boolean isCritical();
/**
* Sets whether or not this arrow should be critical.
*
* @param critical whether or not it should be critical
*/
public void setCritical(boolean critical);
/**
* Gets whether this arrow is in a block or not.
* <p>
* Arrows in a block are motionless and may be picked up by players.
*
* @return true if in a block
*/
public boolean isInBlock();
/**
* Gets the block to which this arrow is attached.
*
* @return the attached block or null if not attached
*/
public Block getAttachedBlock();
/**
* Gets the current pickup status of this arrow.
*
* @return the pickup status of this arrow.
*/
public PickupStatus getPickupStatus();
/**
* Sets the current pickup status of this arrow.
*
* @param status new pickup status of this arrow.
*/
public void setPickupStatus(PickupStatus status);
/**
* Represents the pickup status of this arrow.
*/
public enum PickupStatus {
/**
* The arrow cannot be picked up.
*/
DISALLOWED,
/**
* The arrow can be picked up.
*/
ALLOWED,
/**
* The arrow can only be picked up by players in creative mode.
*/
CREATIVE_ONLY
}
}
|