You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I am using ACF in one of my plugins which is on a server with java and bedrock players.. When running a command it sometimes crashes. Here is my code
Using implementation "co.aikar:acf-paper:0.5.1-SNAPSHOT"
@Subcommand("run")
@CommandPermission("quests.admin")
public void runQuest(CommandSender sender, @Name("target") OfflinePlayer target, @Name("quest") String quest) {
if (!(sender instanceof Player)) {
if(plugin.villagerManager.getQuestByName(quest) == null) {
sender.sendMessage(ChatColor.RED + " Invalid quest provided " + quest);
return;
}
plugin.villagerManager.playVillager((Player) target, quest, plugin.playerManager.hasCompletedQuestOrTask((Player) target, quest, PlayerManager.QuestOrTask.QUEST));
} else {
sender.sendMessage(ChatColor.RED + "This command can only be executed from the console.");
}
}
thats "expected", offline players might need to be looked up from mojangs auth server so you have the proper uuid, if its not cached, which is an IO call on the main thread. if your connection is slow, the auth server is slow, or you are getting rate limited by the auth server, that can stall the main thread.
paper adds a method to only get the offline player if cached, ACF could add a flag for that I guess, or you can use a string argument and use the method yourself.
Hello, I am using ACF in one of my plugins which is on a server with java and bedrock players.. When running a command it sometimes crashes. Here is my code
Using
implementation "co.aikar:acf-paper:0.5.1-SNAPSHOT"
Here is my crash log
The text was updated successfully, but these errors were encountered: