Skip to content

Commit be0b470

Browse files
authored
Merge pull request #100 from OneLiteFeatherNET/develop
Release 1.2.1
2 parents cd24ce6 + a5841b6 commit be0b470

14 files changed

+88
-50
lines changed

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ _Put an `x` in the boxes that apply. You can also fill these out after creating
4343
them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before
4444
merging your code._
4545

46-
- [ ] I have read the CONTRIBUTING.md
46+
- [ ] I have read the [CONTRIBUTING.md](https://github.com/OneLiteFeatherNET/.github/blob/main/CONTRIBUTING.md)
4747
- [ ] I have added tests that prove my fix is effective or that my feature works
4848
- [ ] I have added necessary documentation (if appropriate)
4949

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ if (!File("$rootDir/.git").exists()) {
2626
}
2727

2828
group = "net.onelitefeather"
29-
version = "1.2.0"
29+
version = "1.2.1"
3030
val supportedMinecraftVersions = listOf(
3131
"1.19.4",
3232
"1.20.6",

gradle/wrapper/gradle-wrapper.jar

130 Bytes
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gradlew.bat

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

settings.gradle.kts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ dependencyResolutionManagement {
2121
version("modrinth", "2.+")
2222
version("hangar", "0.1.2")
2323
version("paper.yml", "0.6.0")
24-
version("paper.run", "2.3.0")
24+
version("paper.run", "2.3.1")
2525
version("shadowJar", "8.1.1")
2626

2727
version("paper", "1.20.6-R0.1-SNAPSHOT")
28-
version("bstats", "3.0.2")
28+
version("bstats", "3.1.0")
2929

3030
version("cloudcommand", "2.0.0-SNAPSHOT")
3131

@@ -34,14 +34,14 @@ dependencyResolutionManagement {
3434

3535
// WorldGuard
3636
version("wgv6", "6.2")
37-
version("wgv7", "7.0.10")
37+
version("wgv7", "7.0.12")
3838
library("wg6", "com.sk89q.worldguard", "worldguard-legacy").versionRef("wgv6")
3939
library("wg7", "com.sk89q.worldguard", "worldguard-bukkit").versionRef("wgv7")
4040

4141
// PlotSquared
4242
version("psv4", "4.453")
43-
version("psv6", "1.46")
44-
version("psv7", "1.46")
43+
version("psv6", "1.51")
44+
version("psv7", "1.51")
4545

4646
library("psv4.core", "com.github.IntellectualSites.PlotSquared","Core").versionRef("psv4")
4747
library("psv4.bukkit", "com.github.IntellectualSites.PlotSquared","Bukkit").versionRef("psv4")

src/main/java/net/onelitefeather/antiredstoneclockremastered/commands/DisplayActiveClocksCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ private Component mapClockToMessage(RedstoneClock redstoneClock) {
5454
return Component.empty().hoverEvent(Component.translatable("antiredstoneclockremastered.command.display.clock.hover").asHoverEvent()).append(
5555
Component.translatable("antiredstoneclockremastered.command.display.clock.text")
5656
.arguments(
57+
TranslationArgument.numeric(redstoneClock.getTriggerCount()),
5758
TranslationArgument.numeric(location.getBlockX()),
5859
TranslationArgument.numeric(location.getBlockY()),
5960
TranslationArgument.numeric(location.getBlockZ()),
60-
TranslationArgument.numeric(redstoneClock.getTriggerCount()),
6161
Component.empty()
6262
.clickEvent(ClickEvent.callback(audience -> {
6363
if (audience instanceof final Player executor) {

src/main/java/net/onelitefeather/antiredstoneclockremastered/service/RedstoneClockService.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
import org.bukkit.Location;
1111
import org.bukkit.Material;
1212
import org.bukkit.block.Block;
13+
import org.bukkit.enchantments.Enchantment;
1314
import org.bukkit.entity.Player;
15+
import org.bukkit.inventory.ItemStack;
1416
import org.jetbrains.annotations.NotNull;
1517
import org.jetbrains.annotations.Nullable;
1618

@@ -33,6 +35,7 @@ public final class RedstoneClockService {
3335
private List<String> ignoredWorlds;
3436

3537
private final ConcurrentHashMap<Location, RedstoneClock> activeClockTesters = new ConcurrentHashMap<>();
38+
private final ItemStack SILK_TOUCH_PICKAXE = new ItemStack(Material.DIAMOND_PICKAXE);
3639

3740
public RedstoneClockService(@NotNull AntiRedstoneClockRemastered antiRedstoneClockRemastered) {
3841
this.antiRedstoneClockRemastered = antiRedstoneClockRemastered;
@@ -43,6 +46,7 @@ public RedstoneClockService(@NotNull AntiRedstoneClockRemastered antiRedstoneClo
4346
this.notifyConsole = antiRedstoneClockRemastered.getConfig().getBoolean("clock.notifyConsole", true);
4447
this.dropItems = antiRedstoneClockRemastered.getConfig().getBoolean("clock.drop", false);
4548
this.ignoredWorlds = antiRedstoneClockRemastered.getConfig().getStringList("check.ignoredWorlds");
49+
SILK_TOUCH_PICKAXE.addEnchantment(Enchantment.SILK_TOUCH, 1);
4650
}
4751

4852
public void checkAndUpdateClockStateWithActiveManual(@NotNull Location location, boolean state) {
@@ -169,7 +173,7 @@ private void sendNotification(final Player player, final Location location) {
169173
private void breakBlock(@NotNull Location location) {
170174
Block block = location.getBlock();
171175
if (this.dropItems) {
172-
var drops = block.getDrops();
176+
var drops = block.getDrops(SILK_TOUCH_PICKAXE);
173177
drops.forEach(itemStack -> block.getWorld().dropItem(location, itemStack));
174178
}
175179
Runnable removeTask = () -> block.setType(Material.AIR, true);

src/main/java/net/onelitefeather/antiredstoneclockremastered/service/UpdateService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public void run() {
4444
}
4545

4646
public void notifyConsole(ComponentLogger logger) {
47-
if (this.remoteVersion.isHigherThan(this.localVersion)) {
47+
if (this.remoteVersion != null && this.remoteVersion.isHigherThan(this.localVersion)) {
4848
logger.warn(Component.translatable("antiredstoneclockremastered.notify.update.console")
4949
.arguments(Component.text(localVersion.toString()),
5050
Component.text(remoteVersion.toString()),
@@ -55,7 +55,7 @@ public void notifyConsole(ComponentLogger logger) {
5555

5656

5757
public void notifyPlayer(Player player) {
58-
if (this.remoteVersion.isHigherThan(this.localVersion)) {
58+
if (this.remoteVersion != null && this.remoteVersion.isHigherThan(this.localVersion)) {
5959
notifyPlayer(this.localVersion, this.remoteVersion, player);
6060
}
6161
}

0 commit comments

Comments
 (0)