#/store help
1 messages · Page 1 of 1 (latest)
ohhh
returning true means the command has been successfully processed, false will show the usage message
makes sense thanks a lot im new to using spigot api and stuff
you should be returning true in the code blocks, and returning false if none of the code block conditions were met
alright thanks guys i did it but let me test it
now the message appears blank and if you saw in this code I tried to get it from the config
let me show you the config
(im trying to remake minemen club plugins bc me and my friends wanna remake it)
did I do anything wrong
does the message not exist? just print smth to the terminal to see if it actually works
wait print something in minecraft console or use "System.out.println" in the code?
same thing
alright let me try
actually i have this print out when the plugin enables and it works (just doesnt have the color)
if you really want color codes, Bukkit.getConsoleSender().sendMessage() would work but you generally dont want to color stuff in console
alright
but it does show the message
at first I thought it was because config.yml is formatted incorrectly
but now i dont know
just print the config message
yeah but I want the messages to be editable because I might give the plugin to one of my friends since its not just for minemen club remake
ye i mean get the message from config and print whats inside
just assign your plugin.getConfig().getString() to a variable and sysout it
smh just realized
wym
wasnt looking at the path 🥹
what dependancy do I use for this bc this what shows unless i did it wrong
where is your quotations?
yep
thank you very much
you guys were helpful
as i said im new to spigot api but im still learning
The Configuration API is a set of tools to help developers quickly parse and emit configuration files that are human readable and editable. Despite the name, the API can easily be used to store plugin data in addition to plugin configuration. Presently only YAML configurations can be used. The API however was designed to be extensible and allow ...
thx
wait how can I fix this the color codes dont work and its sending a message to the player not the console so I don't think I can do "Bukkit.getConsoleSender().sendMessage()"
do this?translateAlternateColorCodes("&", "String here")
wait how can I add it to here
player.sendMessage(ChatColor.translateAlternateColorCodes("&", this.plugin.getConfig().getString("Messages.store")));
add the import for ChatColor
fixed it
yeah i did that
i just did
wth
i never knew it could say "Someone didn't code the command well :c"
i have 0 errors on intellij
show what you have now for code
why do you check if the args length is 0?
where
you added one two many S's to messages
should be good now 🙂