Difference between revisions of "SuperStats"

From PedroJM96 Wiki EN
Jump to: navigation, search
m
 
(17 intermediate revisions by the same user not shown)
Line 1: Line 1:
SuperStats is a plugin that collects data from different plugins on different servers to a database, and then is displayed in a menu on any server with a menu.
+
SuperStats is an add-on that collects data from many add-ons on different servers in a database, and then it is displayed on any server with a menu, with sing or on a web page.
  
 
==Placeholders Collected==
 
==Placeholders Collected==
Line 7: Line 7:
 
[[SuperStats:Placeholders Collected]]
 
[[SuperStats:Placeholders Collected]]
  
*[https://dev.bukkit.org/projects/ontime OnTime]
 
**ontime_lastlogin
 
**ontime_lastvote
 
**ontime_lastworld
 
**ontime_monthplay
 
**ontime_monthvotes
 
**ontime_points
 
**ontime_todayplay
 
**ontime_todayvotes
 
**ontime_totalplay>
 
**ontime_totalvotes
 
**ontime_weekplay
 
**ontime_weekvotes
 
  
*[https://www.spigotmc.org/resources/fe.723/ Fe]
+
==How to show the data==
**fe_balance
 
  
*[https://www.spigotmc.org/resources/nicky.590/ Nicky]
+
*For normal data:
**nicky_nick
+
**<stats_[placeholder]>
 +
**Example: <stats_skywarsx-wins>
  
*[https://dev.bukkit.org/projects/playerpoints PlayerPoints]
+
*For time data:
**playerpoints_value
+
**<stats_[placeholder]:timeformat>
 +
**Example: <stats_localstats-playtime:timeformat>
  
*[https://www.spigotmc.org/resources/%E2%9C%AA-supercredits-placeholderap-mvdwplaceholder-support-like-cubelets-%E2%9C%AA.31074/ SuperCredits]
+
*For data by servers:
**supercredits_value
+
**<stats_[placeholder]:[servername]>
 +
**Example: <stats_localstats-blocksbreak:survival>
  
*[https://www.spigotmc.org/resources/essentialsx.9089/ EssentialsX]
+
Change [placeholder] to one of the list
**essentials_homes
 
**essentials_nick
 
  
*[https://dev.bukkit.org/projects/give-anything-listener GAListener]
+
==Installation==
**galistener_lastvote
+
*Copy the JAR file in the directory of plugins
**galistener_vote
+
*Restart the server to install.
 +
*(Optional) Install the Web Addon [https://www.spigotmc.org/resources/%E2%9C%AA-superstats-%E2%9C%AA-web-addon.46810/ ✪ SuperStats ✪ Web Addon]
 +
*To display data on the web page
 +
*And enjoy the plugin!.
  
*[https://dev.bukkit.org/projects/permissionsex PermissionsEx]
+
==Tutorial==
**permissionsex_prefix
+
*Install the plugin on all servers
**permissionsex_suffix
+
*Configure the servers where you want to collect data (example: SkyWars, PVP, SkyBlock)
 +
**Configure the stats according to the installed plugin and the data to collect (Example: in the SkyWars server I configure the stats of a SkyWars plugin)
 +
**To configure the stats of a plugin fence to the stats folder and edit the configuration that has the name of the plugin. Set hook to true and the identifiers to use to true. (Example: kill = true, score = true)
 +
*Set up on the lobby server with the same database as the other servers and have access to all placeholders of the plugins installed on another server.
  
*[https://dev.bukkit.org/projects/pvp-stats PVPStats]
+
==Commands==
**pvpstats_death
 
**pvpstats_eloscore
 
**pvpstats_kdr
 
**pvpstats_kills
 
**pvpstats_maxstreak
 
  
*[https://www.spigotmc.org/resources/%E2%9C%AA-referralsystem-mysql-sqlite-placeholderapi-and-leaderheads-%E2%9C%AA.29709/ ReferralSystem]
+
{| class="wikitable"
**referralsystem_points
+
! style="text-align:left;"| Commands!! Permissions!!Info
**referralsystem_referrals
+
|-
 +
/stats || superstats.use || Displays the statistics menu
 +
|-
 +
/statsreload || superstats.admin || to reload the configuration
 +
|}
  
*[https://dev.bukkit.org/projects/scoreboardstats ScoreboardStats]
+
==Permissions==
**scoreboardstats_death
 
**scoreboardstats_kdr
 
**scoreboardstats_kills
 
**scoreboardstats_killstreak
 
**scoreboardstats_mobkills
 
  
*[https://dev.bukkit.org/projects/vault Vault]
+
{| class="wikitable"
**vault_balance
+
! style="text-align:left;"| Permissions!!Info
**vault_rank
+
|-
 +
|  superstats.use || To use the stats command
 +
|-
 +
|  superstats.admin || To use the statsreload command
 +
|}
  
*[https://www.spigotmc.org/resources/askyblock.1220/ ASkyBlock]
+
==Configuration==
**askyblock_team_size
+
*[[SuperStats:config.yml|config.yml]]
**askyblock_level
+
*[[SuperStats:statsmenu.yml|statsmenu.yml]]
**askyblock_island_x
 
**askyblock_island_y
 
**askyblock_island_z
 
**askyblock_island_world
 
  
*[https://www.spigotmc.org/resources/tokenmanager.8610/ TokenManager]
+
==Api==
**tokenmanager_tokens
+
This guide will show you how to register your own placeholders from your plugin.
  
*[https://dev.bukkit.org/projects/skywars-plugin SkyWars]
+
Create a register class
**skywars_score
 
**skywars_rank
 
  
*[https://www.spigotmc.org/resources/skywarsreloaded.3796/ SkyWarsReloaded]
+
<syntaxhighlight lang="Java">
**skywarsreloaded_wins
+
public class Example_Stats extends StatsHook {
**skywarsreloaded_kills
+
public Example_Stats(JavaPlugin plugin) {
**skywarsreloaded_deaths
+
//super(plugin,false,Name for the plugin configuration,List of data to collect)
**skywarsreloaded_gamesplayed
+
    super(plugin,false,"Example_Stats",Arrays.asList("example1","example2"));
**skywarsreloaded_score
+
}
**skywarsreloaded_blocksplaced
+
**skywarsreloaded_balance
+
@Override
 +
public String onStatsRequest(Player paramPlayer, String stats) {
 +
    if (paramPlayer == null) {
 +
        return null;
 +
        }
 +
 +
    if(stats.equals("example1")){
 +
return String.valueOf("Example Stats 1");
 +
    }
 +
 +
    if(stats.equals("example2")){
 +
return String.valueOf("Example Stats 2");
 +
    }
 +
   
 +
    return null;
 +
    }
  
*[https://www.spigotmc.org/resources/island-world-skyblock-replacement.2757/ IslandWorld]
+
    @Override
**islandworld_points
+
public String getIdentifier() {
**islandworld_level
+
    // TODO Auto-generated method stub
 +
return "example";
 +
}
 +
}
 +
</syntaxhighlight>
  
*[https://www.spigotmc.org/resources/uskyblock.2280/ uSkyBlock]
+
Register the class in the onEnable ()
**uskyblock_level
 
  
*[https://www.spigotmc.org/resources/tntrun-recoded-bungee-multi-mode-leaderheads-mysql-scoreboard-api-much-more.7320/ TNTRun]
+
<syntaxhighlight lang="Java">
**tntrun_wins
+
public void onEnable(){
**tntrun_losses
+
    //SuperStats.registerPlaceholderStats(The class that collects the data);
**tntrun_games
+
    SuperStats.registerPlaceholderStats(new Example_Stats(this));
**tntrun_blocksdestroyed
+
 +
}
 +
</syntaxhighlight>
  
*[https://dev.bukkit.org/projects/pvp-1vs1 PVP1vs1]
+
The variables that register are.
**pvp1vs1_wins
 
**pvp1vs1_losses
 
  
*[https://www.spigotmc.org/resources/wickedskywars.556/ WickedSkyWars]
+
*example_example1
**wickedskywars_score
+
*example_example2
**wickedskywars_played
 
**wickedskywars_wins
 
**wickedskywars_kills
 
**wickedskywars_deaths
 
 
 
*[https://www.spigotmc.org/resources/duels.20171/ Duels]
 
*duels_wins
 
*duels_losses
 
 
 
*[https://www.spigotmc.org/resources/50-off-neoskywars-stats-kits-shop-mysql-multiarena-solo-team-mega-normal-and-insane-mode.35242/ NeoSkyWars]
 
**neoskywars_souls
 
**neoskywars_games
 
**neoskywars_wins
 
**neoskywars_kills
 
**neoskywars_deaths
 
**neoskywars_coins
 
 
 
*[https://www.spigotmc.org/resources/kitbattle-advanced-40-xmas-sale.2872/ KitBattle Advanced]
 
**kitbattle_deaths
 
**kitbattle_kills
 
**kitbattle_killstreak
 
**kitbattle_exp
 
**kitbattle_rank
 
**kitbattle_next_rank
 
 
 
*LocalStats by the SuperStars plugin
 
**localstats_blocksbreak
 
**localstats_blocksplaced
 
**localstats_kills
 
**localstats_deaths
 
**Per server support
 
***localstats_blocksbreak:servername
 
***localstats_blocksplaced:servername
 
***localstats_kills:servername
 
***localstats_deaths:servername
 
 
 
*[https://www.spigotmc.org/resources/skywars-33-off-1%CC%B65%CC%B6-usd.6525/ SkyWarsByCookLoco]
 
**skywars-cookloco_coins
 
**skywars-cookloco_deaths
 
**skywars-cookloco_kills
 
**skywars-cookloco_wins
 
**skywars-cookloco_played
 
**skywars-cookloco_arrow_shot
 
**skywars-cookloco_arrow_hit
 
**skywars-cookloco_blocks_broken
 
**skywars-cookloco_blocks_placed
 
**skywars-cookloco_distance_walked
 
**skywars-cookloco_time_played
 
 
 
*[https://www.spigotmc.org/resources/votingplugin.15358/ VotingPlugin]
 
**votingplugin_total_all
 
**votingplugin_total_month
 
**votingplugin_total_week
 
**votingplugin_total_daily
 
**votingplugin_points
 
 
 
*[https://www.spigotmc.org/resources/killstats.2098/ killStats]
 
**killstats_killsl
 
**killstats_deaths
 
**killstats_streak
 
**killstats_ratio
 
 
 
*[https://www.spigotmc.org/resources/battlelevels.2218/ BattleLevels]
 
**battlelevels_score
 
**battlelevels_deaths
 
**battlelevels_killstreak
 
**battlelevels_level
 
**battlelevels_kills
 
**battlelevels_kdr
 

Latest revision as of 22:17, 17 March 2018

SuperStats is an add-on that collects data from many add-ons on different servers in a database, and then it is displayed on any server with a menu, with sing or on a web page.

Placeholders Collected

What information you collect from the plugins. This add-on will collect the following placeholder.

SuperStats:Placeholders Collected


How to show the data

  • For normal data:
    • <stats_[placeholder]>
    • Example: <stats_skywarsx-wins>
  • For time data:
    • <stats_[placeholder]:timeformat>
    • Example: <stats_localstats-playtime:timeformat>
  • For data by servers:
    • <stats_[placeholder]:[servername]>
    • Example: <stats_localstats-blocksbreak:survival>

Change [placeholder] to one of the list

Installation

  • Copy the JAR file in the directory of plugins
  • Restart the server to install.
  • (Optional) Install the Web Addon ✪ SuperStats ✪ Web Addon
  • To display data on the web page
  • And enjoy the plugin!.

Tutorial

  • Install the plugin on all servers
  • Configure the servers where you want to collect data (example: SkyWars, PVP, SkyBlock)
    • Configure the stats according to the installed plugin and the data to collect (Example: in the SkyWars server I configure the stats of a SkyWars plugin)
    • To configure the stats of a plugin fence to the stats folder and edit the configuration that has the name of the plugin. Set hook to true and the identifiers to use to true. (Example: kill = true, score = true)
  • Set up on the lobby server with the same database as the other servers and have access to all placeholders of the plugins installed on another server.

Commands

Commands Permissions Info
/stats superstats.use Displays the statistics menu
/statsreload superstats.admin to reload the configuration

Permissions

Permissions Info
superstats.use To use the stats command
superstats.admin To use the statsreload command

Configuration

Api

This guide will show you how to register your own placeholders from your plugin.

Create a register class

public class Example_Stats extends StatsHook {
	public Example_Stats(JavaPlugin plugin) {
		//super(plugin,false,Name for the plugin configuration,List of data to collect)	
    	super(plugin,false,"Example_Stats",Arrays.asList("example1","example2"));	
	}
 
	@Override
	public String onStatsRequest(Player paramPlayer, String stats) {
    	if (paramPlayer == null) {
        	return null;
        }
 
	    if(stats.equals("example1")){
			return String.valueOf("Example Stats 1");	
	    }
 
	    if(stats.equals("example2")){
			return String.valueOf("Example Stats 2");
	    }
	    
	    return null;
     }

    @Override
	public String getIdentifier() {
    	// TODO Auto-generated method stub
		return "example";
	}
}

Register the class in the onEnable ()

public void onEnable(){
    //SuperStats.registerPlaceholderStats(The class that collects the data);
    SuperStats.registerPlaceholderStats(new Example_Stats(this));
 
}

The variables that register are.

  • example_example1
  • example_example2