CharacterDialogue icon

CharacterDialogue -----

Create interactive dialogues (and maybe quests) with NPCs!




For the little time I have I will try to be more active, I plan to rewrite the whole plugin, as it is a mess with legs
Changelog: Click here
New documentation: Click here
----------, Apr 19, 2025

Warning, don't put the update directly into your plugins folder, take the time to read, they changed quite a few things that will make it not work in previous versions.

After many months I have brought this update, it took a long time due to my personal life, I will try to bring updates more often. After this one I will be working on one to get out of the BETA, I have been quite inspired.

This update has several new things, I will talk about the changes below, but first I invite you to take a look at the new wiki on github.

Changes collected:
- The api has been greatly improved.
- Choices has been added
- Added the choice method
- Teleport method has been patched
- Added send_server method
- Added support for hex colors (&#hex)
- The code has been brutally optimized
- Changed the dialog path from dialogs.npcs to dialogue.
- Placeholders have been moved to config.yml
- Now dialogs are not unique per NPC, you must specify it in the configuration.
- And many more...

If you have any problems report them here, not in the reviews section.
----------, Feb 14, 2022

There was a problem with the cache when you exited the server while there was an incoming dialog session, right now that no longer happens.
----------, Oct 15, 2021

· A new function has been added, it is related to dialogs that can only be executed once, it is called "after first time" and its function is to make a dialog executable once or to execute another one after the first interaction.
This is an example of its use:
Code (YAML):
dialogs:
  npcs
:
    after-first-time-dialogue
:
      click
: RIGHT
      display-name
: '?????'
      npc-id
: 7356
      dialog
:
        - 'WAIT
: 2'
        - 'SEND
: &e[NPC] &4 %npc_name%&f: I'll tell you a story... no better not.'
      # This is the section of the function
      after-first-time
:
        # Defines whether it will be activated or deactivated.
        enabled
: true
        # What will be executed if the player has already interacted with the npc (if you don't want something to happen, delete it).
        dialog
:
         - 'SEND
: &c[NPC] &b %npc_name%&f: Don't talk to me...'
· The lang.yml file was updated, if you wish, delete it before starting your server.

· Fixed some problems with the memory data that the plugin has at the moment of an error when executing a dialog.

· A new subcommand has been added to the main command, it tries to clear a player that is stuck in the memory cache, you can use "characterdialogue clear-cache playerName" to get him out of there.

If you wonder what this would be useful for, it is just an extra that will serve if you can not interact with the npc again, run the command to your person and you can do it, the problems with the cache are because of the errors that have the methods of the dialogs, that is, if you put something wrong, and the algorithm of the method fails, you will be stuck in the memory cache. So yes, it serves to give you (a hand), since in previous versions, you had to restart the server to get out of there.

· Small changes.
----------, Oct 15, 2021

Good morning/afternoon/evening, I will tell you that I have been a little busy and I have not been able to take care of the things you have asked me to add, so little by little I will do them trying to ration my time, this update came because it was the easiest thing I had to do. This time I bring you placeholders, a new yaml file is made in which you will be able to store variables to later use them in the arguments of the dialogs.

Code (YAML):
placeholders:
  npc_start_placeholder
: '&e [NPC ] &b %npc_name%&f:'
  hello
: hello %player_name%
 
Here is an example using what I showed above:
Code (YAML):
dialogs:
  npcs
:
   placeholder-example
:
      click
: RIGHT
      display-name
: EXAMPLE
      npc-id
: 999
      dialog
:
      - 'SEND
: %npc_start_placeholder% %hello%'
      - 'SEND
: %npc_start_placeholder% this is a example from the placeholders.'
      - 'SEND
: %npc_start_placeholder% You can add and use it on methods! (only works in arguments, no in the method name)'
I have added a new method, this is to give position effects to the player.
Code (Text):
EFFECT: Effect-name,seconds,amplifier
example:
Code (Text):
EFFECT: BLINDNESS,60,2
In the name you must use the name of the code position, here you have the whole detailed list: click here

I have fixed some minor bugs, remember if you have problems with the plugin feel free to let me know in the plugin discussion!
----------, Oct 1, 2021

Support for holographic displays has been added.

You can now add holograms on npcs by adding a new section to the dialog:
Code (YAML):
hologram :
  # enable or disable the hologram
  enabled
: true
  # this will be added to the Y coordinates of npc
  y-position
: 0.4
  # the lines of the hologram
  lines
:
 - '&cJohn'
  - '&e&lCLICK'
Added a 'display-name' to the dialog so it can be used in parts of the dialogs and the hologram, the placeholder is '%npc_name%', you can use it both in the dialog lines and in the hologram.

Complete example made by me:
Code (YAML):
dialogs:
  npcs
:
    soldier
:
      click
: RIGHT
      display-name
: Soldier
      npc-id
: 0
      dialog
:
      - 'SEND
: &e[NPC] &b %npc_name%&f: Hello %player_name%!'
      - 'SOUND
: ENTITY_VILLAGER_YES,0.7,0.5'
      - 'WAIT
: 1'
      - "SEND
: &e[NPC] &b %npc_name%&f: You are new around here, aren't you?"
      - 'SOUND
: ENTITY_VILLAGER_YES,0.7,0.6'
      - 'WAIT
: 1'
      - 'SEND
: &e[NPC] &b %npc_name%&f: I recommend going &bsouth &fto find the city.'
      - 'SOUND
: ENTITY_VILLAGER_YES,1,0.4'
      - 'WAIT
: 2'
      - 'SEND
: &7'
      - 'SEND
: &7          &7&lNext objective&f : enter the city.'
      - 'SOUND
: BLOCK_NOTE_PLING,1,0.1'
      hologram
:
        enabled
: true
        # Optional
        y-position
: 0.4
        lines
:
         - '&b %npc_name%'
          - '&6&lCLICK'
[​IMG]

Now the config.yml file won't load, that's because I didn't add anything but created the empty file, now it doesn't happen.

I expanded the api, now you can use " CharacterDialoguePlugin.getInstance().getApi();" to get it.

Added "ALL" click type in which makes an npc's dialog run with any of the 2 mouse clicks, it was already implemented before, but now the bug is fixed.

Note: the holograms are also reloaded with the "reload" subcommand of the main command.

It took me a long time to do this even though it was simple because I had things to do besides programming.
As an approximation of what I will do for the next one, it will be placeholders to make it easier and shorter.
----------, Sep 22, 2021

renamed player name local variable from '%player%' to '%player_name%'
----------, Sep 13, 2021

A small bug has been fixed: placing a non-existent method did not allow you to continue executing other dialogs, now placing a method that does not exist will stop executing the interaction.
----------, Sep 13, 2021

Updates:


- A change has been made that affects the dialog file, now for the section it is not the npc id, now it is the interaction name, and to define the npc, you must add 'npc-id' next to the npc id. Example:
Code (YAML):
dialogs:
  npcs
:
    dialogue-name
:
      click
: RIGHT
      npc-id
: 0
      dialog
:
      - 'SEND
: Send method'
- PlaceHolderAPI support has been added, with this you can use player variables, such as %player_name% and others; if you don't have the plugin, you can use %player% to get the name, to clarify: if the " PlaceHolderAPI" plugin is present on the server, the variable provided by CharacterDialogue will not work. (remember to use /papi ecloud download Player and /papi reload to be able to use the variables, you can use placeholders in all methods)

- An api has been added. Waiting for your documentation...
----------, Sep 13, 2021

set 'CURRENT_PLAYER_WORLD' to 'current' for teleport method.
example:
· TELEPORT: current,x,y,z,current,current
----------, Sep 2, 2021

Fixed the bug that did not allow you to continue executing actions after the first time.
----------, Aug 31, 2021

Resource Information
Author:
----------
Total Downloads: 5,798
First Release: Aug 31, 2021
Last Update: Apr 19, 2025
Category: ---------------
All-Time Rating:
31 ratings
Find more info at e-z.tools...
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings