mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-25 03:55:35 +01:00
Block nuisance hikari shutdown message
This commit is contained in:
parent
e5d00e04d4
commit
55d2679f56
@ -492,7 +492,7 @@ public class Quests extends JavaPlugin implements QuestsAPI {
|
||||
return null;
|
||||
}
|
||||
final ConcurrentSkipListSet<IQuester> set = (ConcurrentSkipListSet<IQuester>) questers;
|
||||
for (final IQuester q: set) {
|
||||
for (final IQuester q : set) {
|
||||
if (q != null && q.getUUID().equals(id)) {
|
||||
return (Quester) q;
|
||||
}
|
||||
@ -1707,7 +1707,7 @@ public class Quests extends JavaPlugin implements QuestsAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Reload quests, actions, config settings, lang and modules, and player data
|
||||
* Reload quests, actions, conditions, config settings, lang, modules, and player data
|
||||
*/
|
||||
public void reload(final ReloadCallback<Boolean> callback) {
|
||||
if (loading) {
|
||||
|
@ -316,7 +316,7 @@ public class BlockListener implements Listener {
|
||||
} catch (final NoSuchMethodError err) {
|
||||
// Do nothing, getHand() not present pre-1.9
|
||||
}
|
||||
if (e == null || e.equals(EquipmentSlot.HAND)) { //If the event is fired by HAND (main hand)
|
||||
if (e == null || e.equals(EquipmentSlot.HAND)) { // If the event is fired by HAND (main hand)
|
||||
final Player player = evt.getPlayer();
|
||||
if (plugin.canUseQuests(evt.getPlayer().getUniqueId())) {
|
||||
final IQuester quester = plugin.getQuester(player.getUniqueId());
|
||||
|
@ -39,6 +39,10 @@ public class QuestsLog4JFilter extends AbstractFilter {
|
||||
if (message.contains("[PikaMug]")) {
|
||||
return Result.DENY;
|
||||
}
|
||||
// Hikari outputs these messages as ERROR which concerns some
|
||||
if (message.contains("quests-hikari - Shutdown")) {
|
||||
return Result.DENY;
|
||||
}
|
||||
// Paper outputs errors when dependencies for module events are missing
|
||||
return (message.contains("Plugin Quests") && message.contains("failed to register events"))
|
||||
? Result.DENY : Result.NEUTRAL;
|
||||
|
@ -67,6 +67,6 @@ public class MySqlConnectionFactory extends HikariConnectionFactory {
|
||||
|
||||
@Override
|
||||
public Function<String, String> getStatementProcessor() {
|
||||
return s -> s.replace("'", "`");
|
||||
return s -> s.replace('\'', '`');
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user