Skip to content

Commit

Permalink
Cooldown bug fix and improvement.
Browse files Browse the repository at this point in the history
  • Loading branch information
biscuut committed Sep 14, 2018
1 parent 5de8a15 commit 029716c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
8 changes: 7 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>xyz.biscut.chunkbuster</groupId>
<artifactId>ChunkBuster</artifactId>
<version>1.1.5</version>
<version>1.1.6</version>
<name>ChunkBuster</name>

<build>
Expand Down Expand Up @@ -34,6 +34,12 @@
</configuration>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>

<repositories>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ public void onChunkBusterPlace(BlockPlaceEvent e) {
return;
}
}
playerCooldowns.put(p, System.currentTimeMillis() + (1000 * main.getConfigValues().getCooldown()));
}
chunkBusterLocations.put(p, e.getBlock().getLocation());
if (!p.getOpenInventory().getTitle().contains(main.getConfigValues().getGUITitle())) {
Expand Down Expand Up @@ -152,6 +151,7 @@ public void onConfirmClick(InventoryClickEvent e) {
}
} else {
if (e.getCurrentItem() != null && e.getCurrentItem().hasItemMeta() && e.getCurrentItem().getItemMeta().getDisplayName().contains(main.getConfigValues().getConfirmName())) {
playerCooldowns.put(p, System.currentTimeMillis() + (1000 * main.getConfigValues().getCooldown()));
if (main.getConfigValues().confirmSoundEnabled()) {
p.playSound(p.getLocation(), main.getConfigValues().getConfirmSoundString(), main.getConfigValues().getConfirmSoundVolume(), main.getConfigValues().getConfirmSoundPitch());
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# | \__/\| | | || |_| || | | || < | |_/ /| |_| |\__ \| |_| __/| | #
# \____/|_| |_| \__,_||_| |_||_|\_\\____/ \__,_||___/ \__|\___||_| #
# #
# v1.1.5 by Biscut #
# v${version} by Biscut #
#########################################################################

chunkbuster:
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
main: xyz.biscut.chunkbuster.ChunkBuster
version: 1.1.5
version: ${version}
name: ChunkBuster
author: Biscut
softdepend: [MassiveCore, Factions, WorldGuard]
Expand Down

0 comments on commit 029716c

Please sign in to comment.