<?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%2FPluginBase</id>
	<title>BKCommonLib/PluginBase - 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%2FPluginBase"/>
	<link rel="alternate" type="text/html" href="https://wiki.traincarts.net/index.php?title=BKCommonLib/PluginBase&amp;action=history"/>
	<updated>2026-04-29T21:26:08Z</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/PluginBase&amp;diff=7855&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/PluginBase&amp;diff=7855&amp;oldid=prev"/>
		<updated>2025-10-12T09:47:56Z</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; 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;For more information, see also:&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;For more information, see also:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key pulseco1_mediawiki:diff::1.12:old-2454:rev-7855 --&gt;
&lt;/table&gt;</summary>
		<author><name>RyanDo</name></author>
	</entry>
	<entry>
		<id>https://wiki.traincarts.net/index.php?title=BKCommonLib/PluginBase&amp;diff=2454&amp;oldid=prev</id>
		<title>Bbayu: Update redirection links to main article</title>
		<link rel="alternate" type="text/html" href="https://wiki.traincarts.net/index.php?title=BKCommonLib/PluginBase&amp;diff=2454&amp;oldid=prev"/>
		<updated>2023-09-25T23:59:09Z</updated>

		<summary type="html">&lt;p&gt;Update redirection links to main article&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 23:59, 25 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-l5&quot;&gt;Line 5:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 5:&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;* [[BKCommonLib/Localization|Localization]]&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/Localization|Localization]]&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;BkCommonLib&lt;/del&gt;/PermissionDefaults|Permission Defaults]]&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;BKCommonLib&lt;/ins&gt;/PermissionDefaults|Permission Defaults]]&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;* [[BKCommonLib/Metrics|Metrics]]&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/Metrics|Metrics]]&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;PluginBase is a basic JavaPlugin base class that eases the use of Localization, Permissions, error handling, logging and more. The base implementation takes care of a lot of things going on in the background, including a BKCommonLib compatibility check.&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;PluginBase is a basic JavaPlugin base class that eases the use of Localization, Permissions, error handling, logging and more. The base implementation takes care of a lot of things going on in the background, including a BKCommonLib compatibility check.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key pulseco1_mediawiki:diff::1.12:old-1582:rev-2454 --&gt;
&lt;/table&gt;</summary>
		<author><name>Bbayu</name></author>
	</entry>
	<entry>
		<id>https://wiki.traincarts.net/index.php?title=BKCommonLib/PluginBase&amp;diff=1582&amp;oldid=prev</id>
		<title>Bergerkiller at 22:59, 26 July 2021</title>
		<link rel="alternate" type="text/html" href="https://wiki.traincarts.net/index.php?title=BKCommonLib/PluginBase&amp;diff=1582&amp;oldid=prev"/>
		<updated>2021-07-26T22:59:02Z</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 22:59, 26 July 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-l32&quot;&gt;Line 32:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 32:&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;         return Common.VERSION;&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;         return Common.VERSION;&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;     }&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;     }&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;&amp;gt;&lt;/del&gt;/pre&amp;gt;&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;&amp;lt;&lt;/ins&gt;/pre&amp;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;==BKCommonLib routines==&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 routines==&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;getMinimumLibVersion() has to be overrided when using this base class. This method tells BKCommonLib the minimum version this plugin supports, so a proper message can be sent to the end-user if BKCommonLib is outdated. This avoids needless dependency-related issues.&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;getMinimumLibVersion() has to be overrided when using this base class. This method tells BKCommonLib the minimum version this plugin supports, so a proper message can be sent to the end-user if BKCommonLib is outdated. This avoids needless dependency-related issues.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key pulseco1_mediawiki:diff::1.12:old-1536:rev-1582 --&gt;
&lt;/table&gt;</summary>
		<author><name>Bergerkiller</name></author>
	</entry>
	<entry>
		<id>https://wiki.traincarts.net/index.php?title=BKCommonLib/PluginBase&amp;diff=1536&amp;oldid=prev</id>
		<title>RyanDo at 18:32, 9 June 2021</title>
		<link rel="alternate" type="text/html" href="https://wiki.traincarts.net/index.php?title=BKCommonLib/PluginBase&amp;diff=1536&amp;oldid=prev"/>
		<updated>2021-06-09T18:32:23Z</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:32, 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-l86&quot;&gt;Line 86:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 86:&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;==Other==&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;==Other==&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;handle allows you to handle errors occurring in your plugin, which takes care of proper formatting and plugin disabling for critical errors&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;* &amp;#039;&amp;#039;&amp;#039;&lt;/ins&gt;handle&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#039;&amp;#039;&amp;#039; &lt;/ins&gt;allows you to handle errors occurring in your plugin, which takes care of proper formatting and plugin disabling for critical errors&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;log and logAction uses the plugin&amp;#039;s logger to write messages, it&amp;#039;s a simple shortcut&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;* &amp;#039;&amp;#039;&amp;#039;&lt;/ins&gt;log&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#039;&amp;#039;&amp;#039; &lt;/ins&gt;and &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#039;&amp;#039;&amp;#039;&lt;/ins&gt;logAction&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#039;&amp;#039;&amp;#039; &lt;/ins&gt;uses the plugin&amp;#039;s logger to write messages, it&amp;#039;s a simple shortcut&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;register methods allow you to register Bukkit or packet listeners, and to register commands/commandhandlers&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;* &amp;#039;&amp;#039;&amp;#039;&lt;/ins&gt;register&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#039;&amp;#039;&amp;#039; &lt;/ins&gt;methods allow you to register Bukkit or packet listeners, and to register commands/commandhandlers&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;getDataFile obtains a File object pointing to a file relative to the plugin &amp;#039;workspace&amp;#039; directory&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;* &amp;#039;&amp;#039;&amp;#039;&lt;/ins&gt;getDataFile&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#039;&amp;#039;&amp;#039; &lt;/ins&gt;obtains a File object pointing to a file relative to the plugin &amp;#039;workspace&amp;#039; directory&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;Properly disables other plugins depending on you before your plugin disables to avoid conflicts&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;Properly disables other plugins depending on you before your plugin disables to avoid conflicts&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;Handles enable, disable and command method errors automatically&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;Handles enable, disable and command method errors automatically&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key pulseco1_mediawiki:diff::1.12:old-1535:rev-1536 --&gt;
&lt;/table&gt;</summary>
		<author><name>RyanDo</name></author>
	</entry>
	<entry>
		<id>https://wiki.traincarts.net/index.php?title=BKCommonLib/PluginBase&amp;diff=1535&amp;oldid=prev</id>
		<title>RyanDo: Created page with &quot;« Go back  ==Introduction== For more information, see also:  * Localization * BkCommonLib/PermissionDefaults|Permission Default...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.traincarts.net/index.php?title=BKCommonLib/PluginBase&amp;diff=1535&amp;oldid=prev"/>
		<updated>2021-06-09T18:29:20Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&lt;a href=&quot;/p/BKCommonLib&quot; title=&quot;BKCommonLib&quot;&gt;« Go back&lt;/a&gt;  ==Introduction== For more information, see also:  * &lt;a href=&quot;/p/BKCommonLib/Localization&quot; title=&quot;BKCommonLib/Localization&quot;&gt;Localization&lt;/a&gt; * BkCommonLib/PermissionDefaults|Permission Default...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[BKCommonLib|« Go back]]&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
For more information, see also:&lt;br /&gt;
&lt;br /&gt;
* [[BKCommonLib/Localization|Localization]]&lt;br /&gt;
* [[BkCommonLib/PermissionDefaults|Permission Defaults]]&lt;br /&gt;
* [[BKCommonLib/Metrics|Metrics]]&lt;br /&gt;
PluginBase is a basic JavaPlugin base class that eases the use of Localization, Permissions, error handling, logging and more. The base implementation takes care of a lot of things going on in the background, including a BKCommonLib compatibility check.&lt;br /&gt;
&lt;br /&gt;
==Features==&lt;br /&gt;
All common plugin routines are taken care of. They will all be listed below. To use PluginBase in your plugin, simply instantiate it as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;public class MyPlugin extends PluginBase {&lt;br /&gt;
    @Override&lt;br /&gt;
    public void enable() {&lt;br /&gt;
        // Enable logic&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    @Override&lt;br /&gt;
    public void disable() {&lt;br /&gt;
        // Disable logic&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    @Override&lt;br /&gt;
    public boolean command(CommandSender sender, String command, String[] args) {&lt;br /&gt;
        return false;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    @Override&lt;br /&gt;
    public int getMinimumLibVersion() {&lt;br /&gt;
        return Common.VERSION;&lt;br /&gt;
    }&lt;br /&gt;
}&amp;gt;/pre&amp;gt;&lt;br /&gt;
==BKCommonLib routines==&lt;br /&gt;
getMinimumLibVersion() has to be overrided when using this base class. This method tells BKCommonLib the minimum version this plugin supports, so a proper message can be sent to the end-user if BKCommonLib is outdated. This avoids needless dependency-related issues.&lt;br /&gt;
&lt;br /&gt;
==Localization==&lt;br /&gt;
The localization() method is called before enabling and can be used to load Locale information to read/write from/to the Localization.yml. You can load single localization lines or an entire enumeration of them using the loadLocale and loadLocales methods. Examples:&lt;br /&gt;
&lt;br /&gt;
Loading localization lines one by one&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;@Override&lt;br /&gt;
public void localization() {&lt;br /&gt;
    loadLocale(&amp;quot;noperm&amp;quot;, ChatColor.RED + &amp;quot;You do not have permission!&amp;quot;);&lt;br /&gt;
    loadLocale(&amp;quot;nobuild&amp;quot;, ChatColor.RED + &amp;quot;You can not build here!&amp;quot;);&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
Loading localization lines from a class containing constants, or an enum&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;@Override&lt;br /&gt;
public void localization() {&lt;br /&gt;
    loadLocales(MyLocale.class);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public class MyLocale extends LocalizationEnum {&lt;br /&gt;
    public static final MyLocale NOPERM = new MyLocale(&amp;quot;noperm&amp;quot;, ChatColor.RED + &amp;quot;You do not have permission!&amp;quot;);&lt;br /&gt;
    public static final MyLocale NOBUILD = new MyLocale(&amp;quot;nobuild&amp;quot;, ChatColor.RED + &amp;quot;You can not build in world %0%!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    private Localization(String name, String defValue) {&lt;br /&gt;
        super(name, defValue);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    @Override&lt;br /&gt;
    public String get(String... arguments) {&lt;br /&gt;
        return MyPlugin.getInstance().getLocale(this.getName(), arguments);&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
The benefit of using a Locale class like the above is that you do not have to use getLocale(name), allowing you to get localization messages a lot easier. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;MyLocale.NOPERM.message(player);&lt;br /&gt;
MyLocale.NOBUILD.message(player, player.getWorld().getName());&amp;lt;/pre&amp;gt;&lt;br /&gt;
==Permission defaults==&lt;br /&gt;
It works exactly the same way localization works, but instead you override permissions() and use the loadPermission and loadPermissions methods. The equivalent enumeration class to use is called PermissionEnum. This enumeration automatically provides methods for permission checks, such as handle and has.&lt;br /&gt;
&lt;br /&gt;
==Commands==&lt;br /&gt;
BKCommonLib automatically gives you the name version command to display the currently running plugin and BKCommonLib version. It also takes care of permission issues, by using and handling the NoPermissionException. If this is thrown for the console, a message is displayed that the command is not possible for use in the console.&lt;br /&gt;
&lt;br /&gt;
==Dependencies==&lt;br /&gt;
The updateDependency method is called whenever a new plugin enables, and after your plugin has enabled it calls it once for all currently enabled plugins. It allows you to keep track of dependencies, or to change some internal settings to provide support.&lt;br /&gt;
&lt;br /&gt;
==Metrics==&lt;br /&gt;
You can automatically use Metrics by adding the following in the plugin.yml:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;metrics: true&amp;lt;/pre&amp;gt;&lt;br /&gt;
By default this is disabled. To use Metrics, call the provided hasMetrics and getMetrics methods. There is no need to start the Metrics instance when enabling, PluginBase does that for you. For more information about Metrics, see this page.&lt;br /&gt;
&lt;br /&gt;
==Other==&lt;br /&gt;
handle allows you to handle errors occurring in your plugin, which takes care of proper formatting and plugin disabling for critical errors&lt;br /&gt;
log and logAction uses the plugin&amp;#039;s logger to write messages, it&amp;#039;s a simple shortcut&lt;br /&gt;
register methods allow you to register Bukkit or packet listeners, and to register commands/commandhandlers&lt;br /&gt;
getDataFile obtains a File object pointing to a file relative to the plugin &amp;#039;workspace&amp;#039; directory&lt;br /&gt;
Properly disables other plugins depending on you before your plugin disables to avoid conflicts&lt;br /&gt;
Handles enable, disable and command method errors automatically&lt;/div&gt;</summary>
		<author><name>RyanDo</name></author>
	</entry>
</feed>