Fix mail to work with recent changes
This commit is contained in:
parent
c73a9f3bd5
commit
7c9226d6de
@ -1,12 +1,12 @@
|
||||
package mineplex.hub.mail;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.player.PlayerJoinEvent;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import mineplex.core.MiniClientPlugin;
|
||||
import mineplex.core.MiniPlugin;
|
||||
import mineplex.core.account.CoreClientManager;
|
||||
import mineplex.core.account.event.RetrieveClientInformationEvent;
|
||||
import mineplex.core.donation.DonationManager;
|
||||
import mineplex.hub.mail.command.MailCommand;
|
||||
import mineplex.hub.mail.gui.MailShop;
|
||||
@ -34,18 +34,15 @@ public class MailManager extends MiniClientPlugin<PlayerMailData>
|
||||
return new PlayerMailData();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void loadClientInformation(final RetrieveClientInformationEvent event)
|
||||
@EventHandler
|
||||
protected void loadPlayerData(final PlayerJoinEvent event)
|
||||
{
|
||||
event.incrementProcessingCount();
|
||||
|
||||
runAsync(new Runnable()
|
||||
{
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
Set(event.getPlayerName(), _repository.loadMailData(event.getUniqueId()));
|
||||
event.decreaseProcessingCount();
|
||||
Set(event.getPlayer().getName(), _repository.loadMailData(event.getPlayer().getUniqueId()));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ public class MailRepository extends RepositoryBase
|
||||
Result<MailRecord> resultSet = context.selectFrom(Tables.mail).where(Tables.mail.accountId.eq(DSL.select(Tables.accounts.id)
|
||||
.from(Tables.accounts)
|
||||
.where(Tables.accounts.uuid.eq(uuid.toString())))
|
||||
).fetch();
|
||||
).and(Tables.mail.deleted.isFalse()).fetch();
|
||||
|
||||
for (MailRecord record : resultSet)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user