import dev.hauch.hchat.api.HChatProvider;import dev.hauch.hchat.model.ChatChannel;public class MiListener { public void ejemplo() { HChatProvider api = HChatProvider.get(); // Quién está en modo espía ahora for (UUID uuid : api.spyManager().getSpies()) { // ... } // Último mensaje privado recibido por un jugador api.messageHistory().getLastMessage(jugador.getUniqueId()); // Canal activo del jugador ChatChannel canal = api.channelManager().activeChannel(jugador); // Difunde por un canal existente api.publishToChannel(api.channelManager().get("staff"), "El servidor se reinicia en 5 minutos!"); // Estado DND api.dndManager().isDnd(jugador); }}
HChatProvider.get() lanza IllegalStateException antes de que el plugin se inicialice por completo. Accede a ella desde ServerLoadEvent o más tarde.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Team Hauchdev","colors":{"primary":"#2563EB","light":"#3B82F6","dark":"#1E40AF"},"logo":{"light":"https://mintcdn.com/hauch-dev/ogQCNO8H57rtUi3O/logo/logo.png?fit=max\u0026auto=format\u0026n=ogQCNO8H57rtUi3O\u0026q=85\u0026s=e9a9bf8ec5c8d3aed979adcbc7a54d16","dark":"https://mintcdn.com/hauch-dev/ogQCNO8H57rtUi3O/logo/logo.png?fit=max\u0026auto=format\u0026n=ogQCNO8H57rtUi3O\u0026q=85\u0026s=e9a9bf8ec5c8d3aed979adcbc7a54d16"},"favicon":"https://mintcdn.com/hauch-dev/ogQCNO8H57rtUi3O/logo/logo.png?fit=max\u0026auto=format\u0026n=ogQCNO8H57rtUi3O\u0026q=85\u0026s=e9a9bf8ec5c8d3aed979adcbc7a54d16","navbar":{"links":[{"href":"https://github.com/hauchdev","label":"GitHub"},{"href":"https://github.com/hauchdev/hLobby","label":"hLobby"},{"href":"https://github.com/hauchdev/hChat","label":"hChat"}],"primary":{"type":"button","label":"Releases","href":"https://github.com/hauchdev/hChat/releases"}},"footer":{"socials":{"github":"https://github.com/hauchdev"},"links":[{"header":"Projects","items":[{"label":"hLobby","href":"https://github.com/hauchdev/hLobby"},{"label":"hChat","href":"https://github.com/hauchdev/hChat"}]},{"header":"Community","items":[{"label":"Contributing","href":"/en/contributing"},{"label":"Team","href":"/en/team"}]}]},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"languages":[{"language":"en","href":"en"},{"language":"es","href":"es"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"hauch-dev","hasAudioNarration":false,"actualSubdomain":"hauch-dev","customDomains":["docs.hauch.dev"],"gitSource":{"type":"github","owner":"hauchdev","repo":"hauchdocs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"latestBuiltDeploymentHistoryId":"6ad527caae0c8a39b007f673","collectionId":"e66668f6-416c-4171-9f82-3bc45bd51ae0","liveDeploymentHistoryId":"6ad527caae0c8a39b007f673","schemaVersion":"v3"},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6ad52aabcfe0d5be20f7be69","clientVersion":"0.0.3908","searchFilterCounts":[{"language":"en","tag":"hChat","count":13},{"language":"es","tag":"hChat","count":13},{"language":"en","tag":"hLobby","count":9},{"language":"es","tag":"hLobby","count":9},{"language":"en","tag":"Community","count":2},{"language":"es","tag":"Comunidad","count":2},{"language":"en","tag":"Home","count":1},{"language":"es","tag":"Inicio","count":1}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"es/hChat/api","slug":"/es/hChat/api","pageMetadata":{"title":"API de desarrollador de hChat","description":"Integra hChat en tus propios plugins.","icon":"code","href":"/es/hChat/api"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Integra hChat en tus propios plugins.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,p:`p`,pre:`pre`,span:`span`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[_jsx(_components.code,{children:`HChatProvider`}),` es el punto de entrada público para otros plugins.`]}),`\n`,_jsx(Heading,{level:`2`,id:`obtener-la-api`,children:`Obtener la API`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`27`,language:`java`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`java`,children:_jsxs(_components.code,{language:`java`,numberOfLines:`27`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` dev.hauch.hchat.api.HChatProvider;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` dev.hauch.hchat.model.ChatChannel;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`public`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` class`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` MiListener`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` public`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:` void`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` ejemplo`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:` HChatProvider`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` api`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` HChatProvider`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`get`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Quién está en modo espía ahora`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:`UUID`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` uuid`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` :`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` api`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`spyManager`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getSpies`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()) {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // ...`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Último mensaje privado recibido por un jugador`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` api`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`messageHistory`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getLastMessage`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`jugador`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getUniqueId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`());`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Canal activo del jugador`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:` ChatChannel`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` canal`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` api`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`channelManager`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`activeChannel`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(jugador);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Difunde por un canal existente`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` api`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`publishToChannel`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`api`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`channelManager`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`get`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"staff\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"El servidor se reinicia en 5 minutos!\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Estado DND`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` api`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`dndManager`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`isDnd`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(jugador);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`HChatProvider.get()`}),` lanza `,_jsx(_components.code,{children:`IllegalStateException`}),` antes de que el plugin se inicialice por completo. Accede a ella desde `,_jsx(_components.code,{children:`ServerLoadEvent`}),` o más tarde.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`declaración-de-dependencia`,children:`Declaración de dependencia`}),`\n`,_jsxs(_components.p,{children:[`Otros plugins que dependan de hChat deben declararlo como `,_jsx(_components.code,{children:`softdepend`}),` (o `,_jsx(_components.code,{children:`depend`}),`) en su `,_jsx(_components.code,{children:`plugin.yml`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`yaml`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`MiPlugin`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`version`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1.0.0`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`main`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`com.ejemplo.miplugin.MiPlugin`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`softdepend`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` - `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`hChat`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`servicios-de-la-api`,children:`Servicios de la API`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Servicio`}),_jsx(_components.th,{children:`Descripción`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`spyManager()`})}),_jsx(_components.td,{children:`Consultar y alternar modo espía.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`messageHistory()`})}),_jsx(_components.td,{children:`Acceder a mensajes privados recientes.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`channelManager()`})}),_jsx(_components.td,{children:`Consultar y cambiar canales.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`dndManager()`})}),_jsx(_components.td,{children:`Consultar y alternar estado DND.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`publishToChannel(channel, message)`})}),_jsx(_components.td,{children:`Difundir a un canal respetando su see-permission.`})]})]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"API de desarrollador de hChat","description":"Integra hChat en tus propios plugins.","icon":"code","href":"/es/hChat/api"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Obtener la API","slug":"obtener-la-api","depth":2,"children":[]},{"title":"Declaración de dependencia","slug":"declaración-de-dependencia","depth":2,"children":[]},{"title":"Servicios de la API","slug":"servicios-de-la-api","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"hauch-dev","siteName":"Team Hauchdev","title":"API de desarrollador de hChat - Team Hauchdev","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/en/hChat/api","matchLevel":1},"es":{"href":"/es/hChat/api","matchLevel":0}}},"lastModified":"2026-10-18T20:05:52.518Z","originalFileLocation":"es/hChat/api.mdx","locale":"es"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Integra hChat en tus propios plugins.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Team Hauchdev\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/hauch-dev/zl1aywVN8NkUwOwF/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/hauch-dev/zl1aywVN8NkUwOwF/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/hauch-dev/zl1aywVN8NkUwOwF/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/hauch-dev/zl1aywVN8NkUwOwF/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/hauch-dev/zl1aywVN8NkUwOwF/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/hauch-dev/zl1aywVN8NkUwOwF/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/hauch-dev/zl1aywVN8NkUwOwF/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/hauch-dev/zl1aywVN8NkUwOwF/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/hauch-dev/zl1aywVN8NkUwOwF/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"API de desarrollador de hChat - Team Hauchdev\">\u003cmeta data-mint-head property=\"og:description\" content=\"Integra hChat en tus propios plugins.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Team Hauchdev\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.hauch.dev/es/hChat/api\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"API de desarrollador de hChat - Team Hauchdev\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Integra hChat en tus propios plugins.\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/hauch-dev/zl1aywVN8NkUwOwF/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Team Hauchdev\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#2563EB\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.hauch.dev/es/hChat/api\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/es/hChat/api.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"es\" href=\"https://docs.hauch.dev/es/hChat/api\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.hauch.dev/en/hChat/api\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.hauch.dev/en/hChat/api\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.hauch.dev/#organization\",\"name\":\"Team Hauchdev\",\"url\":\"https://docs.hauch.dev\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/hauch-dev/ogQCNO8H57rtUi3O/logo/logo.png?fit=max\u0026auto=format\u0026n=ogQCNO8H57rtUi3O\u0026q=85\u0026s=e9a9bf8ec5c8d3aed979adcbc7a54d16\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.hauch.dev#website\",\"name\":\"Team Hauchdev\",\"url\":\"https://docs.hauch.dev\",\"publisher\":{\"@id\":\"https://docs.hauch.dev/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.hauch.dev/es/hChat/api#webpage\",\"url\":\"https://docs.hauch.dev/es/hChat/api\",\"name\":\"API de desarrollador de hChat\",\"description\":\"Integra hChat en tus propios plugins.\",\"dateModified\":\"2026-10-18T20:05:52.518Z\",\"isPartOf\":{\"@id\":\"https://docs.hauch.dev#website\"},\"breadcrumb\":{\"@id\":\"https://docs.hauch.dev/es/hChat/api#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.hauch.dev/es/hChat/api#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"hChat\",\"item\":\"https://docs.hauch.dev/es/hChat/index\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"API de desarrollador de hChat\",\"item\":\"https://docs.hauch.dev/es/hChat/api\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.hauch.dev/es/hChat/api#article\",\"headline\":\"API de desarrollador de hChat\",\"name\":\"API de desarrollador de hChat\",\"description\":\"Integra hChat en tus propios plugins.\",\"url\":\"https://docs.hauch.dev/es/hChat/api\",\"mainEntityOfPage\":{\"@id\":\"https://docs.hauch.dev/es/hChat/api#webpage\"},\"dateModified\":\"2026-10-18T20:05:52.518Z\",\"publisher\":{\"@id\":\"https://docs.hauch.dev/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.hauch.dev#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Team Hauchdev\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Team Hauchdev","nav":{"global":null,"languages":[{"language":"en","pages":[{"title":"en","href":"/en/hChat/api"}]},{"language":"es","groups":[{"group":"Inicio","pages":[{"title":"Documentación de Team Hauchdev","icon":"house","href":"/es"}]},{"group":"hLobby","pages":[{"title":"Visión general de hLobby","icon":"server","href":"/es/hLobby/index"},{"title":"Instalar hLobby","icon":"download","href":"/es/hLobby/installation"},{"title":"Configuración de hLobby","icon":"sliders","href":"/es/hLobby/configuration"},{"title":"Comandos de hLobby","icon":"terminal","href":"/es/hLobby/commands"},{"title":"Permisos de hLobby","icon":"lock","href":"/es/hLobby/permissions"},{"title":"Localización de hLobby","icon":"language","href":"/es/hLobby/localization"},{"title":"API de desarrollador de hLobby","icon":"code","href":"/es/hLobby/api"},{"title":"Compilar hLobby desde el código fuente","icon":"hammer","href":"/es/hLobby/building"},{"title":"Solución de problemas de hLobby","icon":"wrench","href":"/es/hLobby/troubleshooting"}]},{"group":"hChat","pages":[{"title":"Visión general de hChat","icon":"comments","href":"/es/hChat/index"},{"title":"Instalar hChat","icon":"download","href":"/es/hChat/installation"},{"title":"Configuración de hChat","icon":"sliders","href":"/es/hChat/configuration"},{"title":"Comandos de hChat","icon":"terminal","href":"/es/hChat/commands"},{"title":"Permisos de hChat","icon":"lock","href":"/es/hChat/permissions"},{"title":"Canales de hChat","icon":"tower-broadcast","href":"/es/hChat/channels"},{"title":"Filtros de hChat","icon":"filter","href":"/es/hChat/filters"},{"title":"Localización de hChat","icon":"language","href":"/es/hChat/localization"},{"title":"Placeholders de hChat","description":"Placeholders de PlaceholderAPI registrados por hChat.","icon":"puzzle-piece","href":"/es/hChat/placeholders"},{"title":"API de desarrollador de hChat","icon":"code","href":"/es/hChat/api"},{"title":"hChat en proxies","description":"Notas para ejecutar hChat detrás de Velocity o BungeeCord.","icon":"network-wired","href":"/es/hChat/proxy"},{"title":"Compilar hChat desde el código fuente","icon":"hammer","href":"/es/hChat/building"},{"title":"Solución de problemas de hChat","icon":"wrench","href":"/es/hChat/troubleshooting"}]},{"group":"Comunidad","pages":[{"title":"Contribuir","icon":"github","href":"/es/contributing"},{"title":"Equipo","icon":"users","href":"/es/team"}]}]}]},"title":"API de desarrollador de hChat - Team Hauchdev","buildId":"dpl_CUnGQP1HgFUzoxatVC37y4zP83Vx","deploymentId":"dpl_CUnGQP1HgFUzoxatVC37y4zP83Vx","dynamics":[],"chunks":[]}