Random string for click verify

This commit is contained in:
HaHaWTH 2023-10-21 18:12:33 +08:00
parent 59eabe38c6
commit 1ef7ed4b3f

View File

@ -82,7 +82,6 @@ public class GuiCaptchaHandler implements Listener{
}
}
@EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST)
public void onPlayerJoin(PlayerJoinEvent event) {
randomString = "";
@ -117,7 +116,7 @@ public class GuiCaptchaHandler implements Listener{
ItemMeta meta = item.getItemMeta();
try {
if (meta != null) {
meta.setDisplayName("§a我是真人");
meta.setDisplayName("§a" + randomString + "§a我是真人");
item.setItemMeta(meta);
}
} catch (NullPointerException e) {