mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-11 11:49:12 +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
|
||||
public ItemStack createPotionItem(Material initial, int effectId) throws IllegalArgumentException {
|
||||
ItemStack potion = new ItemStack(initial, 1);
|
||||
|
||||
if (effectId == 0) {
|
||||
return new ItemStack(Material.POTION, 1);
|
||||
return potion;
|
||||
}
|
||||
|
||||
int damageValue = getBit(effectId, 0) +
|
||||
|
@ -48,12 +50,8 @@ public class BasePotionDataProvider extends PotionMetaProvider {
|
|||
boolean upgraded = getBit(effectId, 5) == 1;
|
||||
boolean splash = getBit(effectId, 14) == 1;
|
||||
|
||||
ItemStack potion;
|
||||
|
||||
if (splash && initial == Material.POTION) {
|
||||
potion = new ItemStack(Material.SPLASH_POTION, 1);
|
||||
} else {
|
||||
potion = new ItemStack(initial, 1);
|
||||
}
|
||||
|
||||
PotionMeta meta = (PotionMeta) potion.getItemMeta();
|
||||
|
|
Loading…
Reference in a new issue