mirror of
https://github.com/Aust1n46/VentureChat.git
synced 2025-05-23 10:39:05 +00:00
Remove login/logout message configuration.
Just use DeluxeJoin.
This commit is contained in:
parent
4a87065ee5
commit
06f51aea91
@ -76,15 +76,6 @@ mysql:
|
|||||||
host: localhost
|
host: localhost
|
||||||
database: Database
|
database: Database
|
||||||
|
|
||||||
# Login and logout messages
|
|
||||||
# Use Default for the vanilla login and logout messages
|
|
||||||
login:
|
|
||||||
enabled: true
|
|
||||||
message: Default
|
|
||||||
logout:
|
|
||||||
enabled: true
|
|
||||||
message: Default
|
|
||||||
|
|
||||||
# Loglevel feature is still in the works for adding of debug messages
|
# Loglevel feature is still in the works for adding of debug messages
|
||||||
# Valid loglevels:
|
# Valid loglevels:
|
||||||
# Info: Regular logging
|
# Info: Regular logging
|
||||||
|
@ -76,15 +76,6 @@ mysql:
|
|||||||
host: localhost
|
host: localhost
|
||||||
database: Database
|
database: Database
|
||||||
|
|
||||||
# Login and logout messages
|
|
||||||
# Use Default for the vanilla login and logout messages
|
|
||||||
login:
|
|
||||||
enabled: true
|
|
||||||
message: Default
|
|
||||||
logout:
|
|
||||||
enabled: true
|
|
||||||
message: Default
|
|
||||||
|
|
||||||
# Loglevel feature is still in the works for adding of debug messages
|
# Loglevel feature is still in the works for adding of debug messages
|
||||||
# Valid loglevels:
|
# Valid loglevels:
|
||||||
# Info: Regular logging
|
# Info: Regular logging
|
||||||
|
@ -25,18 +25,8 @@ public class LoginListener implements Listener {
|
|||||||
private MineverseChat plugin = MineverseChat.getInstance();
|
private MineverseChat plugin = MineverseChat.getInstance();
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.LOW)
|
@EventHandler(priority = EventPriority.LOW)
|
||||||
public void onPlayerQuit(PlayerQuitEvent plog) {
|
public void onPlayerQuit(PlayerQuitEvent playerQuitEvent) {
|
||||||
if(!plugin.getConfig().getConfigurationSection("logout").getString("message", "Default").equalsIgnoreCase("Default")) {
|
MineverseChatPlayer mcp = MineverseChatAPI.getOnlineMineverseChatPlayer(playerQuitEvent.getPlayer());
|
||||||
plog.setQuitMessage(Format.FormatStringAll(plugin.getConfig().getConfigurationSection("logout").getString("message", "Default").replace("{player}", plog.getPlayer().getName())));
|
|
||||||
}
|
|
||||||
if(!plugin.getConfig().getConfigurationSection("logout").getBoolean("enabled", true)) {
|
|
||||||
plog.setQuitMessage("");
|
|
||||||
}
|
|
||||||
playerLeaving(plog.getPlayer());
|
|
||||||
}
|
|
||||||
|
|
||||||
private void playerLeaving(Player player) {
|
|
||||||
MineverseChatPlayer mcp = MineverseChatAPI.getOnlineMineverseChatPlayer(player);
|
|
||||||
PlayerData.savePlayerData(mcp);
|
PlayerData.savePlayerData(mcp);
|
||||||
mcp.clearMessages();
|
mcp.clearMessages();
|
||||||
mcp.setOnline(false);
|
mcp.setOnline(false);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user