Random string for click verify
This commit is contained in:
parent
59eabe38c6
commit
1ef7ed4b3f
@ -82,7 +82,6 @@ public class GuiCaptchaHandler implements Listener{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST)
|
@EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST)
|
||||||
public void onPlayerJoin(PlayerJoinEvent event) {
|
public void onPlayerJoin(PlayerJoinEvent event) {
|
||||||
randomString = "";
|
randomString = "";
|
||||||
@ -117,7 +116,7 @@ public class GuiCaptchaHandler implements Listener{
|
|||||||
ItemMeta meta = item.getItemMeta();
|
ItemMeta meta = item.getItemMeta();
|
||||||
try {
|
try {
|
||||||
if (meta != null) {
|
if (meta != null) {
|
||||||
meta.setDisplayName("§a我是真人");
|
meta.setDisplayName("§a" + randomString + "§a我是真人");
|
||||||
item.setItemMeta(meta);
|
item.setItemMeta(meta);
|
||||||
}
|
}
|
||||||
} catch (NullPointerException e) {
|
} catch (NullPointerException e) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user