A plugin to log chat to SQL and remove it from appearing in the log. Best method: Log chat in memory for X seconds (this way you don't slam the DB) Create bulk insert Run insert Schema: Code: CREATE TABLE mc_chat_log ( log_id bigint not null primary key auto_increment, log_time DATETIME, log_player varchar(32), log_text TEXT, INDEX(log_time), INDEX(log_player) );
So if you are flushing the chat to cache and its a lot of data, how bad is the lag generated? Its best to break tasks up into small chunks; Batching sounds good but I honestly don't know about threading in Bukkit as I know Hey0 was single threaded.. and the sql library I see people wanting to use is single threaded itself anyway.
There won't be enough chatter in X seconds to produce a lot of noticeable lag. Even if it's every 30, 60 seconds.