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;" > " https://repo.recorehosting.com/repository/maven-snapshots/" < / 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;" > " https://repo.recorehosting.com/repository/development/" < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > } < / span > < span style = "--shiki-light:#6A737D;--shiki-dark:#6A737D;" > // beta & release candidate< / span > < / span > < / code > < / pre > < / div > < h3 id = "dependencies" tabindex = "-1" > dependencies < a class = "header-anchor" href = "#dependencies" aria-label = "Permalink to "dependencies"" > < / a > < / h3 > < h4 id = "kingdom-plugin" tabindex = "-1" > Kingdom plugin < a class = "header-anchor" href = "#kingdom-plugin" aria-label = "Permalink to "Kingdom plugin"" > < / 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;" > ' me.map:ultimatekingdom:1.45.4.1-SNAPSHOT' < / 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;" > ' me.map:ultimatekingdom:2.12.0.0-RC1' < / span > < / span > < / code > < / pre > < / div > < h4 id = "exchange" tabindex = "-1" > Exchange < a class = "header-anchor" href = "#exchange" aria-label = "Permalink to "Exchange"" > < / 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;" > ' me.map.exchange:API:2.12.0.0-RC1' < / 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;" > ' me.map.exchange:bungeecord:2.12.0.0-RC1' < / 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;" > ' me.map.exchange:velocity:2.12.0.0-RC1' < / 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 "Toegang tot API"" > < / 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 "voorbeeld 1"" > < / 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;" > " kingdomname" < / 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;" > " anotherkingdomname" < / 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;" > " & athis & fwill & cbe & 6the & 8new & aslogan" < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > ,(result,kingdom) < / 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;" > < / 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;" > " Changed kingdom slogan to " < / 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;" > " Something has happend" < / 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 "voorbeeld 2 KingdomPlayer"" > < / 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;" > -> < / 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;" > " player:" < / 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;" > " mod " < / 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 "voorbeeld 3 uitzondering"" > < / 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;" > " Koning" < / 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;" > -> < / 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;" > " player new rank :" < / 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;" > " 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;" > 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 "Gebruikte bibliotheken"" > < / 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 "Hooks"" > < / 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 "Commands"" > < / 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;" > " mycommand" < / 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;" > " Geef hier een omschrijving" < / 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;" > " Geef hier eventueel een lange omschriving, deze is zichtbaar in /k help mycommand" < / 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;" > " l" < / 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;" > " kingdom.mycommand" < / 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;" > " setdisplayname" < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > ) < / span > < span style = "--shiki-light:#6A737D;--shiki-dark:#6A737D;" > //commando is dus: /k mycommand setdisplayname < kingdom naam> < string> < / 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;" > -> < / 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;" > & & < / 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;" > & & < / 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;" > " kingdom" < / 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;" > " displayname" < / 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;" > " geef naam op" < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > )) < / span > < span style = "--shiki-light:#6A737D;--shiki-dark:#6A737D;" > // " geef naam op" 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;" > -> < / 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;" > " displayname" < / 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;" > " kingdom" < / 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) -> {< / 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;" > " we hebben het aangepast" < / 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;" > " Big Error... " < / 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 "Registreren command"" > < / 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 "ArgumentTypes"" > < / 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 "voorbeeld 1"" > < / 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;" > " MyCommand" < / 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;" > " this command does nothing" < / 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;" > " This is just a demo. So don' t get angry.. please..." < / 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;" > " demo.set" < / 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;" > " kingdom" < / 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;" > -> < / 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;" > " kingdom" < / 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 "voorbeeld 2"" > < / 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;" > " MyCommand" < / 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;" > " this command does nothing" < / 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;" > " This is just a demo. So don' t get angry.. please..." < / 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;" > " demo.set" < / 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;" > " action" < / 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;" > " enable" < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > , < / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > " disable" < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > , < / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > " status" < / 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;" > -> < / 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;" > " action" < / 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;" > " on" < / 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;" > " disable" < / 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;" > " status" < / 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 "voorbeeld 3"" > < / a > < / h4 > < p > De argument RankArgumentTypeType geeft standaard de ranken uit de groep < code > default< / code > < br > Met ' suggests' 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;" > " MyCommand" < / 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;" > " this command does nothing" < / 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;" > " This is just a demo. So don' t get angry.. please..." < / 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;" > " demo.set" < / 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;" > < < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > Suggestions< / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > > < / 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;" > < < / span > < span style = "--shiki-light:#E36209;--shiki-dark:#FFAB70;" > CommandSource< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > > < / 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;" > " rank" < / 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;" > -> < / 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;" > & & < / 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 & & 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;" > -> < / 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;" > " rank" < / 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 "Gegevens opslaan"" > < / 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;" > " MyKingdom" < / 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;" > " myplugin_key" < / 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;" > -> < / 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;" > " MyKingdom" < / 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;" > " myplugin_key" < / 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;" > -> < / 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 "Metadata objecten"" > < / 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 "Placeholders"" > < / a > < / h2 > < h3 id = "kingdom-player-object" tabindex = "-1" > Kingdom/player object < a class = "header-anchor" href = "#kingdom-player-object" aria-label = "Permalink to "Kingdom/player object"" > < / 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 "Settings"" > < / 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 "Events"" > < / 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 "WorldGuard Events"" > < / 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 "GamePlay events"" > < / 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 "Action events"" > < / 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 > w i n d o w . _ _ V P _ H A S H _ M A P _ _ = J S O N . p a r s e ( " { \ " a b o u t _ i n f o r m a t i o n . m d \ " : \ " k v w X K h m n \ " , \ " a d d o n s . m d \ " : \ " B L W Y u Q c R \ " , \ " a d d o n s _ u l t i m a t e d i s c o r d c h a t . m d \ " : \ " t 2 M e O v M 3 \ " , \ " a d d o n s _ u l t i m a t e l o g i n . m d \ " : \ " B p X S z k e z \ " , \ " a d d o n s _ u l t i m a t e r o l e s . m d \ " : \ " A j 4 H x k 6 3 \ " , \ " a d d o n s _ u l t i m a t e v o t e . m d \ " : \ " B z m o Y H h P \ " , \ " a p i . m d \ " : \ " C S Q w U Y y U \ " , \ " c h a n g e l o g . m d \ " : \ " o q J a p c p M \ " , \ " e n _ g u i d e . m d \ " : \ " B s p T d E p d \ " , \ " e n _ i n d e x . m d \ " : \ " B S R b - W N y \ " , \ " e n _ i n f o r m a t i o n . m d \ " : \ " B S k r e V t z \ " , \ " g u i d e _ c h a n n e l s . m d \ " : \ " B p 2 U n l N - \ " , \ " g u i d e _ c o m b a t . m d \ " : \ " C L D T y y n d \ " , \ " g u i d e _ f o l i a . m d \ " : \ " D 5 9 e 1 L 2 K \ " , \ " g u i d e _ i n g a m e h e l p . m d \ " : \ " B 3 v 0 y V I E \ " , \ " g u i d e _ k i n g d o m s . m d \ " : \ " 7 Z w B 0 d C W \ " , \ " g u i d e _ l e v e l s a n d r o l e s . m d \ " : \ " C C M L Y a r f \ " , \ " g u i d e _ m e s s a g e s . m d \ " : \ " B T L J D 7 L e \ " , \ " g u i d e _ o t h e r s . m d \ " : \ " B L a m 6 R _ G \ " , \ " g u i d e _ p r o v i n c e . m d \ " : \ " B X 3 y 5 E S T \ " , \ " g u i d e _ r e g i o n s . m d \ " : \ " B U y M 9 q s U \ " , \ " g u i d e _ r e l a t i o n s . m d \ " : \ " Z W O a r B y q \ " , \ " g u i d e _ s e t u p . m d \ " : \ " B W E 5 c K g R \ " , \ " g u i d e _ w a r p s - s p a w n . m d \ " : \ " f 1 i K g H n Q \ " , \ " h o o k s . m d \ " : \ " C 6 Q A h T F d \ " , \ " h o o k s _ a u t o r a n k . m d \ " : \ " D 8 6 4 h 9 r 2 \ " , \ " h o o k s _ b l u e m a p . m d \ " : \ " D O p z 2 E U p \ " , \ " h o o k s _ d y n m a p . m d \ " : \ " E e S W E 3 m - \ " , \ " h o o k s _ p l a c e h o l d e r a p i . m d \ " : \ " C h 7 J e s B k \ " , \ " i n d e x . m d \ " : \ " C U p 7 6 r U I \ " , \ " r e f _ c h a n n e l s . m d \ " : \ " C t 3 - e T E 1 \ " , \ " r e f _ c o m m a n d s . m d \ " : \ " C 7 F 4 3 H m Y \ " , \ " r e f _ g a m e p l a y . m d \ " : \ " p Q u G s y T O \ " , \ " r e f _ k i n g d o m l e v e l . m d \ " : \ " B 3 q C H E q a \ " , \ " r e f _ p l a c e h o l d e r s . m d \ " : \ " D 1 G F S q F e \ " , \ " r e f _ p l a y e r l e v e l . m d \ " : \ " D 1 3 B e X 7 x \ " , \ " r e f _ p r o v i n c e l e v e l . m d \ " : \ " D o C L g i B X \ " , \ " r e f _ r a n k s . m d \ " : \ " D _ Q v H s 7 P \ " , \ " r e f _ w o r l d g u a r d . m d \ " : \ " 3 x Y M d f L V \ " } " ) ; w i n d o w . _ _ V P _ S I T E _ D A T A _ _ = J S O N . p a r s e ( " { \ " l a n g \ " : \ " e n - U S \ " , \ " d i r \ " : \ " l t r \ " , \ " t i t l e \ " : \ " V i t e P r e s s \ " , \ " d e s c r i p t i o n \ " : \ " A V i t e P r e s s s i t e \ " , \ " b a s e \ " : \ " / \ " , \ " h e a d \ " : [ ] , \ " r o u t e r \ " : { \ " p r e f e t c h L i n k s \ " : t r u e } , \ " a p p e a r a n c e \ " : t r u e , \ " t h e m e C o n f i g \ " : { \ " n a v \ " : [ { \ " t e x t \ " : \ " l a t e s t - K i n g d o m P l u g i n : 2 . 1 2 . 1 3 . 2 - R C \ " , \ " l i n k \ " : \ " h t t p s : / / j e n k i n s . r e c o r e h o s t i n g . c o m / j o b / U l t i m a t e K i n g d o m - 2 . X X / \ " } , { \ " t e x t \ " : \ " l a t e s t - e x c h a n g e P l u g i n : 2 . 1 2 . 3 . 1 - R C \ " , \ " l i n k \ " : \ " h t t p s : / / j e n k i n s . r e c o r e h o s t i n g . c o m / j o b / E x c h a n g e _ 2 . x / \ " } , { \ " t e x t \ " : \ " A P I \ " , \ " l i n k \ " : \ " / A P I \ " } , { \ " t e x t \ " : \ " C h a n g e l o g \ " , \ " l i n k \ " : \ " / c h a n g e l o g \ " } , { \ " t e x t \ " : \ " J a v a D o c s \ " , \ " l i n k \ " : \ " h t t p s : / / j e n k i n s . r e c o r e h o s t i n g . c o m / j o b / U l t i m a t e K i n g d o m - 2 . X X / j a v a d o c / \ " } ] , \ " f o o t e r \ " : { \ " m e s s a g e \ " : \ " U l t i m a t e K i n g d o m . n l \ " , \ " c o p y r i g h t \ " : \ " C o p y r i g h t © 2 0 2 2 - p r e s e n t R e c o r e H o s t i n g \ " } , \ " s o c i a l L i n k s \ " : [ { \ " i c o n \ " : \ " g i t h u b \ " , \ " l i n k \ " : \ " h t t p s : / / g i t . r e c o r e h o s t i n g . c o m / \ " } , { \ " i c o n \ " : \ " d i s c o r d \ " , \ " l i n k \ " : \ " h t t p s : / / d i s c o r d . g g / t 3 s F u D c 6 x z \ " } ] , \ " s e a r c h \ " : { \ " p r o v i d e r \ " : \ " l o c a l \ " , \ " o p t i o n s \ " : { \ " t r a n s l a t i o n s \ " : { \ " b u t t o n \ " : { \ " b u t t o n T e x t \ " : \ " Z o e k e n \ " , \ " b u t t o n A r i a L a b e l \ " : \ " Z o e k e n \ " } , \ " m o d a l \ " : { \ " n o R e s u l t s T e x t \ " : \ " g e e n r e s u l t a t e n v o o r \ " , \ " r e s e t B u t t o n T i t l e \ " : \ " r e s e t \ " , \ " f o o t e r \ " : { \ " s e l e c t T e x t \ " : \ " t e s e l e c t e r e n \ " , \ " n a v i g a t e T e x t \ " : \ " t e n a v i g e r e n \ " } } } , \ " l o c a l e s \ " : { \ " e n \ " : { \ " t r a n s l a t i o n s \ " : { \ " b u t t o n \ " : { \ " b u t t o n T e x t \ " : \ " S e a r c h \ " , \ " b u t t o n A r i a L a b e l \ " : \ " S e a r c h \ " } , \ " m o d a l \ " : { \ " n o R e s u l t s T e x t \ " : \ " N o r e s u l t s f o r \ " , \ " r e s e t B u t t o n T i t l e \ " : \ " R e s e t s e a r c h \ " , \ " f o o t e r \ " : { \ " s e l e c t T e x t \ " : \ " t o s e l e c t \ " , \ " n a v i g a t e T e x t \ " : \ " t o n a v i g a t e \ " } } } } } } } } , \ " l o c a l e s \ " : { \ " r o o t \ " : { \ " l a b e l \ " : \ " N e d e r l a n d s \ " , \ " l a n g \ " : \ " n l \ " , \ " t i t l e \ " : \ " h t t p s : / / u l t i m a t e k i n g d o m . n l \ " , \ " d e s c r i p t i o n \ " : \ " M i n e c r a f t U l t i m a t e K i n g d o m P l u g i n i n f o r m a t i o n \ " , \ " t h e m e C o n f i g \ " : { \ " d a r k M o d e S w i t c h L a b e l \ " : \ " D a r k / L i g h t \ " , \ " s i d e b a r M e n u L a b e l \ " : \ " M e n u \ " , \ " s i t e T i t l e \ " : \ " U l t i m a t e K i n g d o m . n l \ " , \ " l o g o \ " : \ " / l o g o . p n g \ " , \ " l a s t U p d a t e d T e x t \ " : \ " L a a t s t e a a n p a s s i n g \ " , \ " l a s t U p d a t e d \ " : { \ " f o r m a t O p t i o n s \ " : { \ " d a t e S t y l e \ " : \ " s h o r t \ " , \ " t i m e S t y l e \ " : \ " s h o r t \ " } , \ " t e x t \ " : \ " L a a t s t e w i j z i g i n g \ " } , \ " d o c F o o t e r \ " : { \ " p r e v \ " : \ " V o r i g e \ " , \ " n e x t \ " : \ " V o l g e n d e \ " } , \ " s i d e b a r \ " : [ { \ " t e x t \ " : \ " O v e r \ " , \ " c o l l a p s e d \ " : f a l s e , \ " i t e m s \ " : [ { \ " i t e m s \ " : [ { \ " t e x t \ " : \ " W a t i s u l t i m a t e k i n g d o m ? \ " , \ " l i n k \ " : \ " / a b o u t / i n f o r m a t i o n # w a t - i s - u l t i m a t e k i n g d o m \ " } , { \ " t e x t \ " : \ " P l u g i n u i t p r o b e r e n ? \ " , \ " l i n k \ " : \ " / a b o u t / i n f o r m a t i o n # p l u g i n - u i t p r o b e r e n \ " } , { \ " t e x t \ " : \ " L i c e n t i e ' s \ " , \ " l i n k \ " : \ " / a b o u t / i n f o r m a t i o n # l i c e n t i e - g e b r u i k - p l u g i n \ " } , { \ " t e x t \ " : \ " W i j z o e k e n \ " , \ " l i n k \ " : \ " / a b o u t / i n f o r m a t i o n # w i j - z o e k e n \ " } ] } ] } , { \ " t e x t \ " : \ " H a n d l e i d i n g \ " , \ " c o l l a p s e d \ " : f a l s e , \ " i t e m s \ " : [ { \ " t e x t \ " : \ " S e t u p \ " , \ " l i n k \ " : \ " / g u i d e / s e t u p \ " } , { \ " t e x t \ " : \ " K i n g d o m s \ " , \ " l i n k \ " : \ " / g u i d e / k i n g d o m s \ " } , { \ " t e x t \ " : \ " P r o v i n c i e s \ " , \ " l i n k \ " : \ " / g u i d e / p r o v i n c e \ " } , { \ " t e x t \ " : \ " W a r p s & S p a w n \ " , \ " l i n k \
2024-04-18 11:30:21 +02:00
< / body >
< / html >