File tree Expand file tree Collapse file tree
src/main/java/org/mvplugins/multiverse/inventories/profile Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package org .mvplugins .multiverse .inventories .profile ;
22
3+ import com .dumptruckman .minecraft .util .Logging ;
34import org .bukkit .OfflinePlayer ;
45import org .bukkit .configuration .ConfigurationSection ;
56import org .mvplugins .multiverse .core .config .handle .StringPropertyHandle ;
@@ -31,15 +32,19 @@ public final class GlobalProfile {
3132 this .nodes = new Nodes ();
3233 this .handle = JsonConfigurationHandle .builder (configPath , nodes .nodes ).build ();
3334 this .stringPropertyHandle = new StringPropertyHandle (handle );
34- this . handle . load ();
35+ load ();
3536 }
3637
3738 Try <Void > load () {
38- return handle .load ();
39+ return handle .load ().onFailure (e -> {
40+ Logging .severe ("Failed to load global profile for player %s: %s" , uuid , e .getMessage ());
41+ });
3942 }
4043
4144 Try <Void > save () {
42- return handle .save ();
45+ return handle .save ().onFailure (e -> {
46+ Logging .severe ("Failed to save global profile for player %s: %s" , uuid , e .getMessage ());
47+ });
4348 }
4449
4550 public StringPropertyHandle getStringPropertyHandle () {
You can’t perform that action at this time.
0 commit comments