mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2025-01-01 05:57:51 +01:00
Don't run commands through the buffer system
This commit is contained in:
parent
3929ce0dfc
commit
1c15f8462f
@ -162,44 +162,35 @@ public abstract class SubCommand<T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void save(User user, Sender sender, LuckPermsPlugin plugin) {
|
public static void save(User user, Sender sender, LuckPermsPlugin plugin) {
|
||||||
plugin.doAsync(() -> {
|
boolean success = plugin.getDatastore().force().saveUser(user).getUnchecked();
|
||||||
boolean success = plugin.getDatastore().saveUser(user).getUnchecked();
|
user.getRefreshBuffer().requestDirectly();
|
||||||
user.getRefreshBuffer().request().getUnchecked();
|
|
||||||
|
|
||||||
if (success) {
|
|
||||||
Message.USER_SAVE_SUCCESS.send(sender);
|
|
||||||
} else {
|
|
||||||
Message.USER_SAVE_ERROR.send(sender);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
|
if (success) {
|
||||||
|
Message.USER_SAVE_SUCCESS.send(sender);
|
||||||
|
} else {
|
||||||
|
Message.USER_SAVE_ERROR.send(sender);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void save(Group group, Sender sender, LuckPermsPlugin plugin) {
|
public static void save(Group group, Sender sender, LuckPermsPlugin plugin) {
|
||||||
plugin.doAsync(() -> {
|
boolean success = plugin.getDatastore().force().saveGroup(group).getUnchecked();
|
||||||
boolean success = plugin.getDatastore().saveGroup(group).getUnchecked();
|
plugin.getUpdateTaskBuffer().requestDirectly();
|
||||||
plugin.getUpdateTaskBuffer().request().getUnchecked();
|
|
||||||
|
|
||||||
if (success) {
|
|
||||||
Message.GROUP_SAVE_SUCCESS.send(sender);
|
|
||||||
} else {
|
|
||||||
Message.GROUP_SAVE_ERROR.send(sender);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
|
if (success) {
|
||||||
|
Message.GROUP_SAVE_SUCCESS.send(sender);
|
||||||
|
} else {
|
||||||
|
Message.GROUP_SAVE_ERROR.send(sender);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void save(Track track, Sender sender, LuckPermsPlugin plugin) {
|
public static void save(Track track, Sender sender, LuckPermsPlugin plugin) {
|
||||||
plugin.doAsync(() -> {
|
boolean success = plugin.getDatastore().force().saveTrack(track).getUnchecked();
|
||||||
boolean success = plugin.getDatastore().saveTrack(track).getUnchecked();
|
plugin.getUpdateTaskBuffer().requestDirectly();
|
||||||
plugin.getUpdateTaskBuffer().request().getUnchecked();
|
|
||||||
|
|
||||||
if (success) {
|
|
||||||
Message.TRACK_SAVE_SUCCESS.send(sender);
|
|
||||||
} else {
|
|
||||||
Message.TRACK_SAVE_ERROR.send(sender);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
|
if (success) {
|
||||||
|
Message.TRACK_SAVE_SUCCESS.send(sender);
|
||||||
|
} else {
|
||||||
|
Message.TRACK_SAVE_ERROR.send(sender);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user