5555
5656public class DataUpdaterV1
5757{
58- private final BingoReloaded plugin ;
58+ protected final BingoReloaded plugin ;
5959
6060 public DataUpdaterV1 (BingoReloaded plugin ) {
6161 this .plugin = plugin ;
@@ -249,7 +249,7 @@ public void update() {
249249 updatePlaceholders ();
250250 }
251251
252- private void updateConfig () {
252+ protected void updateConfig () {
253253 File configFile = new File (plugin .getDataFolder (), "config.yml" );
254254 if (!configFile .exists ()) {
255255 return ;
@@ -295,7 +295,7 @@ private void updateConfig() {
295295 ConsoleMessenger .log (Component .text ("Found outdated config.yml file and updated it to new format (V2 -> V3)" ).color (NamedTextColor .GOLD ));
296296 }
297297
298- private void updatePresets () {
298+ protected void updatePresets () {
299299 if (!new File (plugin .getDataFolder (), "data/presets.yml" ).exists () || new File (plugin .getDataFolder (), "data/presets.nbt" ).exists ()) {
300300 return ;
301301 }
@@ -337,7 +337,7 @@ private void updatePresets() {
337337 ConsoleMessenger .log (Component .text ("Found outdated settings preset configuration file and updated it to new format (V2 -> V3)" ).color (NamedTextColor .GOLD ));
338338 }
339339
340- private void updatePlayers () {
340+ protected void updatePlayers () {
341341 if (!new File (plugin .getDataFolder (), "data/players.yml" ).exists () || new File (plugin .getDataFolder (), "data/players.nbt" ).exists ()) {
342342 return ;
343343 }
@@ -376,7 +376,7 @@ private void updatePlayers() {
376376 ConsoleMessenger .log (Component .text ("Found outdated stored-players configuration file and updated it to new format (V2 -> V3)" ).color (NamedTextColor .GOLD ));
377377 }
378378
379- private void updateStats () {
379+ protected void updateStats () {
380380 if (!new File (plugin .getDataFolder (), "data/player_stats.yml" ).exists () || new File (plugin .getDataFolder (), "data/player_stats.nbt" ).exists ()) {
381381 return ;
382382 }
@@ -393,7 +393,7 @@ private void updateStats() {
393393 ConsoleMessenger .log (Component .text ("Found outdated player stats configuration file and updated it to new format (V2 -> V3)" ).color (NamedTextColor .GOLD ));
394394 }
395395
396- private void updateLists (String filename ) {
396+ protected void updateLists (String filename ) {
397397 if (!new File (plugin .getDataFolder (), filename + ".yml" ).exists () || new File (plugin .getDataFolder (), filename + ".nbt" ).exists ()) {
398398 return ;
399399 }
@@ -444,7 +444,7 @@ private void updateLists(String filename) {
444444 ConsoleMessenger .log (Component .text ("Found outdated list configuration file and updated it to new format (V2 -> V3)" ).color (NamedTextColor .GOLD ));
445445 }
446446
447- private void updateCards () {
447+ protected void updateCards () {
448448 if (!new File (plugin .getDataFolder (), "data/cards.yml" ).exists () || new File (plugin .getDataFolder (), "data/cards.nbt" ).exists ()) {
449449 return ;
450450 }
@@ -465,7 +465,7 @@ private void updateCards() {
465465 ConsoleMessenger .log (Component .text ("Found outdated card configuration file and updated it to new format (V2 -> V3)" ).color (NamedTextColor .GOLD ));
466466 }
467467
468- private void updateKits () {
468+ protected void updateKits () {
469469 if (!new File (plugin .getDataFolder (), "data/kits.yml" ).exists () || new File (plugin .getDataFolder (), "data/kits.nbt" ).exists ()) {
470470 return ;
471471 }
@@ -498,7 +498,7 @@ private void updateKits() {
498498 ConsoleMessenger .log (Component .text ("Found outdated kit configuration file and updated it to new format (V2 -> V3)" ).color (NamedTextColor .GOLD ));
499499 }
500500
501- private void updateTeams () {
501+ protected void updateTeams () {
502502 if (!new File (plugin .getDataFolder (), "data/teams.yml" ).exists () || new File (plugin .getDataFolder (), "data/teams.nbt" ).exists ()) {
503503 return ;
504504 }
@@ -525,7 +525,7 @@ private void updateTeams() {
525525 ConsoleMessenger .log (Component .text ("Found outdated teams configuration file and updated it to new format (V2 -> V3)" ).color (NamedTextColor .GOLD ));
526526 }
527527
528- private void updateTextures () {
528+ protected void updateTextures () {
529529 YamlDataAccessor yamlData = new YamlDataAccessor (plugin , "data/textures" , false );
530530 TagDataAccessor tagData = new TagDataAccessor (plugin , "data/textures" , false );
531531
@@ -543,7 +543,7 @@ private void updateTextures() {
543543 tagData .saveChanges ();
544544 }
545545
546- private void updateScoreboards () {
546+ protected void updateScoreboards () {
547547 YamlDataAccessor yamlData = new YamlDataAccessor (plugin , "scoreboards" , false );
548548 yamlData .load ();
549549
@@ -561,7 +561,7 @@ private void updateScoreboards() {
561561 ConsoleMessenger .log (Component .text ("Found outdated scoreboards file and updated it to new format (V2 -> V3)" ).color (NamedTextColor .GOLD ));
562562 }
563563
564- private @ NotNull String updateConfigString (@ NotNull String input ) {
564+ protected @ NotNull String updateConfigString (@ NotNull String input ) {
565565 input = input .replace ("&" , "§" );
566566 Component legacyComponent = LegacyComponentSerializer .legacySection ().deserialize (input );
567567 String legacyMini = MiniMessage .miniMessage ().serialize (legacyComponent );
@@ -574,7 +574,7 @@ private void updateScoreboards() {
574574 return legacyMini ;
575575 }
576576
577- private void updateBoard (String boardName , YamlDataAccessor data ) {
577+ protected void updateBoard (String boardName , YamlDataAccessor data ) {
578578 String title = data .getString (boardName + ".title" , "" );
579579 List <String > sideBar = data .getList (boardName + ".sidebar" , TagDataType .STRING );
580580
@@ -584,7 +584,7 @@ private void updateBoard(String boardName, YamlDataAccessor data) {
584584 data .setList (boardName + ".sidebar" , TagDataType .STRING , sideBar );
585585 }
586586
587- private void updatePlaceholders () {
587+ protected void updatePlaceholders () {
588588 YamlDataAccessor yamlData = new YamlDataAccessor (plugin , "placeholders" , false );
589589 yamlData .load ();
590590
@@ -619,7 +619,7 @@ private void updatePlaceholders() {
619619 ConsoleMessenger .log (Component .text ("Found outdated placeholders file and updated it to new format (V2 -> V3)" ).color (NamedTextColor .GOLD ));
620620 }
621621
622- private boolean isNewerOrEqual (@ Nullable String version , String pluginVersion ) {
622+ protected boolean isNewerOrEqual (@ Nullable String version , String pluginVersion ) {
623623 if (pluginVersion .isEmpty () || version == null ) {
624624 return false ;
625625 }
0 commit comments