mirror of
https://github.com/geekfrog/PermissionsTime.git
synced 2024-11-21 14:58:48 +00:00
vault处理权限不支持异步?! 那就改成同步试试
This commit is contained in:
parent
0a3700d1e2
commit
4335c6cbf8
2
pom.xml
2
pom.xml
@ -3,7 +3,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>gg.frog.mc</groupId>
|
||||
<artifactId>permissionstime</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<version>0.1.1-TEST</version>
|
||||
<packaging>jar</packaging>
|
||||
<name>PermissionsTime</name>
|
||||
<description>支持跨服的权限限时插件</description>
|
||||
|
@ -219,8 +219,13 @@ public class PermissionPackageBean implements IConfigBean {
|
||||
subPpb.getGroups().removeAll(p.getGroups());
|
||||
}
|
||||
}
|
||||
subPpb.clearPlayer(player, plugin.getServer(), plugin.getPermission());
|
||||
addPpb.givePlayer(player, plugin.getServer(), plugin.getPermission());
|
||||
plugin.getServer().getScheduler().runTask(plugin, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
subPpb.clearPlayer(player, plugin.getServer(), plugin.getPermission());
|
||||
addPpb.givePlayer(player, plugin.getServer(), plugin.getPermission());
|
||||
}
|
||||
});
|
||||
BukkitTask task = taskMap.get(player.getUniqueId().toString());
|
||||
if (task != null) {
|
||||
plugin.getServer().getScheduler().cancelTask(task.getTaskId());
|
||||
@ -242,7 +247,12 @@ public class PermissionPackageBean implements IConfigBean {
|
||||
PermissionPackageBean subPpb = new PermissionPackageBean();
|
||||
subPpb.getPermissions().addAll(PackagesCfg.allPermissions);
|
||||
subPpb.getGroups().addAll(PackagesCfg.allGroups);
|
||||
subPpb.clearPlayer(player, plugin.getServer(), plugin.getPermission());
|
||||
plugin.getServer().getScheduler().runTask(plugin, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
subPpb.clearPlayer(player, plugin.getServer(), plugin.getPermission());
|
||||
}
|
||||
});
|
||||
BukkitTask task = taskMap.get(player.getUniqueId().toString());
|
||||
if (task != null) {
|
||||
plugin.getServer().getScheduler().cancelTask(task.getTaskId());
|
||||
|
Loading…
Reference in New Issue
Block a user