mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-12-29 12:37:40 +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) {
|
||||
plugin.doAsync(() -> {
|
||||
boolean success = plugin.getDatastore().saveUser(user).getUnchecked();
|
||||
user.getRefreshBuffer().request().getUnchecked();
|
||||
|
||||
if (success) {
|
||||
Message.USER_SAVE_SUCCESS.send(sender);
|
||||
} else {
|
||||
Message.USER_SAVE_ERROR.send(sender);
|
||||
}
|
||||
});
|
||||
boolean success = plugin.getDatastore().force().saveUser(user).getUnchecked();
|
||||
user.getRefreshBuffer().requestDirectly();
|
||||
|
||||
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) {
|
||||
plugin.doAsync(() -> {
|
||||
boolean success = plugin.getDatastore().saveGroup(group).getUnchecked();
|
||||
plugin.getUpdateTaskBuffer().request().getUnchecked();
|
||||
|
||||
if (success) {
|
||||
Message.GROUP_SAVE_SUCCESS.send(sender);
|
||||
} else {
|
||||
Message.GROUP_SAVE_ERROR.send(sender);
|
||||
}
|
||||
});
|
||||
boolean success = plugin.getDatastore().force().saveGroup(group).getUnchecked();
|
||||
plugin.getUpdateTaskBuffer().requestDirectly();
|
||||
|
||||
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) {
|
||||
plugin.doAsync(() -> {
|
||||
boolean success = plugin.getDatastore().saveTrack(track).getUnchecked();
|
||||
plugin.getUpdateTaskBuffer().request().getUnchecked();
|
||||
|
||||
if (success) {
|
||||
Message.TRACK_SAVE_SUCCESS.send(sender);
|
||||
} else {
|
||||
Message.TRACK_SAVE_ERROR.send(sender);
|
||||
}
|
||||
});
|
||||
boolean success = plugin.getDatastore().force().saveTrack(track).getUnchecked();
|
||||
plugin.getUpdateTaskBuffer().requestDirectly();
|
||||
|
||||
if (success) {
|
||||
Message.TRACK_SAVE_SUCCESS.send(sender);
|
||||
} else {
|
||||
Message.TRACK_SAVE_ERROR.send(sender);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user