geforkt von Mirrors/Paper
SPIGOT-2481: Implement EnchantmentTarget.BREAKABLE
By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
Ursprung
ef24ef29c8
Commit
0c42c407cf
@ -150,6 +150,16 @@ public enum EnchantmentTarget {
|
||||
public boolean includes(Material item) {
|
||||
return item.equals(Material.FISHING_ROD);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Allows the enchantment to be placed on items with durability.
|
||||
*/
|
||||
BREAKABLE {
|
||||
@Override
|
||||
public boolean includes(Material item) {
|
||||
return item.getMaxDurability() > 0 && item.getMaxStackSize() == 1;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren