mirror of
https://github.com/Aust1n46/VentureChat.git
synced 2025-05-23 02:19:05 +00:00
Fix database timeout when not releasing connection. Fix '+' and '*' not
being escaped properly.
This commit is contained in:
parent
a7ff8e29a3
commit
2e4b748845
@ -1,4 +1,4 @@
|
||||
Version: 2.18.0
|
||||
Version: 2.18.1
|
||||
BlockCommandPlayer: '&cYou have been blocked from entering command {command}.'
|
||||
BlockCommandSender: '&cBlocked player &6{player} &cfrom entering command {command}.'
|
||||
BlockedCommand: '&cYou are blocked from entering this command: {command}'
|
||||
|
@ -1,4 +1,4 @@
|
||||
name: VentureChat
|
||||
main: mineverse.Aust1n46.chat.bungee.MineverseChatBungee
|
||||
version: 2.18.0
|
||||
version: 2.18.1
|
||||
author: Aust1n46
|
@ -20,12 +20,11 @@ public abstract class Database {
|
||||
public void writeVentureChat(String time, String uuid, String name, String server, String channel, String text, String type) {
|
||||
MineverseChat plugin = MineverseChat.getInstance();
|
||||
Bukkit.getScheduler().runTaskAsynchronously(plugin, () -> {
|
||||
try {
|
||||
final Connection conn = dataSource.getConnection();
|
||||
try(final Connection conn = dataSource.getConnection();
|
||||
final PreparedStatement statement = conn.prepareStatement(
|
||||
"INSERT INTO VentureChat " +
|
||||
"(ChatTime, UUID, Name, Server, Channel, Text, Type) " +
|
||||
"VALUES (?, ?, ?, ?, ?, ?, ?)");
|
||||
"VALUES (?, ?, ?, ?, ?, ?, ?)")) {
|
||||
statement.setString(1, time);
|
||||
statement.setString(2, uuid);
|
||||
statement.setString(3, name);
|
||||
@ -34,7 +33,8 @@ public abstract class Database {
|
||||
statement.setString(6, text);
|
||||
statement.setString(7, type);
|
||||
statement.executeUpdate();
|
||||
} catch(SQLException e) {
|
||||
}
|
||||
catch(SQLException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
});
|
||||
|
@ -34,8 +34,8 @@ public class Format {
|
||||
String prefix = "";
|
||||
String suffix = "";
|
||||
try {
|
||||
prefix = FormatStringAll(MineverseChat.chat.getPlayerPrefix(sender.getPlayer()).replace("|", ""));
|
||||
suffix = FormatStringAll(MineverseChat.chat.getPlayerSuffix(sender.getPlayer()).replace("|", ""));
|
||||
prefix = FormatStringAll(MineverseChat.chat.getPlayerPrefix(sender.getPlayer()).replace("|", "").replace("+", "").replace("*", ""));
|
||||
suffix = FormatStringAll(MineverseChat.chat.getPlayerSuffix(sender.getPlayer()).replace("|", "").replace("+", "").replace("*", ""));
|
||||
if(suffix.equals("")) {
|
||||
suffix = "venturechat_no_suffix_code";
|
||||
}
|
||||
@ -52,7 +52,7 @@ public class Format {
|
||||
}
|
||||
String nickname = "";
|
||||
if(sender.getPlayer() != null) {
|
||||
nickname = FormatStringAll(sender.getPlayer().getDisplayName().replace("|", ""));
|
||||
nickname = FormatStringAll(sender.getPlayer().getDisplayName().replace("|", "").replace("+", "").replace("*", ""));
|
||||
}
|
||||
json += convertPlaceholders(f, JSONformat, prefix, nickname, suffix, sender);
|
||||
json += "]}";
|
||||
|
@ -1,5 +1,5 @@
|
||||
name: VentureChat
|
||||
version: 2.18.0
|
||||
version: 2.18.1
|
||||
api-version: 1.13
|
||||
main: mineverse.Aust1n46.chat.MineverseChat
|
||||
depend: [Vault, ProtocolLib, PlaceholderAPI]
|
||||
|
Loading…
x
Reference in New Issue
Block a user