mirror of
https://github.com/GeorgH93/Minepacks.git
synced 2025-01-15 20:31:40 +01:00
Bugfixes
[Bugfix] Open command help [Bugfix] Backups failing on save because of missing backups folder
This commit is contained in:
parent
dde3e77b7e
commit
e618eca69a
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018 GeorgH93
|
* Copyright (C) 2019 GeorgH93
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -122,11 +122,11 @@ public List<String> tabComplete(@NotNull CommandSender commandSender, @NotNull S
|
|||||||
public List<HelpData> getHelp(@NotNull CommandSender requester)
|
public List<HelpData> getHelp(@NotNull CommandSender requester)
|
||||||
{
|
{
|
||||||
List<HelpData> help = new LinkedList<>();
|
List<HelpData> help = new LinkedList<>();
|
||||||
help.add(new HelpData("", null, getDescription(), MessageClickEvent.ClickEventAction.RUN_COMMAND));
|
help.add(new HelpData(getTranslatedName(), null, getDescription(), MessageClickEvent.ClickEventAction.RUN_COMMAND));
|
||||||
if(requester.hasPermission("backpack.open.other"))
|
if(requester.hasPermission("backpack.open.other"))
|
||||||
{
|
{
|
||||||
//noinspection ConstantConditions
|
//noinspection ConstantConditions
|
||||||
help.add(new HelpData("", helpParam, descriptionOpenOthers));
|
help.add(new HelpData(getTranslatedName(), helpParam, descriptionOpenOthers));
|
||||||
}
|
}
|
||||||
return help;
|
return help;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2016-2018 GeorgH93
|
* Copyright (C) 2019 GeorgH93
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -66,6 +66,7 @@ public Database(Minepacks mp)
|
|||||||
maxAge = plugin.getConfiguration().getAutoCleanupMaxInactiveDays();
|
maxAge = plugin.getConfiguration().getAutoCleanupMaxInactiveDays();
|
||||||
unCacheStrategie = bungeeCordMode ? new OnDisconnect(this) : UnCacheStrategie.getUnCacheStrategie(this);
|
unCacheStrategie = bungeeCordMode ? new OnDisconnect(this) : UnCacheStrategie.getUnCacheStrategie(this);
|
||||||
backupFolder = new File(this.plugin.getDataFolder(), "backups");
|
backupFolder = new File(this.plugin.getDataFolder(), "backups");
|
||||||
|
if(!backupFolder.exists()) backupFolder.mkdirs();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void init()
|
public void init()
|
||||||
@ -134,7 +135,7 @@ protected void writeBackup(@Nullable String userName, @NotNull String userIdenti
|
|||||||
}
|
}
|
||||||
catch(Exception e)
|
catch(Exception e)
|
||||||
{
|
{
|
||||||
plugin.getLogger().warning("Failed to write backup! Error: " + e.getMessage());
|
plugin.getLogger().warning(ConsoleColor.RED + "Failed to write backup! Error: " + e.getMessage() + ConsoleColor.RESET);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user