Package pers.neige.neigeitems.user
Class User
-
- All Implemented Interfaces:
public class User
-
-
Method Summary
Modifier and Type Method Description UUID
getUUID()
Map<String, Object>
getMetadata()
void
addChatCatcher(@NonNull() ChatCatcher catcher)
ChatCatcher
pollChatCatcher()
void
clearChatCatcher()
void
addSignCatcher(@NonNull() SignCatcher catcher)
SignCatcher
pollSignCatcher()
void
clearSignCatcher()
long
checkCooldown(@NonNull() String key, long cooldown)
检测冷却状态. long
getCooldown(@NonNull() String key)
返回剩余冷却时间. void
setCooldown(@NonNull() String key, long cooldown)
设置进入冷却状态. -
-
Constructor Detail
-
User
User(UUID uuid)
-
-
Method Detail
-
getMetadata
@NonNull() Map<String, Object> getMetadata()
-
addChatCatcher
void addChatCatcher(@NonNull() ChatCatcher catcher)
-
pollChatCatcher
@Nullable() ChatCatcher pollChatCatcher()
-
clearChatCatcher
void clearChatCatcher()
-
addSignCatcher
void addSignCatcher(@NonNull() SignCatcher catcher)
-
pollSignCatcher
@Nullable() SignCatcher pollSignCatcher()
-
clearSignCatcher
void clearSignCatcher()
-
checkCooldown
long checkCooldown(@NonNull() String key, long cooldown)
检测冷却状态. 冷却完成则重新设置冷却并返回0. 冷却未完成则返回剩余时间.
- Parameters:
key
- 冷却组IDcooldown
- 冷却刷新时间- Returns:
剩余冷却时间
-
getCooldown
long getCooldown(@NonNull() String key)
返回剩余冷却时间.
- Parameters:
key
- 冷却组ID- Returns:
剩余冷却时间
-
setCooldown
void setCooldown(@NonNull() String key, long cooldown)
设置进入冷却状态.
- Parameters:
key
- 冷却组IDcooldown
- 冷却刷新时间
-
-
-
-