Set classes to use Messages getter in plugin instance.

This commit is contained in:
DNx5
2015-11-26 08:17:19 +07:00
parent 0601ab0e40
commit 2de0e0e819
31 changed files with 76 additions and 60 deletions
@@ -20,7 +20,7 @@ public class AsynchronousLogout {
protected final AuthMe plugin;
protected final DataSource database;
protected boolean canLogout = true;
private final Messages m = Messages.getInstance();
private final Messages m;
/**
* Constructor for AsynchronousLogout.
@@ -29,8 +29,8 @@ public class AsynchronousLogout {
* @param plugin AuthMe
* @param database DataSource
*/
public AsynchronousLogout(Player player, AuthMe plugin,
DataSource database) {
public AsynchronousLogout(Player player, AuthMe plugin, DataSource database) {
this.m = plugin.getMessages();
this.player = player;
this.plugin = plugin;
this.database = database;
@@ -22,7 +22,7 @@ public class ProcessSyncronousPlayerLogout implements Runnable {
protected final Player player;
protected final AuthMe plugin;
protected final String name;
private final Messages m = Messages.getInstance();
private final Messages m;
/**
* Constructor for ProcessSyncronousPlayerLogout.
@@ -31,6 +31,7 @@ public class ProcessSyncronousPlayerLogout implements Runnable {
* @param plugin AuthMe
*/
public ProcessSyncronousPlayerLogout(Player player, AuthMe plugin) {
this.m = plugin.getMessages();
this.player = player;
this.plugin = plugin;
this.name = player.getName().toLowerCase();