Fix concurrency issue, remove sqlite from Bungee version and fix join message

This commit is contained in:
Luck
2016-06-28 17:10:01 +01:00
Unverified
parent d35774b401
commit d855be1c65
14 changed files with 47 additions and 55 deletions
@@ -6,9 +6,10 @@ import java.util.UUID;
public class Util {
public static final String PREFIX = "&7&l[&b&lL&a&lP&7&l] &c";
public static void sendPluginMessage(Sender sender, String message) {
// TODO: Pull the prefix from the config somehow
sender.sendMessage(color("&7&l[&b&lL&a&lP&7&l] &c" + message));
sender.sendMessage(color(PREFIX + message));
}
public static String color(String s) {
@@ -16,7 +16,7 @@ public class GroupInfoCommand extends GroupSubCommand {
@Override
protected void execute(LuckPermsPlugin plugin, Sender sender, Group group, List<String> args) {
final String prefix = plugin.getConfiguration().getPrefix();
final String prefix = Util.PREFIX;
String sb = prefix + "&d-> &eGroup: &6" + group.getName() + "\n" +
prefix + "&d-> &ePermissions: &6" + group.getNodes().keySet().size() + "\n" +
prefix + "&d-> &bUse &a/perms group " + group.getName() + " listnodes &bto see all permissions.";
@@ -16,7 +16,7 @@ public class UserInfoCommand extends UserSubCommand {
@Override
protected void execute(LuckPermsPlugin plugin, Sender sender, User user, List<String> args) {
final String prefix = plugin.getConfiguration().getPrefix();
final String prefix = Util.PREFIX;
String sb = prefix + "&d-> &eUser: &6" + user.getName() + "\n" +
prefix + "&d-> &eUUID: &6" + user.getUuid() + "\n" +
prefix + "&d-> &eStatus: " + plugin.getPlayerStatus(user.getUuid()) + "\n" +
@@ -176,7 +176,7 @@ public class FlatfileDatastore extends Datastore {
});
// User updating and loading should be done sync as permission attachments are updated
if (success) plugin.doSync(() -> plugin.getUserManager().updateOrSetUser(user));
if (success) plugin.getUserManager().updateOrSetUser(user);
return success;
}
@@ -210,8 +210,7 @@ public class FlatfileDatastore extends Datastore {
return true;
});
// User updating and loading should be done sync as permission attachments are updated
if (success) plugin.doSync(() -> plugin.getUserManager().updateOrSetUser(user));
if (success) plugin.getUserManager().updateOrSetUser(user);
return success;
}
@@ -149,7 +149,7 @@ abstract class SQLDatastore extends Datastore {
});
// User updating and loading should be done sync as permission attachments are updated
if (success) plugin.doSync(() -> plugin.getUserManager().updateOrSetUser(user));
if (success) plugin.getUserManager().updateOrSetUser(user);
return success;
}
@@ -191,7 +191,7 @@ abstract class SQLDatastore extends Datastore {
});
// User updating and loading should be done sync as permission attachments are updated
if (success) plugin.doSync(() -> plugin.getUserManager().updateOrSetUser(user));
if (success) plugin.getUserManager().updateOrSetUser(user);
return success;
}
@@ -3,7 +3,6 @@ package me.lucko.luckperms.utils;
public interface LPConfiguration {
String getServer();
String getPrefix();
int getSyncTime();
String getDefaultGroupNode();
String getDefaultGroupName();