Delete src/main/java/net/viper/status/modules/economy/EconomyListener.java via Git Manager GUI
This commit is contained in:
@@ -1,33 +0,0 @@
|
|||||||
package net.viper.status.modules.economy;
|
|
||||||
|
|
||||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
|
||||||
import net.md_5.bungee.api.event.PostLoginEvent;
|
|
||||||
import net.md_5.bungee.api.plugin.Listener;
|
|
||||||
import net.md_5.bungee.api.plugin.Plugin;
|
|
||||||
import net.md_5.bungee.event.EventHandler;
|
|
||||||
|
|
||||||
public class EconomyListener implements Listener {
|
|
||||||
|
|
||||||
private final Plugin plugin;
|
|
||||||
private final EconomyManager manager;
|
|
||||||
|
|
||||||
public EconomyListener(Plugin plugin, EconomyManager manager) {
|
|
||||||
this.plugin = plugin;
|
|
||||||
this.manager = manager;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Beim ersten Login: Konto anlegen falls noch nicht vorhanden.
|
|
||||||
* Kein Caching – alle weiteren Zugriffe gehen direkt in die DB.
|
|
||||||
*/
|
|
||||||
@EventHandler
|
|
||||||
public void onLogin(PostLoginEvent event) {
|
|
||||||
ProxiedPlayer player = event.getPlayer();
|
|
||||||
plugin.getProxy().getScheduler().runAsync(plugin, () -> {
|
|
||||||
// Namen für Offline-Lookup speichern
|
|
||||||
manager.saveNameMapping(player.getUniqueId(), player.getName());
|
|
||||||
// Konto anlegen falls neu
|
|
||||||
manager.getBalance(player.getUniqueId());
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user