@@ -258,19 +258,26 @@ private void runDump(Server server, CommandSource sender, String commandLabel, S
258258 files .add (new PasteUtil .PasteFile ("dump.json" , dump .toString ()));
259259
260260 final Plugin essDiscord = Bukkit .getPluginManager ().getPlugin ("EssentialsDiscord" );
261+ final Plugin essSpawn = Bukkit .getPluginManager ().getPlugin ("EssentialsSpawn" );
261262
262263 // Further operations will be heavy IO
263264 ess .runTaskAsynchronously (() -> {
264265 boolean config = false ;
265266 boolean discord = false ;
266267 boolean kits = false ;
267268 boolean log = false ;
269+ boolean worth = false ;
270+ boolean tpr = false ;
271+ boolean spawns = false ;
268272 for (final String arg : args ) {
269273 if (arg .equals ("*" ) || arg .equalsIgnoreCase ("all" )) {
270274 config = true ;
271275 discord = true ;
272276 kits = true ;
273277 log = true ;
278+ worth = true ;
279+ tpr = true ;
280+ spawns = true ;
274281 break ;
275282 } else if (arg .equalsIgnoreCase ("config" )) {
276283 config = true ;
@@ -280,6 +287,12 @@ private void runDump(Server server, CommandSource sender, String commandLabel, S
280287 kits = true ;
281288 } else if (arg .equalsIgnoreCase ("log" )) {
282289 log = true ;
290+ } else if (arg .equalsIgnoreCase ("worth" )) {
291+ worth = true ;
292+ } else if (arg .equalsIgnoreCase ("tpr" )) {
293+ tpr = true ;
294+ } else if (arg .equalsIgnoreCase ("spawns" )) {
295+ spawns = true ;
283296 }
284297 }
285298
@@ -319,6 +332,30 @@ private void runDump(Server server, CommandSource sender, String commandLabel, S
319332 }
320333 }
321334
335+ if (worth ) {
336+ try {
337+ files .add (new PasteUtil .PasteFile ("worth.yml" , new String (Files .readAllBytes (ess .getWorth ().getFile ().toPath ()), StandardCharsets .UTF_8 )));
338+ } catch (IOException e ) {
339+ sender .sendMessage (tl ("dumpErrorUpload" , "worth.yml" , e .getMessage ()));
340+ }
341+ }
342+
343+ if (tpr ) {
344+ try {
345+ files .add (new PasteUtil .PasteFile ("tpr.yml" , new String (Files .readAllBytes (ess .getRandomTeleport ().getFile ().toPath ()), StandardCharsets .UTF_8 )));
346+ } catch (IOException e ) {
347+ sender .sendMessage (tl ("dumpErrorUpload" , "tpr.yml" , e .getMessage ()));
348+ }
349+ }
350+
351+ if (spawns && essSpawn != null ) {
352+ try {
353+ files .add (new PasteUtil .PasteFile ("spawn.yml" , new String (Files .readAllBytes (ess .getDataFolder ().toPath ().resolve ("spawn.yml" )), StandardCharsets .UTF_8 )));
354+ } catch (IOException e ) {
355+ sender .sendMessage (tl ("dumpErrorUpload" , "spawn.yml" , e .getMessage ()));
356+ }
357+ }
358+
322359 final CompletableFuture <PasteUtil .PasteResult > future = PasteUtil .createPaste (files );
323360 future .thenAccept (result -> {
324361 if (result != null ) {
@@ -719,7 +756,7 @@ protected List<String> getTabCompleteOptions(final Server server, final CommandS
719756 }
720757 break ;
721758 case "dump" :
722- final List <String > list = Lists .newArrayList ("config" , "kits" , "log" , "discord" , "all" );
759+ final List <String > list = Lists .newArrayList ("config" , "kits" , "log" , "discord" , "worth" , "tpr" , "spawns" , " all" );
723760 for (String arg : args ) {
724761 if (arg .equals ("*" ) || arg .equalsIgnoreCase ("all" )) {
725762 list .clear ();
0 commit comments