My config is not working help please

Status
This thread has been locked.

chelsea1124

⚔️professional config and server creator⚔️
Premium
Feedback score
17
Posts
423
Reactions
53
Resources
3
My command code:


My config:


So what is ament to happen is that everything in the config is ament to appear in the to bars so like this:

-----------------Staff---------------
What is in the config:
Owner: 'none'
Manager: 'none'
Developer: 'Chelsea1124'
Admin: 'none'
Moderator: 'none'
Helper: 'none'
-----------------Staff---------------

But all that is appearing atm is
-----------------Staff---------------
-----------------Staff---------------

and I also want it to where they can change the colour of the Developer and all the ranks to make it where they can make it to what they want it to look like and add colours to the names and all that as well

if you can help please pm me thank you from chelsea1124/chelsea1124HD
 
PebbleHost
High performance, consistent uptime and fast support. Minecraft hosting that just works.

Fantasy

Feedback score
0
Posts
40
Reactions
11
Resources
0
You grab a stringList called 'Owners' from your config.yml but there is no section there, that goes for all of the ranks.

EDIT: I would write u an example class of how it should work properly, but it's 2:33 am and I don't feel like it right now.
 
Last edited:

MehBoss

Feedback score
0
Posts
21
Reactions
2
Resources
0
My command code:


My config:


So what is ament to happen is that everything in the config is ament to appear in the to bars so like this:

-----------------Staff---------------
What is in the config:
Owner: 'none'
Manager: 'none'
Developer: 'Chelsea1124'
Admin: 'none'
Moderator: 'none'
Helper: 'none'
-----------------Staff---------------

But all that is appearing atm is
-----------------Staff---------------
-----------------Staff---------------

and I also want it to where they can change the colour of the Developer and all the ranks to make it where they can make it to what they want it to look like and add colours to the names and all that as well

if you can help please pm me thank you from chelsea1124/chelsea1124HD

Told you ;)

Add an s on the config groups...

  1. if (Bukkit.getPlayer(ChatColor.stripColor(Developer)).isOnline()) {
  2. developerArray.add(ChatColor.translateAlternateColorCodes('&', Developer));
You should be adding the player's name to the array without chat color. Same for the stripColor.. remove it
 
Last edited:

Naaathan

Premium
Feedback score
6
Posts
20
Reactions
27
Resources
0
The data in the config are strings and not string lists.

E.g. of a string list in a config:

owners:
- 'Notch'

Also, Bukkit#getPlayer will return null if the player isn't online so you should only check if the player is not null.

E.g.:

if (Bukkit.getPlayer(ChatColor.stripColor(Developer) != null) {
// do stuff
}
 
Status
This thread has been locked.
Top