Skip to content

Commit

Permalink
cleanup minecraft logger usage. fixes Issue #748
Browse files Browse the repository at this point in the history
  • Loading branch information
Sleaker committed Apr 28, 2019
1 parent 7fc3628 commit 1be47ae
Show file tree
Hide file tree
Showing 30 changed files with 65 additions and 47 deletions.
3 changes: 2 additions & 1 deletion src/net/milkbowl/vault/chat/plugins/Chat_DroxPerms.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,16 @@
import de.hydrox.bukkit.DroxPerms.DroxPermsAPI;

public class Chat_DroxPerms extends Chat {
private static final Logger log = Logger.getLogger("Minecraft");

private final Logger log;
private final String name = "DroxPerms";
private Plugin plugin;
private DroxPermsAPI API;

public Chat_DroxPerms(Plugin plugin, Permission perms) {
super(perms);
this.plugin = plugin;
this.log = plugin.getLogger();

// Load Plugin in case it was loaded before
if (API == null) {
Expand Down
3 changes: 2 additions & 1 deletion src/net/milkbowl/vault/chat/plugins/Chat_GroupManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,15 @@

public class Chat_GroupManager extends Chat {

private static final Logger log = Logger.getLogger("Minecraft");
private final Logger log;
private final String name = "GroupManager - Chat";
private Plugin plugin = null;
private GroupManager groupManager;

public Chat_GroupManager(Plugin plugin, Permission perms) {
super(perms);
this.plugin = plugin;
this.log = plugin.getLogger();
Bukkit.getServer().getPluginManager().registerEvents(new PermissionServerListener(this), plugin);

// Load Plugin in case it was loaded before
Expand Down
3 changes: 2 additions & 1 deletion src/net/milkbowl/vault/chat/plugins/Chat_Permissions3.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
import com.nijikokun.bukkit.Permissions.Permissions;

public class Chat_Permissions3 extends Chat {
private static final Logger log = Logger.getLogger("Minecraft");

private final Logger log;
private String name = "Permissions 3 (Yeti) - Chat";
private PermissionHandler perms;
private Plugin plugin = null;
Expand All @@ -42,6 +42,7 @@ public class Chat_Permissions3 extends Chat {
public Chat_Permissions3(Plugin plugin, Permission perms) {
super(perms);
this.plugin = plugin;
this.log = plugin.getLogger();

Bukkit.getServer().getPluginManager().registerEvents(new PermissionServerListener(), plugin);

Expand Down
3 changes: 2 additions & 1 deletion src/net/milkbowl/vault/chat/plugins/Chat_PermissionsEx.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
import ru.tehkode.permissions.bukkit.PermissionsEx;

public class Chat_PermissionsEx extends Chat {
private static final Logger log = Logger.getLogger("Minecraft");
private final Logger log;
private final String name = "PermissionsEx_Chat";

private Plugin plugin = null;
Expand All @@ -43,6 +43,7 @@ public class Chat_PermissionsEx extends Chat {
public Chat_PermissionsEx(Plugin plugin, Permission perms) {
super(perms);
this.plugin = plugin;
this.log = plugin.getLogger();

Bukkit.getServer().getPluginManager().registerEvents(new PermissionServerListener(this), plugin);

Expand Down
3 changes: 2 additions & 1 deletion src/net/milkbowl/vault/chat/plugins/Chat_bPermissions.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,15 @@
import de.bananaco.permissions.info.InfoReader;

public class Chat_bPermissions extends Chat {
private static final Logger log = Logger.getLogger("Minecraft");
private final String name = "bInfo";
private final Logger log;
private Plugin plugin = null;
InfoReader chat;

public Chat_bPermissions(Plugin plugin, Permission perms) {
super(perms);
this.plugin = plugin;
this.log = plugin.getLogger();

Bukkit.getServer().getPluginManager().registerEvents(new PermissionServerListener(this), plugin);

Expand Down
3 changes: 2 additions & 1 deletion src/net/milkbowl/vault/chat/plugins/Chat_bPermissions2.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,15 @@
import de.bananaco.bpermissions.api.CalculableType;

public class Chat_bPermissions2 extends Chat {
private static final Logger log = Logger.getLogger("Minecraft");
private final Logger log;
private final String name = "bInfo";
private Plugin plugin = null;
private boolean hooked = false;

public Chat_bPermissions2(Plugin plugin, Permission perms) {
super(perms);
this.plugin = plugin;
this.log = plugin.getLogger();

Bukkit.getServer().getPluginManager().registerEvents(new PermissionServerListener(this), plugin);

Expand Down
3 changes: 2 additions & 1 deletion src/net/milkbowl/vault/chat/plugins/Chat_iChat.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,15 @@

public class Chat_iChat extends Chat {

private static final Logger log = Logger.getLogger("Minecraft");
private final Logger log;
private final String name = "iChat";
private Plugin plugin = null;
private iChatAPI iChat = null;

public Chat_iChat(Plugin plugin, Permission perms) {
super(perms);
this.plugin = plugin;
this.log = plugin.getLogger();

Bukkit.getServer().getPluginManager().registerEvents(new PermissionServerListener(this), plugin);

Expand Down
3 changes: 2 additions & 1 deletion src/net/milkbowl/vault/chat/plugins/Chat_mChat.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,15 @@
import org.bukkit.plugin.Plugin;

public class Chat_mChat extends Chat {
private static final Logger log = Logger.getLogger("Minecraft");
private final Logger log;
private final String name = "mChat";
private Plugin plugin = null;
private mChatAPI mChat = null;

public Chat_mChat(Plugin plugin, Permission perms) {
super(perms);
this.plugin = plugin;
this.log = plugin.getLogger();

Bukkit.getServer().getPluginManager().registerEvents(new PermissionServerListener(this), plugin);

Expand Down
3 changes: 2 additions & 1 deletion src/net/milkbowl/vault/chat/plugins/Chat_mChatSuite.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,15 @@
import org.bukkit.plugin.Plugin;

public class Chat_mChatSuite extends Chat {
private static final Logger log = Logger.getLogger("Minecraft");
private final Logger log;
private final String name = "mChatSuite";
private Plugin plugin = null;
private mChatSuite mChat = null;

public Chat_mChatSuite(Plugin plugin, Permission perms) {
super(perms);
this.plugin = plugin;
this.log = plugin.getLogger();

Bukkit.getServer().getPluginManager().registerEvents(new PermissionServerListener(), plugin);

Expand Down
3 changes: 2 additions & 1 deletion src/net/milkbowl/vault/chat/plugins/Chat_rscPermissions.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,15 @@

public class Chat_rscPermissions extends Chat {

private static final Logger log = Logger.getLogger("Minecraft");
private final Logger log;
private final Plugin vault;
private ru.simsonic.rscPermissions.MainPluginClass rscp;
private ru.simsonic.rscPermissions.rscpAPI rscpAPI;

public Chat_rscPermissions(Plugin plugin, Permission perm) {
super(perm);
this.vault = plugin;
this.log = plugin.getLogger();
Bukkit.getServer().getPluginManager().registerEvents(new ChatServerListener(this), vault);
if (rscp == null) {
Plugin perms = plugin.getServer().getPluginManager().getPlugin("rscPermissions");
Expand Down
4 changes: 2 additions & 2 deletions src/net/milkbowl/vault/economy/plugins/Economy_BOSE7.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@
import cosine.boseconomy.BOSEconomy;

public class Economy_BOSE7 extends AbstractEconomy {
private static final Logger log = Logger.getLogger("Minecraft");

private final Logger log;
private final String name = "BOSEconomy";
private Plugin plugin = null;
private BOSEconomy economy = null;

public Economy_BOSE7(Plugin plugin) {
this.plugin = plugin;
this.log = plugin.getLogger();
Bukkit.getServer().getPluginManager().registerEvents(new EconomyServerListener(this), plugin);

// Load Plugin in case it was loaded before
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
import net.milkbowl.vault.economy.EconomyResponse.ResponseType;

public class Economy_CommandsEX extends AbstractEconomy {
private static final Logger log = Logger.getLogger("Minecraft");

private final Logger log;
private final String name = "CommandsEX Economy";
private Plugin plugin = null;
private CommandsEX economy = null;

public Economy_CommandsEX(Plugin plugin){
this.plugin = plugin;
this.log = plugin.getLogger();
Bukkit.getServer().getPluginManager().registerEvents(new EconomyServerListener(this), plugin);

if (economy == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,14 @@
import com.greatmancode.craftconomy3.tools.interfaces.BukkitLoader;

public class Economy_Craftconomy3 extends AbstractEconomy {
private static final Logger log = Logger.getLogger("Minecraft");
private final Logger log;
private final String name = "Craftconomy3";
private Plugin plugin = null;
protected BukkitLoader economy = null;

public Economy_Craftconomy3(Plugin plugin) {
this.plugin = plugin;
this.log = plugin.getLogger();
Bukkit.getServer().getPluginManager().registerEvents(new EconomyServerListener(this), plugin);

// Load Plugin in case it was loaded before
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,13 @@
public class Economy_CurrencyCore extends AbstractEconomy {

private Currency currency;
private static final Logger log = Logger.getLogger("Minecraft");
private final Logger log;
private final Plugin plugin;
private final String name = "CurrencyCore";

public Economy_CurrencyCore(Plugin plugin) {
this.plugin = plugin;
this.log = plugin.getLogger();
Bukkit.getServer().getPluginManager().registerEvents(new EconomyServerListener(this), plugin);

// Load Plugin in case it was loaded before
Expand Down
4 changes: 2 additions & 2 deletions src/net/milkbowl/vault/economy/plugins/Economy_DigiCoin.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@
import net.milkbowl.vault.economy.EconomyResponse.ResponseType;

public class Economy_DigiCoin extends AbstractEconomy {
private static final Logger log = Logger.getLogger("Minecraft");

private final Logger log;
private final String name = "DigiCoin";
private Plugin plugin = null;
private DigiCoin economy = null;

public Economy_DigiCoin(Plugin plugin){
this.plugin = plugin;
this.log = plugin.getLogger();
Bukkit.getServer().getPluginManager().registerEvents(new EconomyServerListener(this), plugin);

if (economy == null) {
Expand Down
3 changes: 2 additions & 1 deletion src/net/milkbowl/vault/economy/plugins/Economy_EconXP.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,15 @@
import ca.agnate.EconXP.EconXP;

public class Economy_EconXP extends AbstractEconomy {
private static final Logger log = Logger.getLogger("Minecraft");
private final Logger log;

private final String name = "EconXP";
private Plugin plugin = null;
private EconXP econ = null;

public Economy_EconXP(Plugin plugin) {
this.plugin = plugin;
this.log = plugin.getLogger();
Bukkit.getServer().getPluginManager().registerEvents(new EconomyServerListener(this), plugin);
log.log(Level.WARNING, "EconXP is an integer only economy, you may notice inconsistencies with accounts if you do not setup your other econ using plugins accordingly!");
// Load Plugin in case it was loaded before
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,15 @@
import com.earth2me.essentials.api.UserDoesNotExistException;

public class Economy_Essentials extends AbstractEconomy {
private static final Logger log = Logger.getLogger("Minecraft");

private final String name = "Essentials Economy";
private final Logger log;
private Plugin plugin = null;
private Essentials ess = null;

public Economy_Essentials(Plugin plugin) {
this.plugin = plugin;
this.log = plugin.getLogger();
Bukkit.getServer().getPluginManager().registerEvents(new EconomyServerListener(this), plugin);

// Load Plugin in case it was loaded before
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@
import com.flobi.GoldIsMoney2.GoldIsMoney;

public class Economy_GoldIsMoney2 extends AbstractEconomy {
private static final Logger log = Logger.getLogger("Minecraft");

private final Logger log;
private final String name = "GoldIsMoney";
private Plugin plugin = null;
protected GoldIsMoney economy = null;

public Economy_GoldIsMoney2(Plugin plugin) {
this.plugin = plugin;
this.plugin = plugin;
this.log = plugin.getLogger();
Bukkit.getServer().getPluginManager().registerEvents(new EconomyServerListener(this), plugin);
// Load Plugin in case it was loaded before
if (economy == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import net.milkbowl.vault.economy.EconomyResponse.ResponseType;

public class Economy_GoldenChestEconomy extends AbstractEconomy {
private static final Logger log = Logger.getLogger("Minecraft");
private final Logger log;

private final String name = "GoldenChestEconomy";
private Plugin plugin = null;
Expand All @@ -41,6 +41,7 @@ public class Economy_GoldenChestEconomy extends AbstractEconomy {

public Economy_GoldenChestEconomy (Plugin plugin) {
this.plugin = plugin;
this.log = plugin.getLogger();
Bukkit.getServer().getPluginManager().registerEvents(new EconomyServerListener(this), plugin);
// Load Plugin in case it was loaded before
if (economy == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,15 @@

public class Economy_Gringotts extends AbstractEconomy {

private static final Logger log = Logger.getLogger("Minecraft");
private final Logger log;

private final String name = "Gringotts";
private Plugin plugin = null;
private Gringotts gringotts = null;

public Economy_Gringotts(Plugin plugin) {
this.plugin = plugin;
this.log = plugin.getLogger();
Bukkit.getServer().getPluginManager().registerEvents(new EconomyServerListener(this), plugin);
// Load Plugin in case it was loaded before
if (gringotts == null) {
Expand Down
3 changes: 2 additions & 1 deletion src/net/milkbowl/vault/economy/plugins/Economy_McMoney.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,15 @@
import boardinggamer.mcmoney.McMoneyAPI;

public class Economy_McMoney extends AbstractEconomy {
private static final Logger log = Logger.getLogger("Minecraft");
private final Logger log;

private final String name = "McMoney";
private Plugin plugin = null;
private McMoneyAPI economy = null;

public Economy_McMoney(Plugin plugin) {
this.plugin = plugin;
this.log = plugin.getLogger();
Bukkit.getServer().getPluginManager().registerEvents(new EconomyServerListener(this), plugin);

// Load Plugin in case it was loaded before
Expand Down
3 changes: 2 additions & 1 deletion src/net/milkbowl/vault/economy/plugins/Economy_MiConomy.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
import org.bukkit.plugin.Plugin;

public class Economy_MiConomy extends AbstractEconomy {
private static final Logger log = Logger.getLogger("Minecraft");
private final Logger log;

private final String name = "MiConomy";

Expand All @@ -46,6 +46,7 @@ public class Economy_MiConomy extends AbstractEconomy {

public Economy_MiConomy(Plugin plugin) {
this.plugin = plugin;
this.log = plugin.getLogger();
Bukkit.getServer().getPluginManager().registerEvents(new EconomyServerListener(this), plugin);

// Load Plugin in case it was loaded before
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@
import org.bukkit.plugin.Plugin;

public class Economy_MineConomy extends AbstractEconomy {
private static final Logger log = Logger.getLogger("Minecraft");

private final Logger log;
private final String name = "MineConomy";
private Plugin plugin = null;
private MineConomy econ = null;

public Economy_MineConomy(Plugin plugin) {
this.plugin = plugin;
this.log = plugin.getLogger();
Bukkit.getServer().getPluginManager().registerEvents(new EconomyServerListener(this), plugin);

// Load Plugin in case it was loaded before
Expand Down Expand Up @@ -269,4 +269,4 @@ public EconomyResponse depositPlayer(String playerName, String worldName, double
public boolean createPlayerAccount(String playerName, String worldName) {
return createPlayerAccount(playerName);
}
}
}
Loading

0 comments on commit 1be47ae

Please sign in to comment.