Minecraft Leaks

DiscordMinecraft [1.8 - 1.15.X] Linking, Custom Commands & More 2.4.5

Submitted by kylevardy, , Thread ID: 171466

Thread Closed
kylevardy
Novice
Level:
0
Reputation:
0
Posts:
38
Likes:
11
Credits:
344
11-05-2020, 06:48 PM
This post was last modified: 11-05-2020, 07:52 PM by kylevardy
#1
Unlock to download
Content locked
This content has been locked. Please login or register in order to unlock it.


Tested Minecraft Versions:
  • 1.8

  • 1.9

  • 1.10

  • 1.11

  • 1.12

  • 1.13

  • 1.14

  • 1.15
DiscordMinecraftis a plugin dedicated to providing the best Discord Minecraft linking available.


[Image: 98583c498792676064f000be162fd64f0da29893...8W9lR7.png]
  • Create your own Discord commands that affect in-game.

  • Send messages to Discord from in-game.

  • Connect your own Discord bot account.

  • Link Discord and Minecraft accounts.

  • Role/rank syncing.

  • MySQL support.

  • All messages configurable.

  • Use placeholders from PlaceholderAPI.

  • Sync chat between Discord and Minecraft.

  • Supports 1.8 - 1.14.X.

  • Change the presence of the bot.

  • Execute command when players link their account.

  • Interact with the console from Discord.
The plugin is now in BETA. Please report any bugs found and I will fix them as soon as possible.

[Image: 899828e68729841ae07b0420642e14ef2527b454...hkEA1L.png]

  1. Purchase and download plugin. Add plugin to your plugins folder on your server.

  2. DownloadPlaceholderAPIadd to your plugins folder. (If DiscordMinecraft doesn't automagically download it).

  3. (Re)start then stop your server.

  4. Find the configuration file and open it.

  5. Navigate to
    https://discordapp.com/developers/applic.../me/create.

  6. Name the application and save changes.

  7. Select 'Bot' on the sidebar and then 'Add bot'.

  8. Reveal the bot token where it says 'Click to reveal token' (under Token).

  9. Copy the token and paste it in the bot-token field in the config.

  10. Edit the bot settings to your liking.

  11. Select OAuth2 in the sidebar.

  12. Select bot under scopes, then Administrator under bot permissions.

  13. Copy the generated link and follow it.

  14. Select your server and then Authorize.

  15. Open Discord and enable developer mode (Settings > Appearance).

  16. Right click on your guild in the sidebar and select Copy ID.

  17. Paste the id in the guild-id field in the config.

  18. Edit the rest of the config to your liking.

  19. Start your server.
If you are using BungeeCord:
Note: The BungeeCord version doesn't work properly, and therefore is undergoing a codebase change.
  1. Install the plugin on each of your servers in your network.

  2. Change 'bungee' in your config to 'true'.

  3. Configure MySQL in each individual server, so the servers are synced up to the same database.

  4. Download the plugin on your BungeeCord server.

  5. Add the guild ID and bot token (the same you added for the individual servers).

  6. Start your BungeeCord server.
[Image: af31db6d1d763355128cdb3077069edf629c19ac...X3tvds.png]

[[disallowed website]]


[Image: b2bb2558cf8a8f4f7fc2268b4e7164e9c82d120e...w0juy9.png]

/discordsay [channel] [message]
Sends a message to the specified channel.
discordminecraft.discordsay

/discordlink
Initiates an account link with Discord.
discordminecraft.discordlink

/discordunlink
Unlinks your account from Discord.
discordminecraft.discordunlink

/togglediscordchat(or /tdc)
Toggles whether you see chat syncing with Discord.
discordminecraft.tdc

/senddiscordchat [message](or /sdc)
Sends a chat message to Discord.
discordminecraft.sdc

/discord
Sends the player a message with a link to the Discord server
discordminecraft.discord


[Image: e7f1b8c2dc9e1cee54f9e43bc02e386209b1c05c...1zOO8h.png]

This plugin allows you to create custom commands using the config. An annotated example of this, explaining how to create commands can be found below and in the config itself.

If you are using BungeeCord, create these in your BungeeCord config, otherwise just create them in your server config.

Currently available actions and conditions
More actions and conditions will be added in a future update. If you would like me to implement an action or condition, contact me and I'll see what I can do.

You can refer to an argument in the command by putting the argument number in squiggly brackets. Putting a + after this number refers to all arguments after and including that argument (with spaces between them).

Some actions support placeholders from PlaceholderAPI, these have been marked accordingly. You can find a full list of available placeholders here:https://www.spigotmc.org/wiki/placeholderapi-placeholders/

The plugin provides some placeholders for actions and conditions. These can be seen below:
{SENDER_NICK} Gets the nickname the user is using in your guild.
{SENDER} Gets the username of the sender's Discord account.
{FIRST_PLAYER} Grabs the username of the first available player on the server ('none' if the server is empty)

Arguments for the action/condition are separated with a |.

Actions:
[botMessage] {message}Sends a message from the bot (in Discord) in the channel the message was sent in.
[messagePlayer] {player}|{message}Sends a message to a player in Minecraft. Supports placeholders.
[executeConsoleCommand] {command}Executes a specific command from the console. If you are using BungeeCord, this executes the command in the BungeeCord console.
[executePlayerCommand] {player}|{command}Executes a specified command from the specified player. Supports placeholders. If you are using BungeeCord, this executes the command from the Spigot server the player is located on.
[executePlaceholderConsoleCommand] {placeholder context}|{command}Executes a specified command from the console. Supports placeholders, but an online player must be given as the first argument. If you are using BungeeCord, this performs the command on the server of the player given in placeholder context.

Conditions:
[minArgs] {amount}Sets the minimum amount of arguments for the command.
[maxArgs] {amount}Sets the maximum amount of arguments for the command.
[argsIsInt] {arg num}Checks whether the specified argument is an integer (whole number). You don't need to put the argument in squiggly brackets.
[argsIsNumber] {arg num}Checks whether the specified argument is a number. You don't need to put the argument in squiggly brackets.
[isNameOfOnlinePlayer] {arg num}Checks if an argument is the name of anonline player.You don't need to put the argument in squiggly brackets.

Code (YAML):

################
### Commands ###
################

# You can simply add commands to the bot as seen below:
# This example is fully annotated and shows an implementation
# of all functionality. It is recommended to save a copy of
# this for future reference, but if you lose it you can
# find it on the resource page.
#
# In this particular example, we are making a command that
# allows moderators to message online players from Discord.
#
# Create a command by simply creating a new config key named
# "command-{name}" with {name} being the command that should
# be executed, for example in ?msg, "msg" is the name.
command-msg:

# Within this, create a key for the role. Set this to the name
# of the role, or "everyone" if anyone can use it.
role:Moderator

# Here you can set the conditions required for the command
# to successfully execute and call the actions (lower down).
# A list of all conditions with detailed descriptions can
# be found on the resource page.
#
# Please note that conditions are checked in order and will
# stop being checked once one is false.
conditions:

# Here, we are checking that the amount of arguments is at
# least 2. This because we need to supply the name of the
# user and at least one word for the message.
- '[minArgs]2'

# The player's name is the first argument, so we are checking
# that the first argument matches the name of an online
# player.
- '[isNameOfOnlinePlayer]1'

# Actions are what will occur if all of the conditions evaluate
# as true. The format is similar to that of the conditions section:
# giving the type of action, then any data that goes with it. As
# with conditions, we work chronologically through the list of
# actions.
actions:

# This sends a message to the player in the first argument, containing
# the sender's Discord name and the rest of the arguments.
- '[messagePlayer] {1}|&lDISCORD:&r{SENDER}>> &o{2+}'

# This responds to the command, notifying the sender that the
# message has been sent to the player.
- '[botMessage] :white_check_mark:Message has been delivered.'

[Image: 81cf4dc4431369ebab42c19c4a1d8467b00bacdf...aNReZ5.png]

Players can sync their Minecraft rank with Discord roles. For this to work, you must add a list of the names of the roles to be synced from Discord in the config, then for the Minecraft rank, add the permission node of discordminecraft.syncrank.{Role Name}, role name being the name of the Discord role, exactly how you put it in the config.If the role name contains a space, replace this with a dash (-).

Once you have set this up, ranks will be automatically synced between players that have linked their accounts on every login. Players type /discordlink in-game and further instructions are given to them.


[Image: 6fd24e82e8ff7d3d368223285d247647784101dd...q4pxol.png]

You can choose to have a chat channel in-game synced with a Discord channel. This is easily set up through the config. It is disabled by default as an ID of the channel for these messages from Discord is required.

You can toggle it so that messages sent in chat are sent on here by just running /senddiscordchat (/sdc).
Code (YAML):

# Here you can change options for the chat sync feature.
chat-sync:

# Whether to enable chat sync.
enabled:false

# ID of channel to be used, where messages are sent.
# Get this by enabling Developer Mode in User Settings ->
# Appearance and scrolling down to the advanced section. Once
# enabled, right click on the channel, select 'Copy ID' and
# paste it here.
channel:123456789

# How the messages will be formatted in-game and in Discord.
# %s (sender name)
# %m (message)
chat-format:'&e&l%s &f>> &e%m'
discord-chat-format:'**%s**: %m'

# Whether players will automatically be able to see chat
# sync messages when they login. If this is disabled, they
# will have to manually enable this every login typing /tdc.
enable-on-join:true

[Image: 008de37ac6db80564c93dbeaf8a9787445f1feb4...Rv6iAs.png]

Here are some images of the plugin in action!
[Image: b27965b845420175d2dbb67967a98d4eef1b199a...eight%3D57]
[Image: 79ccde3acc79c96ae33d02d38ca330505bda0af5...eight%3D20]
[Image: 3533aeabce7f25e12dbee69db06482a788fa7490...ight%3D261]


[Image: fdafc5e2928d3d954efb5e6b00256a8ed1782ba0...9P7f1J.png]

A large percentage of the plugin has configurable options. Here is a copy of the default config incase you lose it!
Code (YAML):

# Don't change this
config-version:1

# You will need to create a new application on
# https://discordapp.com/developers/applic.../me/create
#
# Give it a sensible name then click 'Create App'.
# Scroll down and click 'Create a Bot User'.
# Then reveal the bot token where it says 'Token: click to reveal'.
# Finally paste this token here
bot-token:'INSERT TOKEN'

# Set this to the ID of the guild that the bot will be used
# for and any in-game functionality will take effect here.
# Get this by enabling Developer Mode in User Settings ->
# Appearance and scrolling down to the advanced section. Once
# enabled, right click on the guild, select 'Copy ID' and
# paste it here.
guild:123456789

# This is whether you are using BungeeCord. Install the plugin
# on a BungeeCord server as well if you are.
bungee:false


# Presence for the bot.
presence:
enabled:true

# Case sensitive. One from: DO_NOT_DISTURB, IDLE, INVISIBLE, OFFLINE, ONLINE, UNKNOWN
status:ONLINE

# Case sensitive. One from DEFAULT, LISTENING, WATCHING
type:DEFAULT

# The text the bot is playing / listening to / watching
text:DiscordMinecraft


# This is the settings for MySQL, if you wish to use it for
# data. If MySQL is disabled, YAML will be used by default.
mysql:

# Whether or not to use MySQL for data.
enabled:false

# The IP of the database.
ip:127.0.0.1

# The name of the database.
database:discord_minecraft

# The username for the database user.
username:username

# The password for the database user.
password:password


# The character used before the command.
bot-prefix:'?'

role-sync:
enabled:true

# The Discord role (case sensitive) that should be synced with Minecraft.
roles:
- Moderator


chat-sync:
enabled:false
channel-id:123456789

# How the messages will be formatted in-game and in Discord.
# %s (sender name)
# %m (message)
chat-format:'&e&l%s &f>> &e%m'
discord-chat-format:'**%s**: %m'

# Whether players will automatically be able to see chat
# sync messages when they login. If this is disabled, they
# will have to manually enable this every login typing /tdc.
enable-on-join:true


console-sync:
enabled:false
channel-id:123456789

# This is the amount of console logs required for one message
# to be sent in Discord. Set this to higher the faster your
# console. This does not affect log messages when interacting
# with the console from the Discord.
logs-per-message:10


# Settings for the /discord command. The intention of this command
# is to direct players to the Discord server.
discord-command:

# Set to true to enable this command.
enabled:true

# An invite link to the Discord server.
discord-link:https://[disallowed website]/

# The message to send when the command is activated. The {LINK}
# variable is the instant invite link specified above.
message:'&6Join our Discord at:&7&n{LINK}'


discord-say-command:
enabled:true


################
### Messages ###
################

# This is the message that will be sent if the user
# does not have the correct permissions to execute the
# command.
no-permission-message:'**Error**:You do not have permission to execute this command.'

# Message when the condition [minArgs] is false.
not-enough-args-message:'**Error**:Incorrect usage.'

# Message when the condition [maxArgs] is false.
too-many-args-message:'**Error**:Incorrect usage.'

# Message when the condition [argsIsInt] or [argIsNumber] is false.
invalid-args-message:'**Error**:Incorrect usage.'

# Message when the condition [isNameOfOnlinePlayer] is false.
player-offline-message:'**Error**:Player not found.'

discord-say-message:'**From Minecraft({player})**:{message}'

# These are the in-game messages that can be configured.
messages:
no-permission:'&cYou don''t have permission to execute this command!'
invalid-usage:'&cInvalid command usage.'
already-linked:'&cYou have already linked your account.'
sent-message-to:'Message sent to:{channel}'
toggled-discord-chat:'Discord chat has been toggled:{status}.'
send-on-discord:'&7You need to confirm on Discord! Send the command &a?confirm{code}{username}&7within 10 minutes to confirm!'
removed-link:'&7Removed link.'


################
### Commands ###
################

# You can simply add commands to the bot as seen below:
# This example is fully annotated and shows an implementation
# of all functionality. It is recommended to save a copy of
# this for future reference, but if you lose it you can
# find it on the resource page.
#
# In this particular example, we are making a command that
# allows moderators to message online players from Discord.
#
# Create a command by simply creating a new config key named
# "command-{name}" with {name} being the command that should
# be executed, for example in ?msg, "msg" is the name.
command-msg:

# Within this, create a key for role. Set this to the name
# of the role, or "everyone" if anyone can use it.
role:Moderator

# Here you can set the conditions required for the command
# to successfully execute and call the actions (lower down).
# A list of all conditions with detailed descriptions can
# be found on the resource page.
#
# Please note that conditions are checked in order and will
# stop being checked once one is false.
conditions:

# Here, we are checking that the amount of arguments is at
# least 2. This because we need to supply the name of the
# user and at least one word for the message.
- '[minArgs]2'

# The player's name is the first argument, so we are checking
# that the first argument matches the name of an online
# player.
- '[isNameOfOnlinePlayer]1'

# Actions are what will occur if all of the conditions evaluate
# as true. The format is similar to that of the conditions section:
# giving the type of action, then any data that goes with it. As
# with conditions, we work chronologically through the list of
# actions.
actions:

# This sends a message to player in the first argument, containing
# the sender's Discord name and the rest of the arguments.
- '[messagePlayer] {1}|&lDISCORD:&r{SENDER}>> &o{2+}'

# This responds to the command, notifying the sender that the
# message has been sent to the player.
- '[botMessage] :white_check_mark:Message has been delivered.'


# These are the commands that will be executed when the player links their
# account with Discord. Set to `link-reward-commands: []` for no command to
# be executed. The {PLAYER} variable is the name of the player who has linked
# their account.
link-reward-commands:
- 'msg{PLAYER}hello'

[Image: d6b27951a216ca2fecff6bf0e3cd35bccbadeebb...mozbA9.png]

You may not resell or republish the content.
You may not decompile the plugin, nor may you have a refund (this includes no chargebacks).

Users browsing this thread: 1 Guest(s)