Add cancelable event for Potions shifting the gui position (#2667)

Add cancelable event for Potions shifting the gui position
This commit is contained in:
mezz authored and LexManos committed 2016-04-08 20:18:17 -07:00
1 parent 03584ec411
commit a018e14939
2 files changed
+19 -3

No files matched your search

@@ -189,6 +189,20 @@ public class GuiScreenEvent extends Event
return mouseY;
}
}
/**
* This event fires in {@code InventoryEffectRenderer.updateActivePotionEffects()}
* when potion effects are active and the gui wants to move over.
* Cancel this event to prevent the Gui from being moved.
*/
@Cancelable
public static class PotionShiftEvent extends GuiScreenEvent
{
public PotionShiftEvent(GuiScreen gui)
{
super(gui);
}
}
public static class ActionPerformedEvent extends GuiScreenEvent
{