Skip to content

Commit

Permalink
Changed the permissions system
Browse files Browse the repository at this point in the history
  • Loading branch information
ibhh committed Mar 26, 2013
1 parent 5364ded commit 5a33a2b
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 247 deletions.
37 changes: 2 additions & 35 deletions src/me/ibhh/xpShop/MetricsHandler.java
Expand Up @@ -113,22 +113,19 @@ private void initializeGraphs() {
public void initializeOthers() {
Metrics.Graph ShopCountGraph = metrics.createGraph("Signs");
ShopCountGraph.addPlotter(new Metrics.Plotter("xpShopSigns") {

@Override
public int getValue() {
return calculateShopQuantity();
}
});
ShopCountGraph.addPlotter(new Metrics.Plotter("xpShopSafes") {

@Override
public int getValue() {
return calculateSafeQuantity();
}
});
Metrics.Graph GMGraph = metrics.createGraph("DefaultGameMode");
GMGraph.addPlotter(new Metrics.Plotter(plugin.getServer().getDefaultGameMode().name()) {

@Override
public int getValue() {
return 1;
Expand All @@ -139,7 +136,6 @@ public int getValue() {
private void initializeCommandGraph() {
Metrics.Graph CMDUses = metrics.createGraph("CommandUses");
CMDUses.addPlotter(new Metrics.Plotter("Buy") {

@Override
public int getValue() {
return buy;
Expand All @@ -151,7 +147,6 @@ public void reset() {
}
});
CMDUses.addPlotter(new Metrics.Plotter("Sell") {

@Override
public int getValue() {
return sell;
Expand All @@ -163,7 +158,6 @@ public void reset() {
}
});
CMDUses.addPlotter(new Metrics.Plotter("Buylevel") {

@Override
public int getValue() {
return buylevel;
Expand All @@ -175,7 +169,6 @@ public void reset() {
}
});
CMDUses.addPlotter(new Metrics.Plotter("Selllevel") {

@Override
public int getValue() {
return selllevel;
Expand All @@ -187,7 +180,6 @@ public void reset() {
}
});
CMDUses.addPlotter(new Metrics.Plotter("Send") {

@Override
public int getValue() {
return send;
Expand All @@ -199,7 +191,6 @@ public void reset() {
}
});
CMDUses.addPlotter(new Metrics.Plotter("Grand") {

@Override
public int getValue() {
return grand;
Expand All @@ -211,7 +202,6 @@ public void reset() {
}
});
CMDUses.addPlotter(new Metrics.Plotter("Infoxp") {

@Override
public int getValue() {
return infoxp;
Expand All @@ -223,7 +213,6 @@ public void reset() {
}
});
CMDUses.addPlotter(new Metrics.Plotter("Infolevel") {

@Override
public int getValue() {
return infolevel;
Expand All @@ -235,7 +224,6 @@ public void reset() {
}
});
CMDUses.addPlotter(new Metrics.Plotter("Info") {

@Override
public int getValue() {
return info;
Expand All @@ -247,7 +235,6 @@ public void reset() {
}
});
CMDUses.addPlotter(new Metrics.Plotter("Bottle") {

@Override
public int getValue() {
return bottle;
Expand All @@ -259,7 +246,6 @@ public void reset() {
}
});
CMDUses.addPlotter(new Metrics.Plotter("Toolinfo") {

@Override
public int getValue() {
return toolinfo;
Expand All @@ -271,7 +257,6 @@ public void reset() {
}
});
CMDUses.addPlotter(new Metrics.Plotter("Repair") {

@Override
public int getValue() {
return repair;
Expand All @@ -283,7 +268,6 @@ public void reset() {
}
});
CMDUses.addPlotter(new Metrics.Plotter("TPto") {

@Override
public int getValue() {
return tpto;
Expand All @@ -295,7 +279,6 @@ public void reset() {
}
});
CMDUses.addPlotter(new Metrics.Plotter("TPme") {

@Override
public int getValue() {
return tpme;
Expand All @@ -307,7 +290,6 @@ public void reset() {
}
});
CMDUses.addPlotter(new Metrics.Plotter("xpShopSignBuy") {

@Override
public int getValue() {
return xpShopSignBuy;
Expand All @@ -319,7 +301,6 @@ public void reset() {
}
});
CMDUses.addPlotter(new Metrics.Plotter("xpShopSignSell") {

@Override
public int getValue() {
return xpShopSignSell;
Expand All @@ -331,7 +312,6 @@ public void reset() {
}
});
CMDUses.addPlotter(new Metrics.Plotter("xpShopSafeGet") {

@Override
public int getValue() {
return xpShopSafeGet;
Expand All @@ -343,7 +323,6 @@ public void reset() {
}
});
CMDUses.addPlotter(new Metrics.Plotter("xpShopSafeStore") {

@Override
public int getValue() {
return xpShopSafeStore;
Expand Down Expand Up @@ -371,27 +350,15 @@ public void initializeDependenciesGraph() {
}
}
depGraph.addPlotter(new Metrics.Plotter(iConomyName) {

@Override
public int getValue() {
return 1;
}
});
Metrics.Graph Permgraph = metrics.createGraph("PermissionDependencies");
String PermName = "None";
if (plugin.PermissionsHandler.PermPlugin != 0) {
if (plugin.PermissionsHandler.PermPlugin == 1) {
PermName = "BukkitPermissions";
} else if (plugin.PermissionsHandler.PermPlugin == 2) {
PermName = "PermissionsEX";
} else if (plugin.PermissionsHandler.PermPlugin == 3) {
PermName = "GroupManager";
} else if (plugin.PermissionsHandler.PermPlugin == 4) {
PermName = "bPermissions";
}
}
String PermName;
PermName = "BukkitPermissions";
Permgraph.addPlotter(new Metrics.Plotter(PermName) {

@Override
public int getValue() {
return 1;
Expand Down

0 comments on commit 5a33a2b

Please sign in to comment.