start db only then null

This commit is contained in:
Chris 2020-12-28 09:06:18 +01:00
parent ce52fc0e18
commit 78e65372d9
1 changed files with 3 additions and 2 deletions

View File

@ -41,8 +41,8 @@ import java.util.*;
public class Playtime extends JavaPlugin implements Listener
{
private Config m_config;
private DB m_db;
private Config m_config = null;
private DB m_db = null;
@Override
public void onEnable()
@ -51,6 +51,7 @@ public class Playtime extends JavaPlugin implements Listener
m_config = new Config(this);
//Load the text from the lang config.
if(m_db == null)
m_db = new DB(this, m_config);
getServer().getPluginManager().registerEvents(this, this);