mirror of
https://github.com/amalthea-mc/ShopChest.git
synced 2024-11-13 22:21:06 +00: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
|
@Override
|
||||||
public void onResult(Long result) {
|
public void onResult(Long result) {
|
||||||
if (result < 0) {
|
if (result < 0) {
|
||||||
p.sendMessage(LanguageUtils.getMessage(Message.ERROR_OCCURRED,
|
// No logout saved, probably first time joining.
|
||||||
new Replacement(Placeholder.ERROR, "Could not get last time you logged out")));
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -543,6 +543,7 @@ public abstract class Database {
|
|||||||
* @param player Player who logged out
|
* @param player Player who logged out
|
||||||
* @param callback Callback that - if succeeded - returns the time in
|
* @param callback Callback that - if succeeded - returns the time in
|
||||||
* milliseconds the player logged out (as {@code long})
|
* 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) {
|
public void getLastLogout(final Player player, final Callback<Long> callback) {
|
||||||
new BukkitRunnable() {
|
new BukkitRunnable() {
|
||||||
|
Loading…
Reference in New Issue
Block a user