mirror of
https://github.com/TotalFreedomMC/TF-LibsDisguises.git
synced 2025-02-12 12:00:59 +00:00
Warn about illegal async operations
This commit is contained in:
parent
a598884def
commit
203f2adeb5
1 changed files with 5 additions and 0 deletions
|
@ -571,6 +571,11 @@ public class DisguiseParser {
|
||||||
public static Disguise parseDisguise(CommandSender sender, Entity target, String permNode, String[] args,
|
public static Disguise parseDisguise(CommandSender sender, Entity target, String permNode, String[] args,
|
||||||
DisguisePermissions permissions) throws DisguiseParseException, IllegalAccessException,
|
DisguisePermissions permissions) throws DisguiseParseException, IllegalAccessException,
|
||||||
InvocationTargetException {
|
InvocationTargetException {
|
||||||
|
if (!Bukkit.isPrimaryThread()) {
|
||||||
|
DisguiseUtilities.getLogger().warning(
|
||||||
|
"DisguiseParser should not be called async! This operation will become impossible in the future!");
|
||||||
|
}
|
||||||
|
|
||||||
if (sender instanceof Player) {
|
if (sender instanceof Player) {
|
||||||
DisguiseUtilities.setCommandsUsed();
|
DisguiseUtilities.setCommandsUsed();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue