mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-02-22 07:11:49 +01:00
Cleanup
This commit is contained in:
parent
8fe002f820
commit
60548e4523
@ -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 New Issue
Block a user