mirror of
https://github.com/essentials/Essentials.git
synced 2025-09-25 21:59:08 +02:00
Don't push vault version to metrics.
This commit is contained in:
@@ -24,7 +24,7 @@ public class EssentialsPluginListener implements Listener, IConf
|
|||||||
ess.getAlternativeCommandsHandler().addPlugin(event.getPlugin());
|
ess.getAlternativeCommandsHandler().addPlugin(event.getPlugin());
|
||||||
if (!ess.getPaymentMethod().hasMethod() && ess.getPaymentMethod().setMethod(ess.getServer().getPluginManager()))
|
if (!ess.getPaymentMethod().hasMethod() && ess.getPaymentMethod().setMethod(ess.getServer().getPluginManager()))
|
||||||
{
|
{
|
||||||
ess.getLogger().log(Level.INFO, "Payment method found (" + ess.getPaymentMethod().getMethod().getName() + " version: " + ess.getPaymentMethod().getMethod().getVersion() + ")");
|
ess.getLogger().log(Level.INFO, "Payment method found (" + ess.getPaymentMethod().getMethod().getLongName() + " version: " + ess.getPaymentMethod().getMethod().getVersion() + ")");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -4,6 +4,7 @@ import com.earth2me.essentials.IEssentials;
|
|||||||
import com.earth2me.essentials.metrics.Metrics.Graph;
|
import com.earth2me.essentials.metrics.Metrics.Graph;
|
||||||
import com.earth2me.essentials.metrics.Metrics.Plotter;
|
import com.earth2me.essentials.metrics.Metrics.Plotter;
|
||||||
import com.earth2me.essentials.register.payment.Method;
|
import com.earth2me.essentials.register.payment.Method;
|
||||||
|
import com.earth2me.essentials.register.payment.methods.VaultEco;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
@@ -150,12 +151,19 @@ public class MetricsStarter implements Runnable
|
|||||||
final Method method = ess.getPaymentMethod().getMethod();
|
final Method method = ess.getPaymentMethod().getMethod();
|
||||||
if (method != null)
|
if (method != null)
|
||||||
{
|
{
|
||||||
String version = method.getVersion();
|
String version;
|
||||||
|
if (method instanceof VaultEco) {
|
||||||
|
|
||||||
|
version = ((VaultEco)method).getEconomy();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
version = method.getVersion();
|
||||||
final int dashPosition = version.indexOf('-');
|
final int dashPosition = version.indexOf('-');
|
||||||
if (dashPosition > 0)
|
if (dashPosition > 0)
|
||||||
{
|
{
|
||||||
version = version.substring(0, dashPosition);
|
version = version.substring(0, dashPosition);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
depGraph.addPlotter(new SimplePlotter(method.getName() + " " + version));
|
depGraph.addPlotter(new SimplePlotter(method.getName() + " " + version));
|
||||||
}
|
}
|
||||||
depGraph.addPlotter(new SimplePlotter(ess.getPermissionsHandler().getName()));
|
depGraph.addPlotter(new SimplePlotter(ess.getPermissionsHandler().getName()));
|
||||||
|
@@ -34,6 +34,13 @@ public interface Method
|
|||||||
*/
|
*/
|
||||||
public String getName();
|
public String getName();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the reported name of this method.
|
||||||
|
*
|
||||||
|
* @return <code>String</code> Plugin name.
|
||||||
|
*/
|
||||||
|
public String getLongName();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the actual version of this method.
|
* Returns the actual version of this method.
|
||||||
*
|
*
|
||||||
|
@@ -29,6 +29,12 @@ public class BOSE6 implements Method
|
|||||||
return "BOSEconomy";
|
return "BOSEconomy";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getLongName()
|
||||||
|
{
|
||||||
|
return getName();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getVersion()
|
public String getVersion()
|
||||||
{
|
{
|
||||||
|
@@ -29,6 +29,12 @@ public class BOSE7 implements Method
|
|||||||
return "BOSEconomy";
|
return "BOSEconomy";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getLongName()
|
||||||
|
{
|
||||||
|
return getName();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getVersion()
|
public String getVersion()
|
||||||
{
|
{
|
||||||
|
@@ -29,6 +29,12 @@ public class MCUR implements Method
|
|||||||
return "MultiCurrency";
|
return "MultiCurrency";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getLongName()
|
||||||
|
{
|
||||||
|
return getName();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getVersion()
|
public String getVersion()
|
||||||
{
|
{
|
||||||
|
@@ -34,8 +34,18 @@ public class VaultEco implements Method
|
|||||||
@Override
|
@Override
|
||||||
public String getName()
|
public String getName()
|
||||||
{
|
{
|
||||||
|
return this.vault.getDescription().getName();
|
||||||
|
}
|
||||||
|
|
||||||
return this.vault.getDescription().getName().concat(" - Economy: ").concat(economy == null ? "NoEco" : economy.getName());
|
public String getEconomy()
|
||||||
|
{
|
||||||
|
return economy == null ? "NoEco" : economy.getName();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getLongName()
|
||||||
|
{
|
||||||
|
return getName().concat(" - Economy: ").concat(getEconomy());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@@ -29,6 +29,12 @@ public class iCo4 implements Method
|
|||||||
return "iConomy";
|
return "iConomy";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getLongName()
|
||||||
|
{
|
||||||
|
return getName();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getVersion()
|
public String getVersion()
|
||||||
{
|
{
|
||||||
|
@@ -32,6 +32,12 @@ public class iCo5 implements Method
|
|||||||
return "iConomy";
|
return "iConomy";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getLongName()
|
||||||
|
{
|
||||||
|
return getName();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getVersion()
|
public String getVersion()
|
||||||
{
|
{
|
||||||
|
@@ -31,6 +31,12 @@ public class iCo6 implements Method
|
|||||||
return "iConomy";
|
return "iConomy";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getLongName()
|
||||||
|
{
|
||||||
|
return getName();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getVersion()
|
public String getVersion()
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user