import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DMuZ8-s6.js";const y=JSON.parse('{"title":"API Informatie","description":"API informatie over de ultimate kingdom plugin","frontmatter":{"lastUpdated":true,"aside":true,"sidebar":true,"sidebarDepth":3,"title":"API Informatie","description":"API informatie over de ultimate kingdom plugin","meta_keywords":"kingdom plugin, ultimate, minecraft plugin, spigot plugin, gameplay, API","meta_url":"https://ultimatekingdom.nl"},"headers":[],"relativePath":"API.md","filePath":"API.md"}'),t={name:"API.md"},e=n(`<h1 id="api" tabindex="-1">API <a class="header-anchor" href="#api" aria-label="Permalink to &quot;API&quot;">​</a></h1><nav class="table-of-contents"><ul><li><a href="#gradle">Gradle</a><ul><li><a href="#repositories">repositories</a></li><li><a href="#dependencies">dependencies</a></li></ul></li><li><a href="#toegang-tot-api">Toegang tot API</a></li><li><a href="#gebruikte-bibliotheken">Gebruikte bibliotheken</a><ul><li><a href="#hooks">Hooks</a></li></ul></li><li><a href="#commands">Commands</a><ul><li><a href="#registreren-command">Registreren command</a></li><li><a href="#argumenttypes">ArgumentTypes</a></li></ul></li><li><a href="#gegevens-opslaan">Gegevens opslaan</a><ul><li><a href="#metadata-objecten">Metadata objecten</a></li></ul></li><li><a href="#placeholders">Placeholders</a><ul><li><a href="#kingdom-player-object">Kingdom/player object</a></li><li><a href="#settings">Settings</a></li></ul></li><li><a href="#events">Events</a><ul><li><a href="#worldguard-events">WorldGuard Events</a></li><li><a href="#gameplay-events">GamePlay events</a></li><li><a href="#chat-events">Chat events</a></li><li><a href="#kingdom-events">Kingdom events</a></li><li><a href="#player-events">Player events</a></li><li><a href="#worldguardwrapper-events">WorldGuardWrapper Events</a></li></ul></li></ul></nav><h2 id="gradle" tabindex="-1">Gradle <a class="header-anchor" href="#gradle" aria-label="Permalink to &quot;Gradle&quot;">​</a></h2><h3 id="repositories" tabindex="-1">repositories <a class="header-anchor" href="#repositories" aria-label="Permalink to &quot;repositories&quot;">​</a></h3><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">repositories {</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> maven { url </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;https://repo.recorehosting.com/repository/maven-snapshots/&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> } </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// snapshots</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> maven { url </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;https://repo.recorehosting.com/repository/development/&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }  </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// beta &amp; release candidate</span></span></code></pre></div><h3 id="dependencies" tabindex="-1">dependencies <a class="header-anchor" href="#dependencies" aria-label="Permalink to &quot;dependencies&quot;">​</a></h3><h4 id="kingdom-plugin" tabindex="-1">Kingdom plugin <a class="header-anchor" href="#kingdom-plugin" aria-label="Permalink to &quot;Kingdom plugin&quot;">​</a></h4><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> compileOnly   </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;me.map:ultimatekingdom:1.45.4.1-SNAPSHOT&#39;</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> //development voor deze versie is gestopt</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> </span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> compileOnly   </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;me.map:ultimatekingdom:2.12.0.0-RC1&#39;</span></span></code></pre></div><h4 id="exchange" tabindex="-1">Exchange <a class="header-anchor" href="#exchange" aria-label="Permalink to &quot;Exchange&quot;">​</a></h4><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> compileOnly   </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;me.map.exchange:API:2.12.0.0-RC1&#39;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> compileOnly   </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;me.map.exchange:bungeecord:2.12.0.0-RC1&#39;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> compileOnly   </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;me.map.exchange:velocity:2.12.0.0-RC1&#39;</span></span></code></pre></div><h2 id="toegang-tot-api" tabindex="-1">Toegang tot API <a class="header-anchor" href="#toegang-tot-api" aria-label="Permalink to &quot;Toegang tot API&quot;">​</a></h2><p>De plugin is via een <code>static class</code> bereikbaar.</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">UltimateKingdom. </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">..</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">UltimateKingdom.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Kingdoms</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">..</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">UltimateKingdom.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">getKingdomServer</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span></span></code></pre></div><h4 id="voorbeeld-1" tabindex="-1">voorbeeld 1 <a class="header-anchor" href="#voorbeeld-1" aria-label="Permalink to &quot;voorbeeld 1&quot;">​</a></h4><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">public </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">class</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> myClass</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">    </span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">    public</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> void</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> doSomething</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() {</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">        Kingdom k1 </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> UltimateKingdom.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Kingdoms</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">().</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">getKingdom</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;kingdomname&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">); </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">//haal een kingdom op</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">        Kingdom k </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Kingdom.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">get</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;anotherkingdomname&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);   </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// mag ook</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">        k1.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">setSlogan</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;&amp;athis &amp;fwill &amp;cbe &amp;6the &amp;8new &amp;aslogan&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ,(result,kingdom) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">          </span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">            if</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (result.isOk()) { </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">//result is ok...</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">                Bukkit.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">getLogger</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">().</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">info</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Changed kingdom slogan to &quot;</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> +</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">  kingdom.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">getSlogan</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()); </span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">            } else {</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">                Bukkit.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">getLogger</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">().</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">severe</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Something has happend&quot;</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> +</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">  result.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">toString</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">());</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">            }</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">        });</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">    }</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h4 id="voorbeeld-2-kingdomplayer" tabindex="-1">voorbeeld 2 KingdomPlayer <a class="header-anchor" href="#voorbeeld-2-kingdomplayer" aria-label="Permalink to &quot;voorbeeld 2 KingdomPlayer&quot;">​</a></h4><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">  public </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">void</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> doSomething</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() {</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">        UUID</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> uuid </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> UUID</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">randomUUID</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(); </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">//voorbeeld</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">        KingdomPlayer playerOne </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> UltimateKingdom.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Players</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">().</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">getPlayer</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(uuid);</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">        KingdomPlayer playerTwo </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> KingdomPlayer.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">get</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(uuid); </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">//tomayto, tomahto tomato</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">        playerOne.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">setmod</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">false</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,(result,player) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">            </span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">            if</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (result.isOk()) {</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">                Bukkit.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">getLogger</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">().</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">info</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;player:&quot;</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> +</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> player.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">getName</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot; mod &quot;</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> +</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> player.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">isMod</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()); </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">//</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">            } else {</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">                Bukkit.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">getLogger</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">().</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">severe</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(result.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">toString</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">());</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">            }</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">        });</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">    }</span></span></code></pre></div><h4 id="voorbeeld-3-uitzondering" tabindex="-1">voorbeeld 3 uitzondering <a class="header-anchor" href="#voorbeeld-3-uitzondering" aria-label="Permalink to &quot;voorbeeld 3 uitzondering&quot;">​</a></h4><p>Uitzondering op setRank</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">   public </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">void</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> doSomething</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() {</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">        UUID</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> uuid </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> UUID</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">randomUUID</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(); </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">//voorbeeld</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">        KingdomPlayer playerOne </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> UltimateKingdom.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Players</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">().</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">getPlayer</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(uuid);</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">        KingdomPlayer playerTwo </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> KingdomPlayer.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">get</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(uuid); </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">//tomayto, tomahto tomato</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">        Rank rank </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Rank.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">get</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Koning&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">        </span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">        playerOne.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">setRank</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(rank,(result,player,kingdom) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {  </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">//[!code hl]  //setrank geeft 3 objecten terug (result,player,kingdom)</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">        </span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">            if</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (result.isOk()) {</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">                Bukkit.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">getLogger</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">().</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">info</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;player new rank  :&quot;</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> +</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> player.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">getRank</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">().</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">getName</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot; kingdom  &quot;</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> +</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> kingdom.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">getName</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()); </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">//</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">            } else {</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">                Bukkit.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">getLogger</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">().</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">severe</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(result.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">toString</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">());</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">            }</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">        });</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">    }</span></span></code></pre></div><h2 id="gebruikte-bibliotheken" tabindex="-1">Gebruikte bibliotheken <a class="header-anchor" href="#gebruikte-bibliotheken" aria-label="Permalink to &quot;Gebruikte bibliotheken&quot;">​</a></h2><p>De kingdom plugin gebruikt de onderstaande bibliotheken</p><ul><li><a href="https://github.com/KyoriPowered/adventure" target="_blank" rel="noreferrer">Kyori Adventure</a></li><li><a href="https://github.com/CodeMC/WorldGuardWrapper" target="_blank" rel="noreferrer">WorldGuardWrapper</a></li><li><a href="https://github.com/CryptoMorin/XSeries" target="_blank" rel="noreferrer">xseries</a></li><li><a href="https://github.com/OkaeriPoland/okaeri-placeholders" target="_blank" rel="noreferrer">Okaeri Placeholders</a></li><li><a href="https://github.com/OkaeriPoland/okaeri-tasker" target="_blank" rel="noreferrer">okaeri-tasker</a> <sup class="footnote-ref"><a href="#fn1" id="fnref1">[1]</a></sup></li><li><a href="https://github.com/MegavexNetwork/scoreboard-library" target="_blank" rel="noreferrer">Scoreboard-library</a></li><li><a href="https://github.com/DreamVoid/UniversalScheduler" target="_blank" rel="noreferrer">Universal Scheduler </a></li><li><a href="https://github.com/Carleslc/Simple-YAML" target="_blank" rel="noreferrer">Simple-Yaml </a></li></ul><h3 id="hooks" tabindex="-1">Hooks <a class="header-anchor" href="#hooks" aria-label="Permalink to &quot;Hooks&quot;">​</a></h3><p>De onderstaande hooks/bibliotheren zijn beschikbaar.</p><table><thead><tr><th>bibliotheken/hooks</th><th>via</th></tr></thead><tbody><tr><td>Scoreboard-library</td><td>UltimateKingdom.getKingdomServer().ScoreboardLibrary()</td></tr><tr><td>Kyori Adventure</td><td>UltimateKingdom.getKingdomServer().Adventurehook()</td></tr><tr><td>Okaeri Placeholders</td><td>UltimateKingdom.getKingdomServer().Messages().getPlaceHolders()</td></tr><tr><td>EssentialX</td><td>UltimateKingdom.getKingdomServer().EssentialsHook()</td></tr><tr><td>Universal Scheduler</td><td>UltimateKingdom.getKingdomServer().UniversalScheduler()</td></tr><tr><td>Okaeri-tasker</td><td>UltimateKingdom.getKingdomServer().Tasker()</td></tr><tr><td>Teleport queue</td><td>UltimateKingdom.getKingdomServer().QueuedTeleports()</td></tr><tr><td>Runnable queue</td><td>UltimateKingdom.getKingdomServer().QueuedRunnables()</td></tr></tbody></table><h2 id="commands" tabindex="-1">Commands <a class="header-anchor" href="#commands" aria-label="Permalink to &quot;Commands&quot;">​</a></h2><p>We gebruiken een aangepaste brigadier van mojang. Hieronder staat een voorbeeld van een commando die de display naam van de kingdom aanpast.</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">public </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">class</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> MyCommand</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> extends</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> AbstractCommand</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">  {</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">    public</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> list</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() {</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">        super</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;mycommand&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">        setDescription</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Geef hier een omschrijving&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);  </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">//deze omschrijving is zichtbaar in /k help</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">        setLongDescription</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Geef hier eventueel een lange omschriving, deze is zichtbaar in /k help mycommand&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">); </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// (optioneel)</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">        setAliases</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;l&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);  </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">//geef hier een alias in voor het commando. (optioneel)</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">        setPlayerOnly</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">); </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">//optioneel</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">        setPermission</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;kingdom.mycommand&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">); </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">//permissie</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">    }</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">  public</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> void</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> createCommand</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">KingdomCommand</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> brigadierCommand</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) {</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">        brigadierCommand</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">         .</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">then</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">literal</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;setdisplayname&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)  </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">//commando is dus:  /k mycommand setdisplayname &lt;kingdom naam&gt; &lt;string&gt;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">                        .</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">requires</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(c </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> c.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">hasKingdom</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()  </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&amp;&amp;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> c.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">isMod</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&amp;&amp;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> c.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">isPlayer</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() ) </span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">                        .</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">then</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">argument</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;kingdom&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, KingdomArgumentType.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">kingdom</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">())   </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">//Kingdom argument</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">                                .</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">then</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">argument</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;displayname&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, StringArgumentType.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">greedyString</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()) </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">//String argument</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">                                        .</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">suggests</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">new</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> StringSuggestion</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;geef naam op&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)) </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// &quot;geef naam op&quot; weergeven als suggestie bij de argument displayname</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">                                        .</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">executes</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(c </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">                                            String displayname </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> c.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">getArgument</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;displayname&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, String.class); </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">//haal String argument op</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">                                            Kingdom kingdom </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> c.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">getArgument</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;kingdom&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, Kingdom.class);  </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">//haal Kingdom argument op</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">                                            kingdom.setDisplayName(displayname, (res,rm) -&gt; {</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">                                               </span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">                                               if</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (res.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">isOk</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()) {</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">                                                    c.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">getSource</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">().</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">sendMessage</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;we hebben het aangepast&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">                                                } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">else</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">                                                    c.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">getSource</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">().</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">sendMessage</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Big Error... &quot;</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> +</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> res);  </span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">                                                }</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">                                            });</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">                                            return Command.SINGLE_SUCCESS;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">                                        }))));</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span></code></pre></div><h3 id="registreren-command" tabindex="-1">Registreren command <a class="header-anchor" href="#registreren-command" aria-label="Permalink to &quot;Registreren command&quot;">​</a></h3><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">new</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> MyCommand</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">().</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">register</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">();</span></span></code></pre></div><h3 id="argumenttypes" tabindex="-1">ArgumentTypes <a class="header-anchor" href="#argumenttypes" aria-label="Permalink to &quot;ArgumentTypes&quot;">​</a></h3><p>De onderstaande argumentypes zijn beschikbaar in de plugin.</p><table><thead><tr><th>type</th><th>omschrijving</th></tr></thead><tbody><tr><td>KingdomArgumentType</td><td>argument voor kingdoms (Kingdom)</td></tr><tr><td>KingdomPlayerArgumentType</td><td>argument voor online spelers (KingdomPlayer)</td></tr><tr><td>ServerSpawnArgumentType</td><td>argument voor server spawns (KingdomLocation)</td></tr><tr><td>ServerSpawnArgumentType</td><td>argument voor rank groep (String)</td></tr><tr><td>PlayerLevelArgumentType</td><td>argument voor player levels (KingdomLevel)</td></tr><tr><td>KingdomLevelArgumentType</td><td>argument voor kingdom levels (PlayerLevel)</td></tr><tr><td>ChatChannelArgumentType</td><td>argument voor channels (Channels)</td></tr><tr><td>CommandsArgumentType</td><td>argument voor commands (AbstractCommand)</td></tr><tr><td>PlayerArgumentType</td><td>argument voor online spelers (lokaal Players)</td></tr><tr><td>MultiServerCachedPlayerType</td><td>argument voor online spelers (CachedPlayers)</td></tr><tr><td>RankArgumentTypeType</td><td>argument voor Rank (Rank) <a href="./API#voorbeeld-3">zie voorbeeld 3</a></td></tr><tr><td>YesNoArgumentsType</td><td>argument voor Yes/No (Boolean)</td></tr><tr><td>BooleanWithWordsType</td><td>argument voor True/False (Boolean)</td></tr><tr><td>ColorArgumentType</td><td>argument voor Colors (voorbeeld :0 0 0 255)</td></tr><tr><td>HexArgumentType</td><td>argument voor Hex ( voorbeeld :404040)</td></tr><tr><td>UuidMemberArgumentType</td><td>argument voor Kingdom members. Geeft UUID van speler</td></tr></tbody></table><h4 id="voorbeeld-1-1" tabindex="-1">voorbeeld 1 <a class="header-anchor" href="#voorbeeld-1-1" aria-label="Permalink to &quot;voorbeeld 1&quot;">​</a></h4><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark has-highlighted vp-code"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">public </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">class</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> MyCommand</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> extends</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> AbstractCommand</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">    public</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> MyCommand</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() {</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">        super</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;MyCommand&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">        setDescription</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;this command does nothing&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">        setLongDescription</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;This is just a demo. So don&#39;t get angry.. please...&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">        setPermission</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;demo.set&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">        setPlayerOnly</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">false</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">    }</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">    @Override</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">    public</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> void</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> createCommand</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">KingdomCommand</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> command</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) {</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">        command</span></span>
<span class="line highlighted"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">                .</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">then</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">argument</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;kingdom&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, KingdomArgumentType.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">kingdom</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()) </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">//eerste argument van commando</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">                        .</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">executes</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(c </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">                            Kingdom kingdom </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> c.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">getArgument</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;kingdom&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, Kingdom.class);  </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">//[!code hl] //ophalen argument</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">                            ...</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> //do something</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">                            return Command.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">SINGLE_SUCCESS</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">                        }));</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">    }</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h4 id="voorbeeld-2" tabindex="-1">voorbeeld 2 <a class="header-anchor" href="#voorbeeld-2" aria-label="Permalink to &quot;voorbeeld 2&quot;">​</a></h4><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark has-highlighted vp-code"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">public </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">class</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> MyCommand</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> extends</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> AbstractCommand</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">    public</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> MyCommand</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() {</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">        super</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;MyCommand&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">        setDescription</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;this command does nothing&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">        setLongDescription</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;This is just a demo. So don&#39;t get angry.. please...&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">        setPermission</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;demo.set&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">        setPlayerOnly</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">false</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">    }</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">    @Override</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">    public</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> void</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> createCommand</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">KingdomCommand</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> command</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) {</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">        command</span></span>
<span class="line highlighted"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">                .</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">then</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">argument</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;action&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, OptionCollectionArgumentType.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">get</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(Arrays.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">asList</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;enable&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;disable&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;status&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">))) </span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">                        .</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">executes</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(c </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
<span class="line"></span>
<span class="line highlighted"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">                            String action </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> c.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">getArgument</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;action&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, String.class); </span></span>
<span class="line"></span>
<span class="line highlighted"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">                            switch</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (action.toLowerCase()) { </span></span>
<span class="line highlighted"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">                                case</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;on&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span></span>
<span class="line highlighted"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">                                     break</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">; </span></span>
<span class="line highlighted"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">                                case</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;disable&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span></span>
<span class="line highlighted"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">                                    break</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">; </span></span>
<span class="line highlighted"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">                                case</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;status&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span></span>
<span class="line highlighted"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">                                    break</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">                            }</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">                            return Command.SINGLE_SUCCESS;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">                        }));</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">    }</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h4 id="voorbeeld-3" tabindex="-1">voorbeeld 3 <a class="header-anchor" href="#voorbeeld-3" aria-label="Permalink to &quot;voorbeeld 3&quot;">​</a></h4><p>De argument RankArgumentTypeType geeft standaard de ranken uit de groep <code>default</code><br> Met &#39;suggests&#39; kan een andere lijst worden gegeven.</p><p>In het onderstaande voorbeeld wordt de ranken opgehaald van de kingdom , waar de speler die het commando uitvoert, lid van is. De speler moet een echte <code>speler</code> zijn en moet lid zijn van een kingdom om het commando te kunnen zien.</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark has-highlighted vp-code"><code><span class="line"></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">public </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">class</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> MyCommand</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> extends</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> AbstractCommand</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">    public</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> MyCommand</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() {</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">        super</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;MyCommand&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">        setDescription</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;this command does nothing&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">        setLongDescription</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;This is just a demo. So don&#39;t get angry.. please...&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">        setPermission</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;demo.set&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
<span class="line highlighted"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">        setPlayerOnly</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">false</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);  </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">//controle van player-only doen we in het commando zelf. </span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">    }</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">    </span></span>
<span class="line highlighted"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">    //dit regelt de nieuwe suggestie van ranks</span></span>
<span class="line highlighted"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">    private</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> CompletableFuture</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">Suggestions</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&gt;</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> PlayerKingdomRank</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">CommandContext</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&lt;</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">CommandSource</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt; </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">suggestionsBuilder</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">SuggestionsBuilder</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> builder</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) { </span></span>
<span class="line highlighted"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">        KingdomPlayer player </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> suggestionsBuilder.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">getSource</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">().</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">asKingdomPlayerOrNull</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(); </span></span>
<span class="line highlighted"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">         for</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (Rank rank : player.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">getKingdom</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">().</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">getRanksList</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()) { </span></span>
<span class="line highlighted"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">          builder.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">suggest</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(rank.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">getName</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()); </span></span>
<span class="line highlighted"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">         } </span></span>
<span class="line highlighted"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">        return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> builder.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">buildFuture</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(); </span></span>
<span class="line highlighted"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">    } </span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">    @Override</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">    public</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> void</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> createCommand</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">KingdomCommand</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> command</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) {</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">        command</span></span>
<span class="line highlighted"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">                .</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">then</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">argument</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;rank&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, RankArgumentTypeType.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">get</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">())  </span></span>
<span class="line highlighted"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">                        .</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">requires</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(c </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> c.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">isPlayer</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&amp;&amp;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> c.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">hasKingdom</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()) </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">//player-only &amp;&amp; speler heeft kingdom</span></span>
<span class="line highlighted"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">                        .</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">suggests</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">this</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">::PlayerKingdomRank) </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">//verwijst naar de nieuwe suggestie</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">                        .</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">executes</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(c </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { </span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">                            Rank rank </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> c.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">getArgument</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;rank&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,Rank.class);</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">                            </span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">                            ...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> do something</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">                            </span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">                            return Command.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">SINGLE_SUCCESS</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">                        }));</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">    }</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">    </span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h2 id="gegevens-opslaan" tabindex="-1">Gegevens opslaan <a class="header-anchor" href="#gegevens-opslaan" aria-label="Permalink to &quot;Gegevens opslaan&quot;">​</a></h2><p>In de plugin kan je gegevens opslaan die je op een andere server weer kan gebruiken.</p><p>Je hebt 3 plekken waar je data kan bewaren.</p><ul><li>spelers data</li><li>kingdom data</li><li>server data</li></ul><p>De data kan je bewaren dmv MetaData</p><p>Voorbeeld kingdom data</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">Kingdom kingdom </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Kingdom.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">get</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;MyKingdom&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">MetaData md </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> new</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> IntegerDataField</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;myplugin_key&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">//zorg dat je plugin naam er in zit ivm andere plugins</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">md.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">setValue</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">10</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">kingdom.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">addMeta</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(md, (result, kd)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">      //do something</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p>Voorbeeld server data</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">Kingdom kingdom </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Kingdom.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">get</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;MyKingdom&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">MetaData md </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> new</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> IntegerDataField</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;myplugin_key&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">); </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">//zorg dat je plugin naam er in zit ivm andere plugins</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">md.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">setValue</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">10</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">UltimateKingdom.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Settings</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">().</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">addMeta</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(md, (result, kd)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">        //do something</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><h3 id="metadata-objecten" tabindex="-1">Metadata objecten <a class="header-anchor" href="#metadata-objecten" aria-label="Permalink to &quot;Metadata objecten&quot;">​</a></h3><p>Alleen serializable objects</p><table><thead><tr><th>type</th></tr></thead><tbody><tr><td>BooleanDataField</td></tr><tr><td>DecimalDataField</td></tr><tr><td>IntegerDataField</td></tr><tr><td>LongDataField</td></tr><tr><td>ListDataFiend</td></tr><tr><td>HashMapStringBooleanField</td></tr><tr><td>HashMapStringIntegerField</td></tr></tbody></table><h2 id="placeholders" tabindex="-1">Placeholders <a class="header-anchor" href="#placeholders" aria-label="Permalink to &quot;Placeholders&quot;">​</a></h2><h3 id="kingdom-player-object" tabindex="-1">Kingdom/player object <a class="header-anchor" href="#kingdom-player-object" aria-label="Permalink to &quot;Kingdom/player object&quot;">​</a></h3><p>De kingdom plugin gebruikt de onderstaande metadata labels.</p><table><thead><tr><th>label</th><th style="text-align:center;">Type</th><th style="text-align:center;">object</th><th>omschrijving</th></tr></thead><tbody><tr><td>strokeColor</td><td style="text-align:center;">String</td><td style="text-align:center;">kingdom</td><td>in gebruik bij setdynmap</td></tr><tr><td>strokeopacity</td><td style="text-align:center;">Double</td><td style="text-align:center;">kingdom</td><td>in gebruik bij setdynmap</td></tr><tr><td>strokeweight</td><td style="text-align:center;">Integer</td><td style="text-align:center;">kingdom</td><td>in gebruik bij setdynmap</td></tr><tr><td>fillcolor</td><td style="text-align:center;">String</td><td style="text-align:center;">kingdom</td><td>in gebruik bij setdynmap</td></tr><tr><td>fillopacity</td><td style="text-align:center;">Double</td><td style="text-align:center;">kingdom</td><td>in gebruik bij setdynmap</td></tr><tr><td>spawnicon</td><td style="text-align:center;">String</td><td style="text-align:center;">kingdom</td><td>in gebruik bij setdynmap</td></tr><tr><td>warpicon</td><td style="text-align:center;">String</td><td style="text-align:center;">kingdom</td><td>in gebruik bij setdynmap</td></tr></tbody></table><h3 id="settings" tabindex="-1">Settings <a class="header-anchor" href="#settings" aria-label="Permalink to &quot;Settings&quot;">​</a></h3><p>De kingdom plugin gebruikt de onderstaande metadata settings labels.</p><table><thead><tr><th>label</th><th>Type</th><th>omschrijving</th></tr></thead><tbody><tr><td>ultimate_leavelocation</td><td>String</td><td>KingdomLocatie als String</td></tr><tr><td>ultimate_kicklocation</td><td>String</td><td>KingdomLocatie als String</td></tr></tbody></table><h2 id="events" tabindex="-1">Events <a class="header-anchor" href="#events" aria-label="Permalink to &quot;Events&quot;">​</a></h2><p>onderstaande is nog niet compleet.</p><h3 id="worldguard-events" tabindex="-1">WorldGuard Events <a class="header-anchor" href="#worldguard-events" aria-label="Permalink to &quot;WorldGuard Events&quot;">​</a></h3><table><thead><tr><th>type</th><th>omschrijving</th></tr></thead><tbody><tr><td>RegionEnteredEvent</td><td>als een speler een regio binnen gaat</td></tr><tr><td>RegionLeftEvent</td><td>als een speler een regio verlaat</td></tr><tr><td>RegionsChangedEvent</td><td>als een speler van regio veranderd</td></tr><tr><td>RegionsLeftEvent</td><td>als een speler een regio verlaat.</td></tr></tbody></table><h3 id="gameplay-events" tabindex="-1">GamePlay events <a class="header-anchor" href="#gameplay-events" aria-label="Permalink to &quot;GamePlay events&quot;">​</a></h3><p>Alle gamePlay events waar je iets meer kan doen.</p><h4 id="action-events" tabindex="-1">Action events <a class="header-anchor" href="#action-events" aria-label="Permalink to &quot;Action events&quot;">​</a></h4><table><thead><tr><th>type</th><th>omschrijving</th></tr></thead><tbody><tr><td>KingdomSwitchEvent</td><td>als een speler iets omzet zoals een schakelaar</td></tr><tr><td>KingdomItemuseEvent</td><td>als een speler een item gebruikt</td></tr><tr><td>KingdomDestroyEvent</td><td>als een speler iets kapot maakt</td></tr><tr><td>KingdomBuildEvent</td><td>als een speler iets bouwt</td></tr><tr><td>KingdomActionEvent</td><td>alles hierboven</td></tr></tbody></table><h4 id="damage-events" tabindex="-1">Damage events <a class="header-anchor" href="#damage-events" aria-label="Permalink to &quot;Damage events&quot;">​</a></h4><table><thead><tr><th>type</th><th>omschrijving</th></tr></thead><tbody><tr><td>KingdomPlayerDamagePlayerEvent</td><td>Speler tegen speler damage</td></tr><tr><td>KingdomDamageEvent</td><td>alles hier boven</td></tr></tbody></table><h3 id="chat-events" tabindex="-1">Chat events <a class="header-anchor" href="#chat-events" aria-label="Permalink to &quot;Chat events&quot;">​</a></h3><table><thead><tr><th>type</th><th>omschrijving</th></tr></thead><tbody><tr><td>AsyncNonReportableChatEvent</td><td>waneer een admin chat (nochatreport in config.yml moet aan staan)</td></tr><tr><td>AsyncPostNonReportableChatEvent</td><td>waneer een admin chat (nochatreport in config.yml moet aan staan)</td></tr><tr><td>KingdomChatEvent</td><td>wanneer eens speler chat</td></tr></tbody></table><h3 id="kingdom-events" tabindex="-1">Kingdom events <a class="header-anchor" href="#kingdom-events" aria-label="Permalink to &quot;Kingdom events&quot;">​</a></h3><table><thead><tr><th>type</th><th>omschrijving</th></tr></thead><tbody><tr><td>KingdomSetEvent</td><td>Speler in kingdom zetten</td></tr><tr><td>KingdomCreateEvent</td><td>kingdom aanmaken</td></tr><tr><td>KingdomDeleteEvent</td><td>kingdom verwijderen</td></tr><tr><td>KingdomRenameEvent</td><td>kingdom hernoemen</td></tr><tr><td>KingdomAddPointsEvent</td><td>toevoegen punten</td></tr><tr><td>KingdomAddSpawnEvent</td><td>toevoegen spawn</td></tr><tr><td>KingdomDeleteSpawnEvent</td><td>verwijderen spawn</td></tr><tr><td>KingdomAddWarpEvent</td><td>toevoegen warp</td></tr><tr><td>KingdomDeleteWarpEvent</td><td>verwijderen warp</td></tr><tr><td>KingdomMaxMembersEvent</td><td>instellen max. aantal leden</td></tr><tr><td>KingdomRemoveLevelEvent</td><td>verwijderen van level</td></tr><tr><td>KingdomRemoveMember</td><td>verwijderen van kingdom lid</td></tr><tr><td>KingdomRemovePointsEvent</td><td>verwijderen van punten</td></tr><tr><td>KingdomRemoveRankMaximumEvent</td><td>verwijderen van een rank max.</td></tr><tr><td>KingdomSetFriendlyFireEvent</td><td>instellen friendly-fire</td></tr><tr><td>KingdomSetInviteOnly</td><td>instellen invite-only</td></tr><tr><td>KingdomSetLevelEvent</td><td>instellen kingdom level</td></tr><tr><td>KingdomSetPlaceHolderEvent</td><td>instellen placeholder</td></tr><tr><td>KingdomSetRankMaximumEvent</td><td>instellen max rank</td></tr><tr><td>KingdomSetRelationEvent</td><td>instellen relatie</td></tr><tr><td>KingdomSetSpawnEvent</td><td>instellen spawn</td></tr><tr><td>KingdomSetWarpEvent</td><td>instellen warp</td></tr><tr><td>KingdomPlayerSetRank</td><td>instellen rank</td></tr></tbody></table><h3 id="player-events" tabindex="-1">Player events <a class="header-anchor" href="#player-events" aria-label="Permalink to &quot;Player events&quot;">​</a></h3><table><thead><tr><th>type</th></tr></thead><tbody><tr><td>PlayerJoinKingdomEvent</td></tr><tr><td>PlayerJoinServerEvent</td></tr><tr><td>PlayerDeathMessageEvent</td></tr><tr><td>PlayerKilledPlayerDeathMessageEvent</td></tr><tr><td>PlayerDeathMessageEvent</td></tr></tbody></table><h3 id="worldguardwrapper-events" tabindex="-1">WorldGuardWrapper Events <a class="header-anchor" href="#worldguardwrapper-events" aria-label="Permalink to &quot;WorldGuardWrapper Events&quot;">​</a></h3><table><thead><tr><th>type</th></tr></thead><tbody><tr><td>WrappedUseEntityEvent</td></tr><tr><td>WrappedDisallowedPVPEvent</td></tr><tr><td>WrappedDamageEntityEvent</td></tr><tr><td>AbstractWrappedEvent</td></tr></tbody></table><hr class="footnotes-sep"><section class="footnotes"><ol class="footnotes-list"><li id="fn1" class="footnote-item"><p>Er zit een aangepaste variant in de plugin, voor ondersteuning van de Universal scheduler. (UniversalTasker) <a href="#fnref1" class="footnote-backref">↩︎</a></p></li></ol></section>`,81),l=[e];function h(k,p,r,d,E,g){return a(),i("div",null,l)}const c=s(t,[["render",h]]);export{y as __pageData,c as default};
