mirror of
https://github.com/EpicEricEE/ShopChest.git
synced 2024-11-08 11:50:14 +01:00
Don't send error when joining for the first time
This commit is contained in:
parent
51e16febe7
commit
7df4f4b69d
@ -38,8 +38,7 @@ public class NotifyPlayerOnJoinListener implements Listener {
|
||||
@Override
|
||||
public void onResult(Long result) {
|
||||
if (result < 0) {
|
||||
p.sendMessage(LanguageUtils.getMessage(Message.ERROR_OCCURRED,
|
||||
new Replacement(Placeholder.ERROR, "Could not get last time you logged out")));
|
||||
// No logout saved, probably first time joining.
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -543,6 +543,7 @@ public abstract class Database {
|
||||
* @param player Player who logged out
|
||||
* @param callback Callback that - if succeeded - returns the time in
|
||||
* milliseconds the player logged out (as {@code long})
|
||||
* or {@code -1} if the player has not logged out yet.
|
||||
*/
|
||||
public void getLastLogout(final Player player, final Callback<Long> callback) {
|
||||
new BukkitRunnable() {
|
||||
|
Loading…
Reference in New Issue
Block a user