Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Economy] Remove double logging plugin name #771

Merged
merged 22 commits into from Jun 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/net/milkbowl/vault/economy/plugins/Economy_BOSE7.java
Expand Up @@ -48,7 +48,7 @@ public Economy_BOSE7(Plugin plugin) {
Plugin bose = plugin.getServer().getPluginManager().getPlugin("BOSEconomy");
if (bose != null && bose.isEnabled() && bose.getDescription().getVersion().startsWith("0.7")) {
economy = (BOSEconomy) bose;
log.info(String.format("[%s][Economy] %s hooked.", plugin.getDescription().getName(), name));
log.info(String.format("[Economy] %s hooked.", name));
}
}
}
Expand Down Expand Up @@ -134,7 +134,7 @@ public void onPluginEnable(PluginEnableEvent event) {

if (bose.getDescription().getName().equals("BOSEconomy") && bose.getDescription().getVersion().startsWith("0.7")) {
economy.economy = (BOSEconomy) bose;
log.info(String.format("[%s][Economy] %s hooked.", plugin.getDescription().getName(), economy.name));
log.info(String.format("[Economy] %s hooked.", economy.name));
}
}
}
Expand All @@ -144,7 +144,7 @@ public void onPluginDisable(PluginDisableEvent event) {
if (economy.economy != null) {
if (event.getPlugin().getDescription().getName().equals("BOSEconomy") && event.getPlugin().getDescription().getVersion().startsWith("0.7")) {
economy.economy = null;
log.info(String.format("[%s][Economy] %s unhooked.", plugin.getDescription().getName(), economy.name));
log.info(String.format("[Economy] %s unhooked.", economy.name));
}
}
}
Expand Down
10 changes: 5 additions & 5 deletions src/net/milkbowl/vault/economy/plugins/Economy_CommandsEX.java
Expand Up @@ -22,8 +22,8 @@
public class Economy_CommandsEX extends AbstractEconomy {
private final Logger log;
private final String name = "CommandsEX Economy";
private Plugin plugin = null;
private CommandsEX economy = null;
private Plugin plugin = null;
private CommandsEX economy = null;

public Economy_CommandsEX(Plugin plugin){
this.plugin = plugin;
Expand All @@ -35,7 +35,7 @@ public Economy_CommandsEX(Plugin plugin){

if (commandsex != null && commandsex.isEnabled()) {
economy = (CommandsEX) commandsex;
log.info(String.format("[%s][Economy] %s hooked.", plugin.getDescription().getName(), name));
log.info(String.format("[Economy] %s hooked.", name));
}
}
}
Expand All @@ -54,7 +54,7 @@ public void onPluginEnable(PluginEnableEvent event) {

if (cex.getDescription().getName().equals("CommandsEX")) {
economy.economy = (CommandsEX) cex;
log.info(String.format("[%s][Economy] %s hooked.", plugin.getDescription().getName(), economy.name));
log.info(String.format("[Economy] %s hooked.", economy.name));
}
}
}
Expand All @@ -64,7 +64,7 @@ public void onPluginDisable(PluginDisableEvent event) {
if (economy.economy != null) {
if (event.getPlugin().getDescription().getName().equals("CommandsEX")) {
economy.economy = null;
log.info(String.format("[%s][Economy] %s unhooked.", plugin.getDescription().getName(), economy.name));
log.info(String.format("[Economy] %s unhooked.", economy.name));
}
}
}
Expand Down
Expand Up @@ -52,7 +52,7 @@ public Economy_Craftconomy3(Plugin plugin) {
Plugin ec = plugin.getServer().getPluginManager().getPlugin("Craftconomy3");
if (ec != null && ec.isEnabled() && ec.getClass().getName().equals("com.greatmancode.craftconomy3.BukkitLoader")) {
economy = (BukkitLoader) ec;
log.info(String.format("[%s][Economy] %s hooked.", plugin.getDescription().getName(), name));
log.info(String.format("[Economy] %s hooked.", name));
}
}
}
Expand All @@ -71,7 +71,7 @@ public void onPluginEnable(PluginEnableEvent event) {

if (ec.getDescription().getName().equals("Craftconomy3") && ec.getClass().getName().equals("com.greatmancode.craftconomy3.tools.interfaces.BukkitLoader")) {
economy.economy = (BukkitLoader) ec;
log.info(String.format("[%s][Economy] %s hooked.", plugin.getDescription().getName(), economy.name));
log.info(String.format("[Economy] %s hooked.", economy.name));
}
}
}
Expand All @@ -81,7 +81,7 @@ public void onPluginDisable(PluginDisableEvent event) {
if (economy.economy != null) {
if (event.getPlugin().getDescription().getName().equals("Craftconomy3")) {
economy.economy = null;
log.info(String.format("[%s][Economy] %s unhooked.", plugin.getDescription().getName(), economy.name));
log.info(String.format("[Economy] %s unhooked.", economy.name));
}
}
}
Expand Down Expand Up @@ -316,4 +316,4 @@ public EconomyResponse depositPlayer(String playerName, String worldName, double
public boolean createPlayerAccount(String playerName, String worldName) {
return createPlayerAccount(playerName);
}
}
}
Expand Up @@ -50,7 +50,7 @@ public Economy_CurrencyCore(Plugin plugin) {
Plugin currencyPlugin = plugin.getServer().getPluginManager().getPlugin("CurrencyCore");
if(currencyPlugin != null && currencyPlugin.getClass().getName().equals("is.currency.Currency")) {
this.currency = (Currency) currencyPlugin;
log.info(String.format("[%s][Economy] %s hooked.", plugin.getDescription().getName(), name));
log.info(String.format("[Economy] %s hooked.", name));
}
}
}
Expand All @@ -70,7 +70,7 @@ public void onPluginEnable(PluginEnableEvent event) {

if(currencyPlugin.getDescription().getName().equals("CurrencyCore") && currencyPlugin.getClass().getName().equals("is.currency.Currency")) {
this.economy.currency = (Currency) currencyPlugin;
log.info(String.format("[%s][Economy] %s hooked.", plugin.getDescription().getName(), this.economy.getName()));
log.info(String.format("[Economy] %s hooked.", this.economy.getName()));
}
}
}
Expand All @@ -80,7 +80,7 @@ public void onPluginDisable(PluginDisableEvent event) {
if (this.economy.currency != null) {
if (event.getPlugin().getDescription().getName().equals("CurrencyCore")) {
this.economy.currency = null;
log.info(String.format("[%s][Economy] %s unhooked.", plugin.getDescription().getName(), this.economy.getName()));
log.info(String.format("[Economy] %s unhooked.", this.economy.getName()));
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions src/net/milkbowl/vault/economy/plugins/Economy_DigiCoin.java
Expand Up @@ -48,7 +48,7 @@ public Economy_DigiCoin(Plugin plugin){

if (digicoin != null && digicoin.isEnabled()) {
economy = (DigiCoin) digicoin;
log.info(String.format("[%s][Economy] %s hooked.", plugin.getDescription().getName(), name));
log.info(String.format("[Economy] %s hooked.", name));
}
}
}
Expand All @@ -67,7 +67,7 @@ public void onPluginEnable(PluginEnableEvent event) {

if (digicoin.getDescription().getName().equals(economy.name)) {
economy.economy = (DigiCoin) digicoin;
log.info(String.format("[%s][Economy] %s hooked.", plugin.getDescription().getName(), economy.name));
log.info(String.format("[Economy] %s hooked.", economy.name));
}
}
}
Expand All @@ -77,7 +77,7 @@ public void onPluginDisable(PluginDisableEvent event) {
if (economy.economy != null) {
if (event.getPlugin().getDescription().getName().equals(economy.name)) {
economy.economy = null;
log.info(String.format("[%s][Economy] %s unhooked.", plugin.getDescription().getName(), economy.name));
log.info(String.format("[Economy] %s unhooked.", economy.name));
}
}
}
Expand Down Expand Up @@ -248,4 +248,4 @@ public EconomyResponse depositPlayer(String playerName, String worldName, double
public boolean createPlayerAccount(String playerName, String worldName) {
return false;
}
}
}
6 changes: 3 additions & 3 deletions src/net/milkbowl/vault/economy/plugins/Economy_EconXP.java
Expand Up @@ -52,7 +52,7 @@ public Economy_EconXP(Plugin plugin) {
Plugin econ = plugin.getServer().getPluginManager().getPlugin("EconXP");
if (econ != null && econ.isEnabled()) {
this.econ = (EconXP) econ;
log.info(String.format("[%s][Economy] %s hooked.", plugin.getDescription().getName(), name));
log.info(String.format("[Economy] %s hooked.", name));
}
}
}
Expand All @@ -71,7 +71,7 @@ public void onPluginEnable(PluginEnableEvent event) {

if (eco.getDescription().getName().equals("EconXP")) {
economy.econ = (EconXP) eco;
log.info(String.format("[%s][Economy] %s hooked.", plugin.getDescription().getName(), economy.name));
log.info(String.format("[Economy] %s hooked.", economy.name));
}
}
}
Expand All @@ -81,7 +81,7 @@ public void onPluginDisable(PluginDisableEvent event) {
if (economy.econ != null) {
if (event.getPlugin().getDescription().getName().equals("EconXP")) {
economy.econ = null;
log.info(String.format("[%s][Economy] %s unhooked.", plugin.getDescription().getName(), economy.name));
log.info(String.format("[Economy] %s unhooked.", economy.name));
}
}
}
Expand Down
Expand Up @@ -52,7 +52,7 @@ public Economy_Essentials(Plugin plugin) {
Plugin essentials = plugin.getServer().getPluginManager().getPlugin("Essentials");
if (essentials != null && essentials.isEnabled()) {
ess = (Essentials) essentials;
log.info(String.format("[%s][Economy] %s hooked.", plugin.getDescription().getName(), name));
log.info(String.format("[Economy] %s hooked.", name));
}
}
}
Expand Down Expand Up @@ -194,7 +194,7 @@ public void onPluginEnable(PluginEnableEvent event) {

if (essentials.getDescription().getName().equals("Essentials")) {
economy.ess = (Essentials) essentials;
log.info(String.format("[%s][Economy] %s hooked.", plugin.getDescription().getName(), economy.name));
log.info(String.format("[Economy] %s hooked.", economy.name));
}
}
}
Expand All @@ -204,7 +204,7 @@ public void onPluginDisable(PluginDisableEvent event) {
if (economy.ess != null) {
if (event.getPlugin().getDescription().getName().equals("Essentials")) {
economy.ess = null;
log.info(String.format("[%s][Economy] %s unhooked.", plugin.getDescription().getName(), economy.name));
log.info(String.format("[Economy] %s unhooked.", economy.name));
}
}
}
Expand Down Expand Up @@ -323,4 +323,4 @@ public EconomyResponse depositPlayer(String playerName, String worldName, double
public boolean createPlayerAccount(String playerName, String worldName) {
return createPlayerAccount(playerName);
}
}
}
Expand Up @@ -48,7 +48,7 @@ public Economy_GoldIsMoney2(Plugin plugin) {

if (ec != null && ec.isEnabled() && ec.getClass().getName().equals("com.flobi.GoldIsMoney2.GoldIsMoney")) {
economy = (GoldIsMoney) ec;
log.info(String.format("[%s][Economy] %s hooked.", plugin.getDescription().getName(), name));
log.info(String.format("[Economy] %s hooked.", name));
}
}
}
Expand Down Expand Up @@ -268,7 +268,7 @@ public void onPluginEnable(PluginEnableEvent event) {

if (ec.getClass().getName().equals("com.flobi.GoldIsMoney2.GoldIsMoney")) {
economy.economy = (GoldIsMoney) ec;
log.info(String.format("[%s][Economy] %s hooked.", plugin.getDescription().getName(), economy.name));
log.info(String.format("[Economy] %s hooked.", economy.name));
}
}
}
Expand All @@ -278,7 +278,7 @@ public void onPluginDisable(PluginDisableEvent event) {
if (economy.economy != null) {
if (event.getPlugin().getDescription().getName().equals("GoldIsMoney")) {
economy.economy = null;
log.info(String.format("[%s][Economy] %s unhooked.", plugin.getDescription().getName(), economy.name));
log.info(String.format("[Economy] %s unhooked.", economy.name));
}
}
}
Expand Down Expand Up @@ -313,4 +313,4 @@ public EconomyResponse depositPlayer(String playerName, String worldName, double
public boolean createPlayerAccount(String playerName, String worldName) {
return createPlayerAccount(playerName);
}
}
}
Expand Up @@ -48,7 +48,7 @@ public Economy_GoldenChestEconomy (Plugin plugin) {
Plugin ec = plugin.getServer().getPluginManager().getPlugin("GoldenChestEconomy");
if (ec != null && ec.isEnabled() && ec.getClass().getName().equals("me.igwb.GoldenChest.GoldenChestEconomy")) {
economy = (GoldenChestEconomy) ec;
log.info(String.format("[%s][Economy] %s hooked.", plugin.getDescription().getName(), name));
log.info(String.format("[Economy] %s hooked.", name));
}
}
}
Expand All @@ -67,7 +67,7 @@ public void onPluginEnable(PluginEnableEvent event) {

if (ec.getDescription().getName().equals("GoldenChestEconomy") && ec.getClass().getName().equals("me.igwb.GoldenChest.GoldenChestEconomy")) {
economy.economy = (GoldenChestEconomy) ec;
log.info(String.format("[%s][Economy] %s hooked.", plugin.getDescription().getName(), economy.name));
log.info(String.format("[Economy] %s hooked.", economy.name));
}
}
}
Expand All @@ -77,7 +77,7 @@ public void onPluginDisable(PluginDisableEvent event) {
if (economy.economy != null) {
if (event.getPlugin().getDescription().getName().equals("GoldenChestEconomy")) {
economy.economy = null;
log.info(String.format("[%s][Economy] %s unhooked.", plugin.getDescription().getName(), economy.name));
log.info(String.format("[Economy] %s unhooked.", economy.name));
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/net/milkbowl/vault/economy/plugins/Economy_Gringotts.java
Expand Up @@ -51,7 +51,7 @@ public Economy_Gringotts(Plugin plugin) {
Plugin grngts = plugin.getServer().getPluginManager().getPlugin("Gringotts");
if (grngts != null && grngts.isEnabled()) {
gringotts = (Gringotts) grngts;
log.info(String.format("[%s][Economy] %s hooked.", plugin.getDescription().getName(), name));
log.info(String.format("[Economy] %s hooked.", name));
}
}
}
Expand All @@ -70,7 +70,7 @@ public void onPluginEnable(PluginEnableEvent event) {

if (grngts.getDescription().getName().equals("Gringotts")) {
economy.gringotts = (Gringotts) grngts;
log.info(String.format("[%s][Economy] %s hooked.", plugin.getDescription().getName(), economy.name));
log.info(String.format("[Economy] %s hooked.", economy.name));
}
}
}
Expand All @@ -80,7 +80,7 @@ public void onPluginDisable(PluginDisableEvent event) {
if (economy.gringotts != null) {
if (event.getPlugin().getDescription().getName().equals("Gringotts")) {
economy.gringotts = null;
log.info(String.format("[%s][Economy] %s unhooked.", plugin.getDescription().getName(), economy.name));
log.info(String.format("[Economy] %s unhooked.", economy.name));
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/net/milkbowl/vault/economy/plugins/Economy_McMoney.java
Expand Up @@ -50,7 +50,7 @@ public Economy_McMoney(Plugin plugin) {
Plugin econ = plugin.getServer().getPluginManager().getPlugin("McMoney");
if (econ != null && econ.isEnabled()) {
economy = McMoneyAPI.getInstance();
log.info(String.format("[%s][Economy] %s hooked.", plugin.getDescription().getName(), name));
log.info(String.format("[Economy] %s hooked.", name));
}
}
}
Expand Down Expand Up @@ -116,7 +116,7 @@ public void onPluginEnable(PluginEnableEvent event) {

if (eco.getDescription().getName().equals("McMoney")) {
economy.economy = McMoneyAPI.getInstance();
log.info(String.format("[%s][Economy] %s hooked.", plugin.getDescription().getName(), economy.name));
log.info(String.format("[Economy] %s hooked.", economy.name));
}
}
}
Expand All @@ -126,7 +126,7 @@ public void onPluginDisable(PluginDisableEvent event) {
if (economy.economy != null) {
if (event.getPlugin().getDescription().getName().equals("McMoney")) {
economy.economy = null;
log.info(String.format("[%s][Economy] %s unhooked.", plugin.getDescription().getName(), economy.name));
log.info(String.format("[Economy] %s unhooked.", economy.name));
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/net/milkbowl/vault/economy/plugins/Economy_MiConomy.java
Expand Up @@ -56,7 +56,7 @@ public Economy_MiConomy(Plugin plugin) {
if (miConomy != null) {
miConomy = (Main) miConomyPlugin;
economy = miConomy.getInstance();
log.info(String.format("[%s][Economy] %s hooked.", plugin.getDescription().getName(), name));
log.info(String.format("[Economy] %s hooked.", name));
}
}
}
Expand Down Expand Up @@ -350,7 +350,7 @@ public void onPluginEnable(PluginEnableEvent event) {

economy.economy = miConomy.getInstance();

log.info(String.format("[%s][Economy] %s hooked.", plugin.getDescription().getName(), name));
log.info(String.format("[Economy] %s hooked.", name));
}
}
}
Expand All @@ -362,7 +362,7 @@ public void onPluginDisable(PluginDisableEvent event) {
economy.miConomy = null;
economy.economy = null;

log.info(String.format("[%s][Economy] %s unhooked.", plugin.getDescription().getName(), economy.name));
log.info(String.format("[Economy] %s unhooked.", economy.name));
}
}
}
Expand Down
Expand Up @@ -52,7 +52,7 @@ public Economy_MineConomy(Plugin plugin) {
Plugin econ = plugin.getServer().getPluginManager().getPlugin("MineConomy");
if (econ != null && econ.isEnabled()) {
this.econ = (MineConomy) econ;
log.info(String.format("[%s][Economy] %s hooked.", plugin.getDescription().getName(), name));
log.info(String.format("[Economy] %s hooked.", name));
}
}
}
Expand All @@ -71,7 +71,7 @@ public void onPluginEnable(PluginEnableEvent event) {

if (eco.getDescription().getName().equals("MineConomy")) {
economy.econ = (MineConomy) eco;
log.info(String.format("[%s][Economy] %s hooked.", plugin.getDescription().getName(), economy.name));
log.info(String.format("[Economy] %s hooked.", economy.name));
}
}
}
Expand All @@ -81,7 +81,7 @@ public void onPluginDisable(PluginDisableEvent event) {
if (economy.econ != null) {
if (event.getPlugin().getDescription().getName().equals("MineConomy")) {
economy.econ = null;
log.info(String.format("[%s][Economy] %s unhooked.", plugin.getDescription().getName(), economy.name));
log.info(String.format("[Economy] %s unhooked.", economy.name));
}
}
}
Expand Down