mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-07 07:32:03 -07:00
[Bleeding] Added Potions API. Fixes BUKKIT-389
This commit is contained in:
27
src/test/java/org/bukkit/potion/PotionTest.java
Normal file
27
src/test/java/org/bukkit/potion/PotionTest.java
Normal file
@@ -0,0 +1,27 @@
|
||||
package org.bukkit.potion;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import org.bukkit.craftbukkit.potion.CraftPotionBrewer;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
|
||||
import net.minecraft.server.MobEffectList;
|
||||
|
||||
public class PotionTest {
|
||||
@BeforeClass
|
||||
public static void setUp() {
|
||||
Potion.setPotionBrewer(new CraftPotionBrewer());
|
||||
MobEffectList.BLINDNESS.getClass();
|
||||
PotionEffectType.stopAcceptingRegistrations();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getEffects() {
|
||||
for (PotionType type : PotionType.values()) {
|
||||
for (PotionEffect effect : new Potion(type).getEffects()) {
|
||||
assertTrue(effect.getType() == PotionEffectType.getById(effect.getType().getId()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user