1
0
ultimatedocs/docs/.vitepress/dist/API.html

246 lines
112 KiB
HTML
Raw Normal View History

2024-04-18 11:30:21 +02:00
<!DOCTYPE html>
<html lang="nl" dir="ltr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>API Informatie | https://ultimatekingdom.nl</title>
<meta name="description" content="API informatie over de ultimate kingdom plugin">
2024-07-27 13:25:59 +02:00
<meta name="generator" content="VitePress v1.3.1">
<link rel="preload stylesheet" href="/assets/style.CIgTXHe1.css" as="style">
2024-04-18 11:30:21 +02:00
2024-07-27 13:25:59 +02:00
<script type="module" src="/assets/app.CV7ObeM5.js"></script>
2024-04-18 11:30:21 +02:00
<link rel="preload" href="/assets/inter-roman-latin.Di8DUHzh.woff2" as="font" type="font/woff2" crossorigin="">
2024-07-27 13:25:59 +02:00
<link rel="modulepreload" href="/assets/chunks/framework.DuA-ZlS8.js">
<link rel="modulepreload" href="/assets/chunks/theme.B-IrzYt-.js">
<link rel="modulepreload" href="/assets/chunks/katex.CvgdMzdh.js">
<link rel="modulepreload" href="/assets/chunks/c4Diagram-ae766693.5zq8lNRz.js">
<link rel="modulepreload" href="/assets/chunks/flowDiagram-b222e15a.u5AVV-hs.js">
<link rel="modulepreload" href="/assets/chunks/flowDiagram-v2-13329dc7.MzkKFBua.js">
<link rel="modulepreload" href="/assets/chunks/erDiagram-09d1c15f.nt4RMebt.js">
<link rel="modulepreload" href="/assets/chunks/gitGraphDiagram-942e62fe.GaTrgGNF.js">
<link rel="modulepreload" href="/assets/chunks/ganttDiagram-b62c793e.BQh2Y5Mm.js">
<link rel="modulepreload" href="/assets/chunks/infoDiagram-94cd232f.Byd6bx68.js">
<link rel="modulepreload" href="/assets/chunks/pieDiagram-bb1d19e5.9eN9eF6r.js">
<link rel="modulepreload" href="/assets/chunks/quadrantDiagram-c759a472.BFrW3TVd.js">
<link rel="modulepreload" href="/assets/chunks/xychartDiagram-f11f50a6.BQRBy1gR.js">
<link rel="modulepreload" href="/assets/chunks/requirementDiagram-87253d64.B_dpYInn.js">
<link rel="modulepreload" href="/assets/chunks/sequenceDiagram-6894f283.BDxPgqzG.js">
<link rel="modulepreload" href="/assets/chunks/classDiagram-fb54d2a0.CGyvIBWD.js">
<link rel="modulepreload" href="/assets/chunks/classDiagram-v2-a2b738ad.DvyIbOUG.js">
<link rel="modulepreload" href="/assets/chunks/stateDiagram-5dee940d.pJ0bb-t8.js">
<link rel="modulepreload" href="/assets/chunks/stateDiagram-v2-1992cada.D30HA3w4.js">
<link rel="modulepreload" href="/assets/chunks/journeyDiagram-6625b456.Cvg1HNyV.js">
<link rel="modulepreload" href="/assets/chunks/flowchart-elk-definition-ae0efee6.DUjLe62V.js">
<link rel="modulepreload" href="/assets/chunks/timeline-definition-bf702344.DWbs1z0u.js">
<link rel="modulepreload" href="/assets/chunks/mindmap-definition-307c710a.MlW9Txbw.js">
<link rel="modulepreload" href="/assets/chunks/sankeyDiagram-707fac0f.DFwNRdvL.js">
<link rel="modulepreload" href="/assets/chunks/blockDiagram-9f4a6865.BtyFvzAC.js">
<link rel="modulepreload" href="/assets/chunks/virtual_mermaid-config.DDnGl6nM.js">
<link rel="modulepreload" href="/assets/API.md.CSQwUYyU.lean.js">
2024-04-18 11:30:21 +02:00
<script id="check-dark-mode">(()=>{const e=localStorage.getItem("vitepress-theme-appearance")||"auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches;(!e||e==="auto"?a:e==="dark")&&document.documentElement.classList.add("dark")})();</script>
<script id="check-mac-os">document.documentElement.classList.toggle("mac",/Mac|iPhone|iPod|iPad/i.test(navigator.platform));</script>
</head>
<body>
2024-07-27 13:25:59 +02:00
<div id="app"><div class="Layout" data-v-5d98c3a5><!--[--><!--]--><!--[--><span tabindex="-1" data-v-0f60ec36></span><a href="#VPContent" class="VPSkipLink visually-hidden" data-v-0f60ec36> Skip to content </a><!--]--><!----><header class="VPNav" data-v-5d98c3a5 data-v-ae24b3ad><div class="VPNavBar has-sidebar top" data-v-ae24b3ad data-v-6aa21345><div class="wrapper" data-v-6aa21345><div class="container" data-v-6aa21345><div class="title" data-v-6aa21345><div class="VPNavBarTitle has-sidebar" data-v-6aa21345 data-v-ab179fa1><a class="title" href="/" data-v-ab179fa1><!--[--><!--]--><!--[--><img class="VPImage logo" src="/logo.png" alt data-v-8426fc1a><!--]--><span data-v-ab179fa1>UltimateKingdom.nl</span><!--[--><!--]--></a></div></div><div class="content" data-v-6aa21345><div class="content-body" data-v-6aa21345><!--[--><!--]--><div class="VPNavBarSearch search" data-v-6aa21345><!--[--><!----><div id="local-search"><button type="button" class="DocSearch DocSearch-Button" aria-label="Zoeken"><span class="DocSearch-Button-Container"><span class="vp-icon DocSearch-Search-Icon"></span><span class="DocSearch-Button-Placeholder">Zoeken</span></span><span class="DocSearch-Button-Keys"><kbd class="DocSearch-Button-Key"></kbd><kbd class="DocSearch-Button-Key">K</kbd></span></button></div><!--]--></div><nav aria-labelledby="main-nav-aria-label" class="VPNavBarMenu menu" data-v-6aa21345 data-v-dc692963><span id="main-nav-aria-label" class="visually-hidden" data-v-dc692963> Main Navigation </span><!--[--><!--[--><a class="VPLink link vp-external-link-icon VPNavBarMenuLink" href="https://jenkins.recorehosting.com/job/UltimateKingdom-2.XX/" target="_blank" rel="noreferrer" tabindex="0" data-v-dc692963 data-v-9c663999><!--[--><span data-v-9c663999>latest-KingdomPlugin: 2.12.13.2-RC</span><!--]--></a><!--]--><!--[--><a class="VPLink link vp-external-link-icon VPNavBarMenuLink" href="https://jenkins.recorehosting.com/job/Exchange_2.x/" target="_blank" rel="noreferrer" tabindex="0" data-v-dc692963 data-v-9c663999><!--[--><span data-v-9c663999>latest-exchangePlugin: 2.12.3.1-RC</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink active" href="/API" tabindex="0" data-v-dc692963 data-v-9c663999><!--[--><span data-v-9c663999>API</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/changelog" tabindex="0" data-v-dc692963 data-v-9c663999><!--[--><span data-v-9c663999>Changelog</span><!--]--></a><!--]--><!--[--><a class="VPLink link vp-external-link-icon VPNavBarMenuLink" href="https://jenkins.recorehosting.com/job/UltimateKingdom-2.XX/javadoc/" target="_blank" rel="noreferrer" tabindex="0" data-v-dc692963 data-v-9c663999><!--[--><span data-v-9c663999>JavaDocs</span><!--]--></a><!--]--><!--]--></nav><div class="VPFlyout VPNavBarTranslations translations" data-v-6aa21345 data-v-88af2de4 data-v-b6c34ac9><button type="button" class="button" aria-haspopup="true" aria-expanded="false" aria-label="Change language" data-v-b6c34ac9><span class="text" data-v-b6c34ac9><span class="vpi-languages option-icon" data-v-b6c34ac9></span><!----><span class="vpi-chevron-down text-icon" data-v-b6c34ac9></span></span></button><div class="menu" data-v-b6c34ac9><div class="VPMenu" data-v-b6c34ac9 data-v-b98bc113><!----><!--[--><!--[--><div class="items" data-v-88af2de4><p class="title" data-v-88af2de4>Nederlands</p><!--[--><div class="VPMenuLink" data-v-88af2de4 data-v-43f1e123><a class="VPLink link" href="/en/API" data-v-43f1e123><!--[-->English<!--]--></a></div><!--]--></div><!--]--><!--]--></div></div></div><div class="VPNavBarAppearance appearance" data-v-6aa21345 data-v-6c893767><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title="Switch to dark theme" aria-checked="false" data-v-6c893767 data-v-5337faa4 data-v-1d5665e3><span class="check" data-v-1d5665e3><span class="icon" data-v-1d5665e3><!--[--><span class="vpi-sun sun" data-v-5337faa4></span><span class="vpi-moon moon" data-v-5337faa4></span><!--]--></span></span></button></div><div class="VPSocialLinks VPNavBarSocialLinks social
2024-04-18 11:30:21 +02:00
<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>
2024-07-27 13:25:59 +02:00
<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" tabindex="0"><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>
2024-04-18 11:30:21 +02:00
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> </span></span>
2024-07-27 13:25:59 +02:00
<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" tabindex="0"><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>
2024-04-18 11:30:21 +02:00
<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>
2024-07-27 13:25:59 +02:00
<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" tabindex="0"><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>
2024-04-18 11:30:21 +02:00
<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>
2024-07-27 13:25:59 +02:00
<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" tabindex="0"><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>
2024-04-18 11:30:21 +02:00
<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>
2024-07-27 13:25:59 +02:00
<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" tabindex="0"><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>
2024-04-18 11:30:21 +02:00
<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>
2024-07-27 13:25:59 +02:00
<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" tabindex="0"><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>
2024-04-18 11:30:21 +02:00
<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>
2024-07-27 13:25:59 +02:00
<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 tabindex="0"><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" tabindex="0"><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>
2024-04-18 11:30:21 +02:00
<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>
2024-07-27 13:25:59 +02:00
<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" tabindex="0"><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 tabindex="0"><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" tabindex="0"><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>
2024-04-18 11:30:21 +02:00
<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>
2024-07-27 13:25:59 +02:00
<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" tabindex="0"><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>
2024-04-18 11:30:21 +02:00
<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>
2024-07-27 13:25:59 +02:00
<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" tabindex="0"><code><span class="line"></span>
2024-04-18 11:30:21 +02:00
<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>
2024-07-27 13:25:59 +02:00
<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" tabindex="0"><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>
2024-04-18 11:30:21 +02:00
<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>
2024-07-27 13:25:59 +02:00
<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" tabindex="0"><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>
2024-04-18 11:30:21 +02:00
<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>
2024-07-27 13:25:59 +02:00
<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 tabindex="0"><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 tabindex="0"><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 tabindex="0"><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 tabindex="0"><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 tabindex="0"><thead><tr><th>type</th><th>omschrijving</th></tr></thead><tbody><tr><td>KingdomSwitchEvent</td><td>als een speler iets omzet zoals
<script>window.__VP_HASH_MAP__=JSON.parse("{\"about_information.md\":\"kvwXKhmn\",\"addons.md\":\"BLWYuQcR\",\"addons_ultimatediscordchat.md\":\"t2MeOvM3\",\"addons_ultimatelogin.md\":\"BpXSzkez\",\"addons_ultimateroles.md\":\"Aj4Hxk63\",\"addons_ultimatevote.md\":\"BzmoYHhP\",\"api.md\":\"CSQwUYyU\",\"changelog.md\":\"oqJapcpM\",\"en_guide.md\":\"BspTdEpd\",\"en_index.md\":\"BSRb-WNy\",\"en_information.md\":\"BSkreVtz\",\"guide_channels.md\":\"Bp2UnlN-\",\"guide_combat.md\":\"CLDTyynd\",\"guide_folia.md\":\"D59e1L2K\",\"guide_ingamehelp.md\":\"B3v0yVIE\",\"guide_kingdoms.md\":\"7ZwB0dCW\",\"guide_levelsandroles.md\":\"CCMLYarf\",\"guide_messages.md\":\"BTLJD7Le\",\"guide_others.md\":\"BLam6R_G\",\"guide_province.md\":\"BX3y5EST\",\"guide_regions.md\":\"BUyM9qsU\",\"guide_relations.md\":\"ZWOarByq\",\"guide_setup.md\":\"BWE5cKgR\",\"guide_warps-spawn.md\":\"f1iKgHnQ\",\"hooks.md\":\"C6QAhTFd\",\"hooks_autorank.md\":\"D864h9r2\",\"hooks_bluemap.md\":\"DOpz2EUp\",\"hooks_dynmap.md\":\"EeSWE3m-\",\"hooks_placeholderapi.md\":\"Ch7JesBk\",\"index.md\":\"CUp76rUI\",\"ref_channels.md\":\"Ct3-eTE1\",\"ref_commands.md\":\"C7F43HmY\",\"ref_gameplay.md\":\"pQuGsyTO\",\"ref_kingdomlevel.md\":\"B3qCHEqa\",\"ref_placeholders.md\":\"D1GFSqFe\",\"ref_playerlevel.md\":\"D13BeX7x\",\"ref_provincelevel.md\":\"DoCLgiBX\",\"ref_ranks.md\":\"D_QvHs7P\",\"ref_worldguard.md\":\"3xYMdfLV\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"VitePress\",\"description\":\"A VitePress site\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"nav\":[{\"text\":\"latest-KingdomPlugin: 2.12.13.2-RC\",\"link\":\"https://jenkins.recorehosting.com/job/UltimateKingdom-2.XX/\"},{\"text\":\"latest-exchangePlugin: 2.12.3.1-RC\",\"link\":\"https://jenkins.recorehosting.com/job/Exchange_2.x/\"},{\"text\":\"API\",\"link\":\"/API\"},{\"text\":\"Changelog\",\"link\":\"/changelog\"},{\"text\":\"JavaDocs\",\"link\":\"https://jenkins.recorehosting.com/job/UltimateKingdom-2.XX/javadoc/\"}],\"footer\":{\"message\":\"UltimateKingdom.nl\",\"copyright\":\"Copyright © 2022-present RecoreHosting\"},\"socialLinks\":[{\"icon\":\"github\",\"link\":\"https://git.recorehosting.com/\"},{\"icon\":\"discord\",\"link\":\"https://discord.gg/t3sFuDc6xz\"}],\"search\":{\"provider\":\"local\",\"options\":{\"translations\":{\"button\":{\"buttonText\":\"Zoeken\",\"buttonAriaLabel\":\"Zoeken\"},\"modal\":{\"noResultsText\":\"geen resultaten voor\",\"resetButtonTitle\":\"reset\",\"footer\":{\"selectText\":\"te selecteren\",\"navigateText\":\"te navigeren\"}}},\"locales\":{\"en\":{\"translations\":{\"button\":{\"buttonText\":\"Search\",\"buttonAriaLabel\":\"Search\"},\"modal\":{\"noResultsText\":\"No results for\",\"resetButtonTitle\":\"Reset search\",\"footer\":{\"selectText\":\"to select\",\"navigateText\":\"to navigate\"}}}}}}}},\"locales\":{\"root\":{\"label\":\"Nederlands\",\"lang\":\"nl\",\"title\":\"https://ultimatekingdom.nl\",\"description\":\"Minecraft Ultimate Kingdom Plugin information\",\"themeConfig\":{\"darkModeSwitchLabel\":\"Dark/Light\",\"sidebarMenuLabel\":\"Menu\",\"siteTitle\":\"UltimateKingdom.nl\",\"logo\":\"/logo.png\",\"lastUpdatedText\":\"Laatste aanpassing\",\"lastUpdated\":{\"formatOptions\":{\"dateStyle\":\"short\",\"timeStyle\":\"short\"},\"text\":\"Laatste wijziging\"},\"docFooter\":{\"prev\":\"Vorige\",\"next\":\"Volgende\"},\"sidebar\":[{\"text\":\"Over\",\"collapsed\":false,\"items\":[{\"items\":[{\"text\":\"Wat is ultimatekingdom?\",\"link\":\"/about/information#wat-is-ultimatekingdom\"},{\"text\":\"Plugin uitproberen?\",\"link\":\"/about/information#plugin-uitproberen\"},{\"text\":\"Licentie's\",\"link\":\"/about/information#licentie-gebruik-plugin\"},{\"text\":\"Wij zoeken\",\"link\":\"/about/information#wij-zoeken\"}]}]},{\"text\":\"Handleiding\",\"collapsed\":false,\"items\":[{\"text\":\"Setup\",\"link\":\"/guide/setup\"},{\"text\":\"Kingdoms\",\"link\":\"/guide/kingdoms\"},{\"text\":\"Provincies\",\"link\":\"/guide/province\"},{\"text\":\"Warps & Spawn\",\"link\
2024-04-18 11:30:21 +02:00
</body>
</html>