<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.traincarts.net/index.php?action=history&amp;feed=atom&amp;title=BKCommonLib%2FMetrics</id>
	<title>BKCommonLib/Metrics - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.traincarts.net/index.php?action=history&amp;feed=atom&amp;title=BKCommonLib%2FMetrics"/>
	<link rel="alternate" type="text/html" href="https://wiki.traincarts.net/index.php?title=BKCommonLib/Metrics&amp;action=history"/>
	<updated>2026-04-29T20:37:40Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.13</generator>
	<entry>
		<id>https://wiki.traincarts.net/index.php?title=BKCommonLib/Metrics&amp;diff=7854&amp;oldid=prev</id>
		<title>RyanDo at 09:47, 12 October 2025</title>
		<link rel="alternate" type="text/html" href="https://wiki.traincarts.net/index.php?title=BKCommonLib/Metrics&amp;diff=7854&amp;oldid=prev"/>
		<updated>2025-10-12T09:47:40Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 09:47, 12 October 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[BKCommonLib|« Go back]]&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Update|BKCommonLib|10 June 2021|reason=BKCommonLib now uses bStats metrics.|date=16 June 2023}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Update|BKCommonLib|10 June 2021|reason=BKCommonLib now uses bStats metrics.|date=16 June 2023}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Introduction==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Introduction==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[https://dev.bukkit.org/linkout?remoteUrl=https%253a%252f%252fmcstats.org%252f Metrics] is a service provided by &amp;#039;&amp;#039;&amp;#039;Hidendra&amp;#039;&amp;#039;&amp;#039; to keep track of plugin statistics. It allows plugin developers to see who uses their plugin the most, and to keep track of certain features. This makes it easier to decide on new features and to see what parts of the plugin really matter to most people. The data is sent anonymously, that is, no server IP/player names/personal information is sent to the database.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[https://dev.bukkit.org/linkout?remoteUrl=https%253a%252f%252fmcstats.org%252f Metrics] is a service provided by &amp;#039;&amp;#039;&amp;#039;Hidendra&amp;#039;&amp;#039;&amp;#039; to keep track of plugin statistics. It allows plugin developers to see who uses their plugin the most, and to keep track of certain features. This makes it easier to decide on new features and to see what parts of the plugin really matter to most people. The data is sent anonymously, that is, no server IP/player names/personal information is sent to the database.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key pulseco1_mediawiki:diff::1.12:old-2457:rev-7854 --&gt;
&lt;/table&gt;</summary>
		<author><name>RyanDo</name></author>
	</entry>
	<entry>
		<id>https://wiki.traincarts.net/index.php?title=BKCommonLib/Metrics&amp;diff=2457&amp;oldid=prev</id>
		<title>Bbayu: Mark page as outdated</title>
		<link rel="alternate" type="text/html" href="https://wiki.traincarts.net/index.php?title=BKCommonLib/Metrics&amp;diff=2457&amp;oldid=prev"/>
		<updated>2023-09-26T00:43:11Z</updated>

		<summary type="html">&lt;p&gt;Mark page as outdated&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 00:43, 26 September 2023&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[BKCommonLib|« Go back]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[BKCommonLib|« Go back]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{Update|BKCommonLib|10 June 2021|reason=BKCommonLib now uses bStats metrics.|date=16 June 2023}}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Introduction==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Introduction==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key pulseco1_mediawiki:diff::1.12:old-1541:rev-2457 --&gt;
&lt;/table&gt;</summary>
		<author><name>Bbayu</name></author>
	</entry>
	<entry>
		<id>https://wiki.traincarts.net/index.php?title=BKCommonLib/Metrics&amp;diff=1541&amp;oldid=prev</id>
		<title>RyanDo at 18:51, 9 June 2021</title>
		<link rel="alternate" type="text/html" href="https://wiki.traincarts.net/index.php?title=BKCommonLib/Metrics&amp;diff=1541&amp;oldid=prev"/>
		<updated>2021-06-09T18:51:27Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:51, 9 June 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l15&quot;&gt;Line 15:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 15:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=PluginBase=&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;==&lt;/ins&gt;=PluginBase&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;==&lt;/ins&gt;=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you use [[BKCommonLib/PluginBase|PluginBase]] for your plugin, all you have to do is add &amp;#039;metrics: true&amp;#039; to the plugin.yml of the plugin. After that you can obtain the Metrics instance using the provided &amp;#039;&amp;#039;&amp;#039;getMetrics()&amp;#039;&amp;#039;&amp;#039; method. Before using it, check that metrics is available (and enabled) using the &amp;#039;&amp;#039;&amp;#039;hasMetrics()&amp;#039;&amp;#039;&amp;#039; method, otherwise errors will occur.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you use [[BKCommonLib/PluginBase|PluginBase]] for your plugin, all you have to do is add &amp;#039;metrics: true&amp;#039; to the plugin.yml of the plugin. After that you can obtain the Metrics instance using the provided &amp;#039;&amp;#039;&amp;#039;getMetrics()&amp;#039;&amp;#039;&amp;#039; method. Before using it, check that metrics is available (and enabled) using the &amp;#039;&amp;#039;&amp;#039;hasMetrics()&amp;#039;&amp;#039;&amp;#039; method, otherwise errors will occur.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=Manually=&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;==&lt;/ins&gt;=Manually&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;==&lt;/ins&gt;=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;To manually create a new Metrics instance, use the following code:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;To manually create a new Metrics instance, use the following code:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key pulseco1_mediawiki:diff::1.12:old-1540:rev-1541 --&gt;
&lt;/table&gt;</summary>
		<author><name>RyanDo</name></author>
	</entry>
	<entry>
		<id>https://wiki.traincarts.net/index.php?title=BKCommonLib/Metrics&amp;diff=1540&amp;oldid=prev</id>
		<title>RyanDo at 18:50, 9 June 2021</title>
		<link rel="alternate" type="text/html" href="https://wiki.traincarts.net/index.php?title=BKCommonLib/Metrics&amp;diff=1540&amp;oldid=prev"/>
		<updated>2021-06-09T18:50:40Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:50, 9 June 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[BKCommonLib|« Go back]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Introduction==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Introduction==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[https://dev.bukkit.org/linkout?remoteUrl=https%253a%252f%252fmcstats.org%252f Metrics] is a service provided by &amp;#039;&amp;#039;&amp;#039;Hidendra&amp;#039;&amp;#039;&amp;#039; to keep track of plugin statistics. It allows plugin developers to see who uses their plugin the most, and to keep track of certain features. This makes it easier to decide on new features and to see what parts of the plugin really matter to most people. The data is sent anonymously, that is, no server IP/player names/personal information is sent to the database.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[https://dev.bukkit.org/linkout?remoteUrl=https%253a%252f%252fmcstats.org%252f Metrics] is a service provided by &amp;#039;&amp;#039;&amp;#039;Hidendra&amp;#039;&amp;#039;&amp;#039; to keep track of plugin statistics. It allows plugin developers to see who uses their plugin the most, and to keep track of certain features. This makes it easier to decide on new features and to see what parts of the plugin really matter to most people. The data is sent anonymously, that is, no server IP/player names/personal information is sent to the database.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key pulseco1_mediawiki:diff::1.12:old-1539:rev-1540 --&gt;
&lt;/table&gt;</summary>
		<author><name>RyanDo</name></author>
	</entry>
	<entry>
		<id>https://wiki.traincarts.net/index.php?title=BKCommonLib/Metrics&amp;diff=1539&amp;oldid=prev</id>
		<title>RyanDo: Created page with &quot;==Introduction== [https://dev.bukkit.org/linkout?remoteUrl=https%253a%252f%252fmcstats.org%252f Metrics] is a service provided by &#039;&#039;&#039;Hidendra&#039;&#039;&#039; to keep track of plugin statis...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.traincarts.net/index.php?title=BKCommonLib/Metrics&amp;diff=1539&amp;oldid=prev"/>
		<updated>2021-06-09T18:50:20Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==Introduction== [https://dev.bukkit.org/linkout?remoteUrl=https%253a%252f%252fmcstats.org%252f Metrics] is a service provided by &amp;#039;&amp;#039;&amp;#039;Hidendra&amp;#039;&amp;#039;&amp;#039; to keep track of plugin statis...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Introduction==&lt;br /&gt;
[https://dev.bukkit.org/linkout?remoteUrl=https%253a%252f%252fmcstats.org%252f Metrics] is a service provided by &amp;#039;&amp;#039;&amp;#039;Hidendra&amp;#039;&amp;#039;&amp;#039; to keep track of plugin statistics. It allows plugin developers to see who uses their plugin the most, and to keep track of certain features. This makes it easier to decide on new features and to see what parts of the plugin really matter to most people. The data is sent anonymously, that is, no server IP/player names/personal information is sent to the database.&lt;br /&gt;
&lt;br /&gt;
You do not want to participate in this as a server? Aw...oh well, you can opt-out on Metrics globally in the metrics configuration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;plugins\PluginMetrics\config.yml &amp;lt; change opt-out: to true.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Metrics in BKCommonLib==&lt;br /&gt;
A Metrics implementation, almost entirely similar as the one provided by mcstats, is included in BKCommonLib. It provides an easy API layer to set up the data you wish to send to the server. Instead of scheduling a task to update it every other time, or having synchronization issues, the Metrics implementation in BKCommonLib works slightly differently.&lt;br /&gt;
&lt;br /&gt;
==Creating Metrics for your plugin==&lt;br /&gt;
How to obtain a [https://github.com/bergerkiller/BKCommonLib/blob/master/src/main/java/com/bergerkiller/bukkit/common/metrics/Metrics.java Metrics] class instance to use it in your plugin.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=PluginBase=&lt;br /&gt;
If you use [[BKCommonLib/PluginBase|PluginBase]] for your plugin, all you have to do is add &amp;#039;metrics: true&amp;#039; to the plugin.yml of the plugin. After that you can obtain the Metrics instance using the provided &amp;#039;&amp;#039;&amp;#039;getMetrics()&amp;#039;&amp;#039;&amp;#039; method. Before using it, check that metrics is available (and enabled) using the &amp;#039;&amp;#039;&amp;#039;hasMetrics()&amp;#039;&amp;#039;&amp;#039; method, otherwise errors will occur.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Manually=&lt;br /&gt;
To manually create a new Metrics instance, use the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Metrics metrics = Metrics.initialize(this);&lt;br /&gt;
if (metrics != null) {&lt;br /&gt;
    // Add your graphs here&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can also create a new Metrics instance using the provided constructor, and handle the errors yourself. In that case, make sure you also call start() once all graphs are added. The initialize method does that for you.&lt;br /&gt;
&lt;br /&gt;
==Adding graphs==&lt;br /&gt;
Graphs in this implementation work slightly different than the ones found elsewhere. In BKCommonLib, Metrics graphs contain an &amp;#039;&amp;#039;&amp;#039;onUpdate&amp;#039;&amp;#039;&amp;#039; method in which the values can be set. It also does not contain a &amp;#039;Plotter&amp;#039; class, instead it uses a map of values. it is up to the plugin to fill or update the data in the graph. The &amp;#039;&amp;#039;&amp;#039;onUpdate&amp;#039;&amp;#039;&amp;#039; method is called on the main thread (synchronized), so it is thread-safe to access Bukkit or plugin resources.&lt;br /&gt;
&lt;br /&gt;
To add a graph, use &amp;#039;&amp;#039;&amp;#039;Metrics.addGraph&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
==Changing plotter values in graphs==&lt;br /&gt;
A plotter value is basically a single value for part of a graph displayed on [https://mcstats.org mcstats.org]. For example, if you have a Commands graph, you can add plotter values for all commands the plugin provides, mapped to the amount of times it was performed.&lt;br /&gt;
&lt;br /&gt;
Plotter values have to be numeric (int, double, float, etc.), non-numeric text is not possible simply because it can&amp;#039;t be displayed in a graph.&lt;br /&gt;
&lt;br /&gt;
There are several methods to change &amp;#039;plotter&amp;#039; values:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;clearPlotters&amp;#039;&amp;#039;&amp;#039; - removes all set plotters&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;togglePlotter&amp;#039;&amp;#039;&amp;#039; - Adds a plotter with value &amp;#039;1&amp;#039; if enabled, or removes the plotter if disabled&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;addPlotter&amp;#039;&amp;#039;&amp;#039; - Adds a plotter mapping the value to a key&lt;br /&gt;
&lt;br /&gt;
Example graph implementation (found in enable() of a PluginBase):&lt;br /&gt;
&amp;lt;pre&amp;gt;// Total server memory&lt;br /&gt;
getMetrics().addGraph(new Graph(&amp;quot;Total server memory&amp;quot;) {&lt;br /&gt;
    @Override&lt;br /&gt;
    public void onUpdate(Plugin plugin) {&lt;br /&gt;
        clearPlotters();&lt;br /&gt;
        // Get server total memory in MB (&amp;gt;&amp;gt; 20 = / (1024 * 1024))&lt;br /&gt;
        final long mem = Runtime.getRuntime().totalMemory() &amp;gt;&amp;gt; 20;&lt;br /&gt;
        final String key;&lt;br /&gt;
        if (mem &amp;lt;= 512) {&lt;br /&gt;
            key = &amp;quot;0-512 MB&amp;quot;;&lt;br /&gt;
        } else if (mem &amp;lt;= 1024) {&lt;br /&gt;
            key = &amp;quot;512-1024 MB&amp;quot;;&lt;br /&gt;
        } else if (mem &amp;lt;= 2048) {&lt;br /&gt;
            key = &amp;quot;1024-2048 MB&amp;quot;;&lt;br /&gt;
        } else if (mem &amp;lt;= 4096) {&lt;br /&gt;
            key = &amp;quot;2048-4096 MB&amp;quot;;&lt;br /&gt;
        } else if (mem &amp;lt;= 8192) {&lt;br /&gt;
            key = &amp;quot;4096-8192 MB&amp;quot;;&lt;br /&gt;
        } else if (mem &amp;lt;= 16384) {&lt;br /&gt;
            key = &amp;quot;8-16 GB&amp;quot;;&lt;br /&gt;
        } else {&lt;br /&gt;
            key = &amp;quot;16+ GB&amp;quot;;&lt;br /&gt;
        }&lt;br /&gt;
        togglePlotter(key, true);&lt;br /&gt;
    }&lt;br /&gt;
});&amp;lt;/pre&amp;gt;&lt;br /&gt;
This produces a graph as follows (pie chart): Total server memory - Pie chart&lt;br /&gt;
&lt;br /&gt;
==Default graph implementations==&lt;br /&gt;
BKCommonLib also includes some &amp;#039;common&amp;#039; Graph implementations. These are:&lt;br /&gt;
* [https://github.com/bergerkiller/BKCommonLib/blob/master/src/main/java/com/bergerkiller/bukkit/common/metrics/MyDependingPluginsGraph.java MyDependingPluginsGraph] - shows the plugins depending on your plugin&lt;br /&gt;
* [https://github.com/bergerkiller/BKCommonLib/blob/master/src/main/java/com/bergerkiller/bukkit/common/metrics/SoftDependenciesGraph.java SoftDependenciesGraph] - shows the plugins enabled that your plugin has a soft dependency on&lt;br /&gt;
&lt;br /&gt;
Important notes&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;onUpdate&amp;#039;&amp;#039;&amp;#039; is not called if the server opted out, also if the server opted out after your metrics instance was started.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;getMetrics()&amp;#039;&amp;#039;&amp;#039; throws an exception if no metrics is available - use &amp;#039;&amp;#039;&amp;#039;hasMetrics()&amp;#039;&amp;#039;&amp;#039; before using it&lt;br /&gt;
* To use metrics in &amp;#039;&amp;#039;&amp;#039;PluginBase&amp;#039;&amp;#039;&amp;#039;, add the &amp;#039;&amp;#039;&amp;#039;metrics: true&amp;#039;&amp;#039;&amp;#039; to the plugin.yml. By default metrics is disabled.&lt;br /&gt;
* Only use numeric plotter values&lt;/div&gt;</summary>
		<author><name>RyanDo</name></author>
	</entry>
</feed>