mirror of
https://e.coding.net/circlecloud/QuickShop.git
synced 2024-11-22 01:58:54 +00:00
fix message error...
Signed-off-by: j502647092 <jtb1@163.com>
This commit is contained in:
parent
f6f061daf3
commit
377710b3c3
@ -26,7 +26,7 @@ import mkremins.fanciful.FancyMessage;
|
||||
public class MsgUtil {
|
||||
private static QuickShop plugin;
|
||||
private static YamlConfiguration messages;
|
||||
private static HashMap<String, LinkedList<String>> player_messages = new HashMap<String, LinkedList<String>>();
|
||||
private static HashMap<UUID, LinkedList<String>> player_messages = new HashMap<UUID, LinkedList<String>>();
|
||||
|
||||
static {
|
||||
plugin = QuickShop.instance;
|
||||
@ -84,7 +84,7 @@ public class MsgUtil {
|
||||
try {
|
||||
final ResultSet rs = plugin.getDB().getConnection().prepareStatement("SELECT * FROM messages").executeQuery();
|
||||
while (rs.next()) {
|
||||
final String owner = rs.getString("owner");
|
||||
final UUID owner = UUID.fromString(rs.getString("owner"));
|
||||
final String message = rs.getString("message");
|
||||
LinkedList<String> msgs = player_messages.get(owner);
|
||||
if (msgs == null) {
|
||||
@ -121,7 +121,7 @@ public class MsgUtil {
|
||||
* they're online. Else, if they're not online, queues it for
|
||||
* them in the database.
|
||||
*/
|
||||
public static void send(final String player, final String message) { // TODO Converted to UUID
|
||||
public static void send(final UUID player, final String message) { // TODO Converted to UUID
|
||||
final OfflinePlayer p = Bukkit.getOfflinePlayer(player);
|
||||
if (p == null || !p.isOnline()) {
|
||||
LinkedList<String> msgs = player_messages.get(player);
|
||||
|
Loading…
Reference in New Issue
Block a user