Skip to content

Commit

Permalink
Improve some messages
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgH93 committed Dec 11, 2021
1 parent b39183c commit 914235a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

package at.pcgamingfreaks.MarriageMaster.Bukkit.Commands;
Expand Down Expand Up @@ -59,7 +59,7 @@ public DebugCommand(final @NotNull MarriageMaster plugin)

builder = new MessageBuilder("All data has been collected!", MessageColor.GREEN, MessageFormat.BOLD).appendNewLine();
builder.append("You can now interact with your game again.").appendNewLine();
builder.append("The collected data can be found in your plugins directory inside the 'debug.txt' file.").appendNewLine();
builder.append("The collected data can be found in your plugins' directory inside the 'debug.txt' file.").appendNewLine();
builder.append("Please upload this fiel to ");
builder.append("https://pastebin.com/", MessageColor.YELLOW, MessageFormat.UNDERLINE).onClick(MessageClickEvent.ClickEventAction.OPEN_URL, "https://pastebin.com/");
builder.append(" and send the link to the developer.");
Expand All @@ -75,8 +75,10 @@ public void execute(@NotNull CommandSender commandSender, @NotNull String mainCo
messageStart.send(sender);

File debugFile = new File(plugin.getDataFolder(), "debug.txt");
if(debugFile.exists()) //noinspection ResultOfMethodCallIgnored
debugFile.delete();
if(debugFile.exists() && !debugFile.delete())
{
plugin.getLogger().warning("Failed to delete debug.txt file!");
}
writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(debugFile), StandardCharsets.UTF_8));

writer.append(plugin.getDescription().getName()).append(" Version: ").append(plugin.getDescription().getVersion());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020 GeorgH93
* Copyright (C) 2021 GeorgH93
*
* 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
Expand All @@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

package at.pcgamingfreaks.MarriageMaster.Database;
Expand Down Expand Up @@ -101,11 +101,12 @@ public DatabaseBackend<MARRIAGE_PLAYER_DATA, MARRIAGE_DATA, HOME> getDatabaseBac
if(bungeeSupportRequired)
{
logger.severe("Database type not supported on BungeeCord!");
db.close();
return null;
}
if(bungee)
{
logger.warning("The used database dose not support multi server setups! Please consider switching to MySQL!");
logger.warning("The used database does not support multi-server setups! Please consider switching to MySQL!");
}
}
db.startup();
Expand Down

0 comments on commit 914235a

Please sign in to comment.