flokol120 / Spigot-Item-Chest-Sorter

A Spigot/Paper minecraft plugin to sort your messy items into separate chests | 💯% written in Kotlin
GNU General Public License v3.0
5 stars 6 forks source link

Ability to remove console messages for automatic sorting #32

Closed Virologicbody closed 2 years ago

Virologicbody commented 3 years ago

We have the ability to allow sender chests to automatically empty/send their contents when fed from a hopper... would there be any possibility of allowing us to reduce or even disable the messages from the server console?

[13:38:43 INFO]: sorted 1 prismarine shard to your chest [13:38:43 INFO]: sorted 1 prismarine shard to your chest [13:38:44 INFO]: sorted 1 prismarine shard to your chest [13:38:52 INFO]: sorted 1 prismarine shard to your chest [13:38:52 INFO]: sorted 1 prismarine crystals to your chest [13:38:53 INFO]: sorted 1 prismarine shard to your chest [13:38:53 INFO]: sorted 1 prismarine crystals to your chest [13:38:53 INFO]: sorted 1 prismarine shard to your chest [13:38:53 INFO]: sorted 1 prismarine crystals to your chest [13:38:53 INFO]: sorted 1 prismarine shard to your chest

Thank you

flokol120 commented 3 years ago

@Virologicbody alright I'll add this alongside the other chat configs in the config.yml.

flokol120 commented 3 years ago

@Virologicbody

if(main.config.getBoolean("chatMessages.sorted", true)) {
    val message = "${ChatColor.GREEN}sorted ${ChatColor.YELLOW}${amount} ${ChatColor.GREEN}${ChatColor.AQUA}${getItemName(content)} ${ChatColor.GREEN}to your chest"
    if(player != null) {
        player.sendMessage(message)
    }else{
        main.server.consoleSender.sendMessage(message)
    }
}

The server output should not be made if the chatMessages.sorted variable in the config is set to false. Can you please confirm that chatMessages.sorted is set to false like this:

chatMessages:
  # sends a message to a player or the console after sorting, containing which and how many items are sorted
  sorted: false
Virologicbody commented 2 years ago

I am sorry, I did not read that variable. Mine is set to True...

flokol120 commented 2 years ago

@Virologicbody So setting it to false works as expected for you?

Virologicbody commented 2 years ago

Hi Yes, changing it to false works as expected. Thank you