From 13bccd1d3f1a6129d8b6c49a99f8cf75f06825bd Mon Sep 17 00:00:00 2001 From: Luck Date: Mon, 3 Oct 2016 21:41:47 +0100 Subject: [PATCH] Fix users not receiving permission updates --- .../java/me/lucko/luckperms/storage/methods/JSONDatastore.java | 1 + .../me/lucko/luckperms/storage/methods/MongoDBDatastore.java | 1 + .../java/me/lucko/luckperms/storage/methods/SQLDatastore.java | 1 + .../java/me/lucko/luckperms/storage/methods/YAMLDatastore.java | 1 + 4 files changed, 4 insertions(+) diff --git a/common/src/main/java/me/lucko/luckperms/storage/methods/JSONDatastore.java b/common/src/main/java/me/lucko/luckperms/storage/methods/JSONDatastore.java index 62b1aa6f3..63d82e0cd 100644 --- a/common/src/main/java/me/lucko/luckperms/storage/methods/JSONDatastore.java +++ b/common/src/main/java/me/lucko/luckperms/storage/methods/JSONDatastore.java @@ -140,6 +140,7 @@ public class JSONDatastore extends FlatfileDatastore { }, false); } finally { user.getIoLock().unlock(); + user.refreshPermissions(); } } diff --git a/common/src/main/java/me/lucko/luckperms/storage/methods/MongoDBDatastore.java b/common/src/main/java/me/lucko/luckperms/storage/methods/MongoDBDatastore.java index 93600a3ff..79ab53e88 100644 --- a/common/src/main/java/me/lucko/luckperms/storage/methods/MongoDBDatastore.java +++ b/common/src/main/java/me/lucko/luckperms/storage/methods/MongoDBDatastore.java @@ -179,6 +179,7 @@ public class MongoDBDatastore extends Datastore { }, false); } finally { user.getIoLock().unlock(); + user.refreshPermissions(); } } diff --git a/common/src/main/java/me/lucko/luckperms/storage/methods/SQLDatastore.java b/common/src/main/java/me/lucko/luckperms/storage/methods/SQLDatastore.java index 4e9c81546..36c7bb935 100644 --- a/common/src/main/java/me/lucko/luckperms/storage/methods/SQLDatastore.java +++ b/common/src/main/java/me/lucko/luckperms/storage/methods/SQLDatastore.java @@ -185,6 +185,7 @@ abstract class SQLDatastore extends Datastore { ); } finally { user.getIoLock().unlock(); + user.refreshPermissions(); } } diff --git a/common/src/main/java/me/lucko/luckperms/storage/methods/YAMLDatastore.java b/common/src/main/java/me/lucko/luckperms/storage/methods/YAMLDatastore.java index f3d58827e..a5d7d9d79 100644 --- a/common/src/main/java/me/lucko/luckperms/storage/methods/YAMLDatastore.java +++ b/common/src/main/java/me/lucko/luckperms/storage/methods/YAMLDatastore.java @@ -126,6 +126,7 @@ public class YAMLDatastore extends FlatfileDatastore { }, false); } finally { user.getIoLock().unlock(); + user.refreshPermissions(); } }