mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-05 03:53:41 +00:00
Cleanup
This commit is contained in:
parent
8fe002f820
commit
60548e4523
1 changed files with 3 additions and 5 deletions
|
@ -30,8 +30,10 @@ public class BasePotionDataProvider extends PotionMetaProvider {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ItemStack createPotionItem(Material initial, int effectId) throws IllegalArgumentException {
|
public ItemStack createPotionItem(Material initial, int effectId) throws IllegalArgumentException {
|
||||||
|
ItemStack potion = new ItemStack(initial, 1);
|
||||||
|
|
||||||
if (effectId == 0) {
|
if (effectId == 0) {
|
||||||
return new ItemStack(Material.POTION, 1);
|
return potion;
|
||||||
}
|
}
|
||||||
|
|
||||||
int damageValue = getBit(effectId, 0) +
|
int damageValue = getBit(effectId, 0) +
|
||||||
|
@ -48,12 +50,8 @@ public class BasePotionDataProvider extends PotionMetaProvider {
|
||||||
boolean upgraded = getBit(effectId, 5) == 1;
|
boolean upgraded = getBit(effectId, 5) == 1;
|
||||||
boolean splash = getBit(effectId, 14) == 1;
|
boolean splash = getBit(effectId, 14) == 1;
|
||||||
|
|
||||||
ItemStack potion;
|
|
||||||
|
|
||||||
if (splash && initial == Material.POTION) {
|
if (splash && initial == Material.POTION) {
|
||||||
potion = new ItemStack(Material.SPLASH_POTION, 1);
|
potion = new ItemStack(Material.SPLASH_POTION, 1);
|
||||||
} else {
|
|
||||||
potion = new ItemStack(initial, 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PotionMeta meta = (PotionMeta) potion.getItemMeta();
|
PotionMeta meta = (PotionMeta) potion.getItemMeta();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue