1
mirror of https://github.com/CarmJos/ScriptItems synced 2024-09-19 21:35:50 +00:00

完成消息提示

This commit is contained in:
Carm Jos 2022-03-13 13:23:18 +08:00
parent 37bde4e082
commit 395fe548d9
3 changed files with 3 additions and 2 deletions

View File

@ -94,4 +94,5 @@ public class ItemRestrictions {
TimeDateUtils.parseTimeMillis(section.getString("time.end")) TimeDateUtils.parseTimeMillis(section.getString("time.end"))
); );
} }
} }

View File

@ -30,7 +30,7 @@ public class ItemStackConfig {
this(original, null, null, null); this(original, null, null, null);
} }
public ItemStackConfig(@Nullable ItemStack original, private ItemStackConfig(@Nullable ItemStack original,
@Nullable Material material, @Nullable String displayName, @Nullable List<String> lore) { @Nullable Material material, @Nullable String displayName, @Nullable List<String> lore) {
this.original = original; this.original = original;
this.material = material; this.material = material;

View File

@ -127,7 +127,7 @@ public class ItemListener implements Listener {
if (!this.clickTime.containsKey(uuid)) return 0; if (!this.clickTime.containsKey(uuid)) return 0;
if (!PluginConfig.CoolDown.ENABLE.get()) return 0; if (!PluginConfig.CoolDown.ENABLE.get()) return 0;
long start = this.clickTime.get(uuid); long start = this.clickTime.get(uuid);
return (int) (PluginConfig.CoolDown.TIME.get() - ((System.currentTimeMillis() - start) / 1000)) + 1; return (int) ((PluginConfig.CoolDown.TIME.get() - (System.currentTimeMillis() - start)) / 1000) + 1;
} }