Award the taking inventory achievement to prevent a bug when swtiching from 1.8 to 1.13

This commit is contained in:
Sam 2018-08-07 23:50:46 +01:00 committed by Alexander Meech
parent 5aaa846f49
commit bc916412b2

View File

@ -4,6 +4,7 @@ import java.util.UUID;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerQuitEvent; import org.bukkit.event.player.PlayerQuitEvent;
import mineplex.core.MiniPlugin; import mineplex.core.MiniPlugin;
@ -177,6 +178,12 @@ public class AchievementManager extends MiniPlugin
_shop.attemptShopOpen(player, targetName, targetStats); _shop.attemptShopOpen(player, targetName, targetStats);
} }
@EventHandler
public void fixPressE(PlayerJoinEvent event)
{
event.getPlayer().awardAchievement(org.bukkit.Achievement.OPEN_INVENTORY);
}
@EventHandler @EventHandler
public void playerQuit(PlayerQuitEvent event) public void playerQuit(PlayerQuitEvent event)
{ {