PyvesB / advanced-achievements

:fireworks: Popular plugin that adds unique and challenging achievements to Minecraft servers.
https://www.spigotmc.org/resources/83466
GNU General Public License v3.0
200 stars 214 forks source link

Plugin broke, idk why. Achievements work even if non-existant. Plugin disables if problem and can only fix by restarting?! #1017

Closed Grallow closed 3 years ago

Grallow commented 3 years ago

So... The main issue is that it disables the plugin every time there is something wrong with the code so I gotta keep restarting. But also my config is not working which im not sure why so Ill paste a link to my config. There is also a side issue where even when i remove the stuff from the GUI (in lang) and then I completely remove everything from Kills: as an example. It still lets me complete a kill achievement.

A link to my lastest.log https://pastebin.com/nqdXGFkZ

My config:

#==============================O==============================#
# I---------------------------------------------------------I #
# |   Advanced Achievements 5.12.5 configuration - Readme   | #
# 1---------------------------------------------------------1 #
#==============================o==============================#

# Only spaces, NO tabs. Don't forget the indents (2 spaces per indentation level).
# To check syntax errors in your file, use: https://yaml-online-parser.appspot.com
# Default config: https://github.com/PyvesB/AdvancedAchievements/blob/master/advanced-achievements-plugin/src/main/resources/config.yml
# If you want to help the project, feel free to check our GitHub: https://github.com/PyvesB/AdvancedAchievements
# Visit the wiki for some valuable additional documentation: https://github.com/PyvesB/AdvancedAchievements/wiki
# For donations use: https://www.paypal.com/cgi-bin/webscr?hosted_button_id=7KTQYC4YT52NQ&cmd=_s-xclick

#=============================O=O=============================#
# II-------------------------------------------------------II #
# |                    General  settings                    | #
# 2---------------------------------------------------------2 #
#=============================o=o=============================#

# Time in seconds between each /aach book (unless user has permission achievement.*).
TimeBook: 900

# Check for update on plugin launch and notify when an OP joins the game.
CheckForUpdate: true

# Set to true to activate firework effects when a player receives an achievement.
Firework: true

# Choose ball_large, ball, burst, creeper, star or random.
FireworkStyle: ball_large

# Set to true to activate simpler effects and a calm sound when a player receives an achievement.
# Ignored if Firework setting is set to true.
SimplifiedReception: false

# Number of players displayed in /aach top, week and month commands.
TopList: 5

# Set to true to activate particle effects when performing /aach book, /aach stats with all achievements and
# /aach top, week or month when ranked in the top list.
AdditionalEffects: true

# Set to true to activate sounds when performing /aach book, /aach stats with all achievements and /aach top, 
# week or month when ranked in the top list.
Sound: true

# For /aach book. Possible values: github.com/PyvesB/AdvancedAchievements/wiki/Sound-names
SoundBook: entity_player_levelup

# For /aach stats with all achievements. Possible values: github.com/PyvesB/AdvancedAchievements/wiki/Sound-names
SoundStats: entity_firework_rocket_blast

# For /aach top, week, month when ranked in the top list. Possible values: github.com/PyvesB/AdvancedAchievements/wiki/Sound-names
SoundRanking: entity_firework_rocket_blast

# Set the icon of the plugin (default: shamrock, \u2618).
Icon: \u2618

# Set the color of the plugin (default: 5, dark purple).
Color: 5

# Notify other connected players when an achievement is received.
# This defines the default behaviour, a player can override what he sees by using /aach toggle.
NotifyOtherPlayers: false

# When NotifyOtherPlayers is enabled, notifications are done using action bars when ActionBarNotify is true.
# When ActionBarNotify is false, chat messages are used.
ActionBarNotify: true

# Display achievement DisplayName and Message as screen titles. Ignored if using Minecraft 1.7.9 or 1.7.10.
TitleScreen: true

# When a player receives an achievement, the DisplayName, Message and rewards of the achievement are displayed in
# the chat. If HoverableReceiverChatText is true, a single hoverable text will be displayed to the receiver.
# Otherwise texts will be displayed one after the other.
HoverableReceiverChatText: false

# Separator between name, description and date on a book page.
BookSeparator: ""

# Set the format of the achievement name in /aach list (default: "%ICON% %NAME% %ICON%").
ListAchievementFormat: "%ICON% %NAME% %ICON%"

# Set the format of the header used for most chat messages (default: "§7[%ICON%§7]").
ChatHeader: "§7[%ICON%§7]"

# Stop all stats from increasing when player in creative mode, including PlayedTime.
# Connection achievements will only be handled once a player switches to a non-creative mode.
RestrictCreative: false

# Stop all stats from increasing when player in spectator mode, including PlayedTime.
# Connection achievements will only be handled once a player switches to a non-spectator mode.
# No effect if using Minecraft 1.7.9 or 1.7.10.
RestrictSpectator: true

# Stop all stats from increasing when player in adventure mode, including PlayedTime.
# Connection achievements will only be handled once a player switches to a non-adventure mode.
RestrictAdventure: false

# Stop all stats from increasing when player in a specific world, including PlayedTime (delete the [] before adding values).
# Connection achievements will only be handled once a player enters a non-excluded world.
ExcludedWorlds: []
#  - yourWorld1
#  - yourWorld2

# Ignore vertical dimension (Y axis) when calculating distance statistics.
IgnoreVerticalDistance: false

# Don't show these categories in the achievement GUI or in the stats output (delete the [] before adding values).
# Also prevent obtaining achievements for these categories and prevent stats from increasing.
DisabledCategories: []
#  - PetMasterGive
#  - PetMasterReceive
#  - DistanceLlama
#  - DistanceGliding

# Obfuscate achievements that have not yet been received in /aach list.
ObfuscateNotReceived: false

# For categories with a series of related achievements where the only thing changing is the number of times
# the event has occurred, show achievements that have been obtained and show the next obtainable achievement,
# but obfuscate the additional achievements. For example, under Places, stone, the first achievement could have a
# target of 100 stone, the second 500 stone, and the third 1000 stone.  When ObfuscateProgressiveAchievements
# is true, initially only the 100 stone achievement will be readable in the GUI.  Once 100 stone have been placed,
# the 500 stone achievement will become legible.
ObfuscateProgressiveAchievements: false

# Hide categories for which a player has not yet received achievements by marking them as locked in /aach list.
HideNotReceivedCategories: false

# Completely hide categories for which the player does not have the corresponding count permissions.
HideNoPermissionCategories: false

# Hide the reward display in /aach list.
HideRewardDisplayInList: false

# Display precise statistic information in the /aach list progress bars.
EnrichedListProgressBars: true

# Annotate each achievement displayed in a /aach list category with a number.
NumberedItemsInList: false

# Color used for Goals and progress bars in /aach list when an achievement is not yet received.
ListColorNotReceived: 8

# Sort pages of the book in chronological order (false for reverse chronological order).
BookChronologicalOrder: true

# Do not take into account items broken with Silk Touch for the Breaks achievements.
DisableSilkTouchBreaks: false

# Do not take into account ores broken with Silk Touch for the Breaks achievements.
# DisableSilkTouchBreaks takes precedence over this. Not applicable to iron or gold ores.
DisableSilkTouchOreBreaks: false

# Language file to use. Available: lang.yml, lang-BP.yml, lang-CN.yml, lang-CZ.yml, lang-DE.yml, lang-ES.yml, lang-FI.yml
# lang-FR.yml, lang-HU.yml, lang-IT.yml, lang-PL.yml, lang-RO.yml, lang-RU.yml, lang-SE.yml, lang-TR.yml, lang-TW.yml, lang-VN.yml
LanguageFileName: lang.yml

# Time in seconds between each statistic count. Only the listed categories are currently supported.
StatisticCooldown:
  LavaBuckets: 10
  WaterBuckets: 10
  Milk: 10
  Beds: 30
  Brewing: 5
  MusicDiscs: 30

# Display action bar message when player performs an action while in the cooldown period.
# No effect if using Minecraft 1.7.9 or 1.7.10.
CooldownActionBar: true

# Locale used to format dates in /aach book and /aach list. You must select an ISO 639 language code.
# The list of possible language codes can be found at www.loc.gov/standards/iso639-2/php/code_list.php
DateLocale: en

# Display reception time of achievements in /aach book and /aach list in addition to the date. For achievements
# received in plugin versions prior to 3.0, the precise time information is not available and will be displayed as midnight.
DateDisplayTime: true

# Register advancements with a description corresponding to the Goal parameter of each achievement.
# If changed, run /aach generate to regenerate advancements with the new parameter value taken into account.
# No effect if using Minecraft versions prior to 1.12.
RegisterAdvancementDescriptions: true

# If true, hide advancements from the advancement GUI. Advancement notifications will still appear when receiving achievements.
# No effect if using Minecraft versions prior to 1.12.
HideAdvancements: false

# If true, PlayedTime will no longer increase when the player is AFK. Requires Essentials to work.
IgnoreAFKPlayedTime: false

# Awarded when a player has received all the achievements. Use the same reward pattern as with achievements.
# See https://github.com/PyvesB/AdvancedAchievements/wiki/Rewards
AllAchievementsReceivedRewards:
  IncreaseMaxOxygen: 30
  Experience: 100

# Title shown on the root advancement.
RootAdvancementTitle: Advanced Achievements

# Background shown on the Advanced Achievements advancement tab.
# Must be a resource location to any image in a resource pack.
AdvancementsBackground: "minecraft:textures/item/book.png"

#=============================OOO=============================#
# III-----------------------------------------------------III #
# |                    Database settings                    | #
# 3---------------------------------------------------------3 #
#=============================ooo=============================#

# Make a daily backup of your local database (if sqlite or h2).
DatabaseBackup: true

# Database type, sqlite, h2, postgresql or mysql. Do a full server restart for this to take effect.
DatabaseType: h2

# Prefix added to the tables in the database. If you switch from the default tables names (no prefix),
# the plugin will attempt an automatic renaming. Otherwise you have to rename your tables manually.
# Do a full server restart for this to take effect.
TablePrefix: ""

# Specify additional options when opening a connection to a MySQL/PostgreSQL database. Start each option with &,
# for instance "&useUnicode=yes&characterEncoding=UTF-8". Make sure the key-value pairs themselves are URL encoded.
AdditionalConnectionOptions: ""

# Settings to connect to your MySQL/PostgreSQL database (ignored if sqlite).
# A PostgreSQL database address will be similar to jdbc:postgresql://localhost:5432/minecraft
DatabaseAddress: "jdbc:mysql://localhost:3306/minecraft"
DatabaseUser: root
DatabasePassword: root

#============================OO=OO============================#
# IV-------------------------------------------------------IV #
# |                  Performance settings                   | #
# |        Change only if you are an experienced user       | #
# 4---------------------------------------------------------4 #
#============================oo=oo============================#

# Frequency of play time checks for players (seconds). Smaller values give more precision but more CPU usage.
PlaytimeTaskInterval: 60

# Calculates distance traveled by players (seconds). Smaller values give more precision but more CPU usage.
DistanceTaskInterval: 5

# Frequency of some statistics writes to the database (seconds). Do a full server restart, and not just /aach reload.
PooledRequestsTaskInterval: 10

#============================OOOOO============================#
# V---------------------------------------------------------V #
# |              Multiple action achievements               | #
# |       These require sub-categories and thresholds       | #
# 5---------------------------------------------------------5 #
#============================ooooo============================#

Places:  
Breaks: 
  stone:
  1000:
    Goal: Break 1000 Stone
    Message: §8§1[§5§lHyvoid Achievements§8§l] §fA Good Start!
    Name: break_1000_stone
    DisplayName: The Cobble Cobbler
    Type: Normal
    Money: 100
  10000:
    Goal: Break 10000 Stone
    Message: §8§1[§5§lHyvoid Achievements§8§l] §fVeteran Miner!
    Name: break_10000_stone
    DisplayName: Nearly A Waste Of Life
    Type: Normal
    Money: 1000
  100000:
    Goal: Break 100000 Stone
    Message: §8§1[§5§lHyvoid Achievements§8§l] §fMaybe A Bit Too Much Mining.
    Name: break_100000_stone
    DisplayName: A Waste Of Life
    Type: Normal
    Money: 2500
  1000000:
    Goal: Break 1000000 Stone
    Message: §8§1[§5§lHyvoid Achievements§8§l] §fMoly Mary Mother Of God...
    Name: break_1000000_stone
    DisplayName: No Stone No Life
    Type: Normal
    Money: 5000
Kills:
TargetsShot:
Crafts:
PlayerCommands:
Breeding:
Connections:
  1:
    Message: §8§1[§5§lHyvoid Achievements§8§l] §fYou Connected To Our Server For The First Time!
    Name: connect_1
    DisplayName: Good Choice
    Type: Normal
    Money: 100
  100:
    Message: §8§1[§5§lHyvoid Achievements§8§l] §fMaybe We Have Something Special?
    Name: connect_100
    DisplayName: A Real Connection Growing
    Type: Normal
    Money: 1000
  500:
    Message: §8§1[§5§lHyvoid Achievements§8§l] §fDamn You Really Do Like This Server...
    Name: connect_500
    DisplayName: The Connection Is Connected
    Type: Normal
    Money: 2500
  999:
    Message: §8§1[§5§lHyvoid Achievements§8§l] §fYou Are Much Loved!
    Name: connect_999
    DisplayName: A True Love Story
    Type: Normal
    Money: 5000
Deaths:
Arrows:
Snowballs:
Eggs:
Fish:
Treasures:
ItemBreaks:
EatenItems:
Shear:
Milk:
LavaBuckets:
WaterBuckets:
Trades:
AnvilsUsed:
Enchantments:
Beds:  
MaxLevel:
ConsumedPotions:
PlayedTime:
DistanceFoot:
DistancePig:
DistanceHorse:
DistanceMinecart:
DistanceBoat:
DistanceGliding:
DistanceLlama:
ItemDrops:
ItemPickups:
HoePlowings:
Fertilising:
Taming:
Brewing:
Fireworks:
MusicDiscs:
EnderPearls:
PetMasterGive:
PetMasterReceive:
Smelting:

#===========================OOOOOOO===========================#
# VII-----------------------------------------------------VII #
# |               Command-based achievements                | #
# 7---------------------------------------------------------7 #
#===========================ooooooo===========================#

# Allow Commands achievement to be awarded several times.
MultiCommand: true

# A player with achievement.give (or the console) can use /aach give yourAch1 PLAYER to give
# yourAch1 achievement to PLAYER. The /aach give command does NOT work with other achievements.
Commands:

# When the command /aach add is called for this category.
Custom:

#==========================OOOO=OOOO==========================#
# VIII-------------------------0-------------------------VIII #
# |  Parameters in future plugin versions will appear here  | #
# 8----------------------------0----------------------------8 #
#==========================oooo=oooo==========================#
PyvesB commented 3 years ago

Hello @Grallow ! 👋🏻

The configuration doesn't look valid. For example, all the nodes under stone in the Breaks category should be indented an extra level. 😉

Grallow commented 3 years ago

Hey that still doesn’t fix the issue I think because I did that to the code to test since it didn’t look when it was indented fine too

On Sat, 15 May 2021 at 2:57 am, Pierre-Yves B. @.***> wrote:

Hello @Grallow https://github.com/Grallow ! 👋🏻

The configuration doesn't look valid. For example, all the nodes under stone in the Breaks category should be indented an extra level. 😉

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/PyvesB/advanced-achievements/issues/1017#issuecomment-841372742, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASQXFKE4AOHQ5IAO5ZOOAU3TNVI7RANCNFSM443VSVPA .

Grallow commented 3 years ago

The main problem is that I can't figure out how to remove achievements so that i can have a fresh slate

PyvesB commented 3 years ago

Simply delete the whole AdvancedAchievements directory if you want to start on a fresh slate, the default configurations will be created again. :)

Grallow commented 3 years ago

Yes but I want to remove all the default achievements. I want it so when I log in, if i've deleted them, no achievements will be given. Until I add a new achievement, and if i add one, there will only be one when I reload. I have made like 7 achievements and when I reload (after removing the rest of the quests from the config) they still exist in game. They also still exist after deleting the achievements database like you said.

On Tue, May 18, 2021 at 2:50 AM Pierre-Yves B. @.***> wrote:

Simply delete the whole AdvancedAchievements directory if you want to start on a fresh slate, the default configurations will be created again. :)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/PyvesB/advanced-achievements/issues/1017#issuecomment-842478241, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASQXFKFEEX4BLGG7DPNIWI3TOFCOFANCNFSM443VSVPA .

PyvesB commented 3 years ago

So, what does your configuration look like now?

Grallow commented 3 years ago

Link to a paste of my config.yml https://pastebin.com/gALTz6Rf

On Tue, May 18, 2021 at 3:40 AM Pierre-Yves B. @.***> wrote:

So, what does your configuration look like now?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/PyvesB/advanced-achievements/issues/1017#issuecomment-842509740, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASQXFKBGHU2VI4BTW5UPIJTTOFII3ANCNFSM443VSVPA .

PyvesB commented 3 years ago

Disabled categories should be configured as follows: HoePlowings: {}, or kept with their default achievements but added to DisabledCategories. This may be confusing things.

Grallow commented 3 years ago

So heres my config now... And the plugin broke. If i restart it just says 'an internal error occurred while attempting to perform this command'

New config: https://pastebin.com/XNKfH1QL

On Tue, May 18, 2021 at 4:26 AM Pierre-Yves B. @.***> wrote:

Disabled categories should be configured as follows: HoePlowings: {}, or kept with their default achievements but added to DisabledCategories. This may be confusing things.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/PyvesB/advanced-achievements/issues/1017#issuecomment-842537921, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASQXFKCAFPEN75VE4VG2DNTTOFNWLANCNFSM443VSVPA .

PyvesB commented 3 years ago

I've just tried your configuration on the latest version of the plugin, and Advanced Achievements clearly tells you what is wrong at startup and how to fix it:

com.hm.achievement.exception.PluginLoadError: Duplicate achievement Name (itemdrops_50). Please ensure each Name is unique in config.yml.

Note that this is also documented in the Wiki. :')

Grallow commented 3 years ago

Thank you

On Tue, May 18, 2021 at 6:20 AM Pierre-Yves B. @.***> wrote:

I've just tried your configuration on the latest version of the plugin, and Advanced Achievements clearly tells you what is wrong at startup and how to fix it:

com.hm.achievement.exception.PluginLoadError: Duplicate achievement Name (itemdrops_50). Please ensure each Name is unique in config.yml.

Note that this is also documented in the Wiki https://github.com/PyvesB/advanced-achievements/wiki/FAQ-(Frequently-Asked-Questions)#1-name-displayname-goal-message-and-type-whats-all-this-about. :')

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/PyvesB/advanced-achievements/issues/1017#issuecomment-842607273, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASQXFKCRKE3N6P6OCDQT6E3TOF3CJANCNFSM443VSVPA .

PyvesB commented 3 years ago

No worries!