Skip to content

Commit d4510ce

Browse files
committed
1.21.11 changes:
- 1.21.11 support - Fix some typos - Update German and Russian translation - Bump version
1 parent 4c0e14a commit d4510ce

13 files changed

Lines changed: 913 additions & 60 deletions

File tree

build.gradle.kts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ repositories {
3838

3939
dependencies {
4040
implementation(project(":core"))
41+
implementation(project(":v1_21_R6"))
4142
implementation(project(":v1_21_R5"))
4243
implementation(project(":v1_21_R4"))
4344
implementation(project(":v1_21_R3"))
@@ -50,7 +51,7 @@ dependencies {
5051
implementation(project(":v1_20_R1", "reobf"))
5152
}
5253

53-
var pluginVersion = "1.7.7"
54+
var pluginVersion = "1.7.8"
5455

5556
allprojects {
5657
group = "dev.foxikle"

core/src/main/java/dev/foxikle/customnpcs/internal/CustomNPCs.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,11 @@ public final class CustomNPCs extends JavaPlugin implements PluginMessageListene
104104
* Used to close the deletion menu if it was opened by the command. true = open the menu
105105
*/
106106
@Getter
107-
private final Cache<UUID, Boolean> deltionReason = CacheBuilder.newBuilder().expireAfterWrite(1,
107+
private final Cache<UUID, Boolean> deletionReason = CacheBuilder.newBuilder().expireAfterWrite(1,
108108
TimeUnit.MINUTES).expireAfterAccess(1, TimeUnit.MINUTES).build();
109109
private final String[] COMPATIBLE_VERSIONS = {"1.20", "1.20.1", "1.20.2", "1.20.3", "1.20.4", "1.20.5", "1.20.6",
110110
"1.21", "1.21.1", "1.21.2", "1.21.3", "1.21.4", "1.21.5", "1.21.6", "1.21.7", "1.21.8", "1.21.9",
111-
"1.21.10"};
111+
"1.21.10", "1.21.11"};
112112
private final String NPC_CLASS = "dev.foxikle.customnpcs.versions.NPC_%s";
113113
/**
114114
* The map of what the plugin is waiting for the players to enter.
@@ -513,6 +513,7 @@ public String translateVersion() {
513513
case "1.21.5" -> "v1_21_R3";
514514
case "1.21.6", "1.21.7", "1.21.8" -> "v1_21_R4";
515515
case "1.21.9", "1.21.10" -> "v1_21_R5";
516+
case "1.21.11" -> "v1_21_R6";
516517
default -> "";
517518
};
518519
}

core/src/main/java/dev/foxikle/customnpcs/internal/commands/DeleteCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public void usage(
5959

6060
assert finalNpc != null;
6161
plugin.getEditingNPCs().put(p.getUniqueId(), finalNpc);
62-
plugin.getDeltionReason().put(p.getUniqueId(), false);
62+
plugin.getDeletionReason().put(p.getUniqueId(), false);
6363
plugin.getLotus().openMenu(p, MenuUtils.NPC_DELETE);
6464
}
6565
}

core/src/main/java/dev/foxikle/customnpcs/internal/listeners/Listeners.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,9 @@ public void onPlayerLogin(PlayerJoinEvent e) {
530530
Player player = e.getPlayer();
531531

532532
if (plugin.update && plugin.getConfig().getBoolean("AlertOnUpdate") && player.hasPermission("customnpcs.alert")) {
533-
player.sendMessage(Msg.translate(player.locale(), "customnpcs.should_update"));
533+
player.sendMessage(Msg.translate(player.locale(), "customnpcs.should_update").appendNewline()
534+
.append(Msg.format("<click:open_url:https://modrinth" +
535+
".com/plugin/customnpcs/versions><b><#1bd96a>[Modrinth]")));
534536
}
535537
recalcSleepingPercentages();
536538
if (player.getGameMode() == GameMode.SPECTATOR) return;

core/src/main/java/dev/foxikle/customnpcs/internal/menu/DeleteMenu.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public InventoryType getMenuType() {
9494
return;
9595
}
9696

97-
Boolean openMenu = plugin.getDeltionReason().getIfPresent(player1.getUniqueId());
97+
Boolean openMenu = plugin.getDeletionReason().getIfPresent(player1.getUniqueId());
9898
NpcDeleteEvent.DeletionSource source;
9999
if (openMenu == null) {
100100
source = NpcDeleteEvent.DeletionSource.UNKNOWN;
@@ -131,7 +131,7 @@ public InventoryType getMenuType() {
131131
return;
132132
}
133133

134-
Boolean openMenu = plugin.getDeltionReason().getIfPresent(player1.getUniqueId());
134+
Boolean openMenu = plugin.getDeletionReason().getIfPresent(player1.getUniqueId());
135135

136136
if (openMenu == null) {
137137
player.closeInventory(InventoryCloseEvent.Reason.PLUGIN);

core/src/main/java/dev/foxikle/customnpcs/internal/menu/MainNPCMenu.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public String getName() {
137137
if (plugin.getNPCByID(npc.getUniqueID()) != null)
138138
builder.setButton(44, Button.clickable(MenuItems.deleteNpc(player), ButtonClickAction.plain((menu, event) -> {
139139
Player p = (Player) event.getWhoClicked();
140-
plugin.getDeltionReason().put(p.getUniqueId(), true);
140+
plugin.getDeletionReason().put(p.getUniqueId(), true);
141141
plugin.getLotus().openMenu(p, MenuUtils.NPC_DELETE);
142142
p.playSound(p, Sound.UI_BUTTON_CLICK, 1.0F, 1.0F);
143143
})));

core/src/main/resources/localization/German_de.properties

Lines changed: 89 additions & 35 deletions
Large diffs are not rendered by default.

core/src/main/resources/localization/Russian_ru.properties

Lines changed: 70 additions & 17 deletions
Large diffs are not rendered by default.

settings.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,5 @@ include("v1_21_R2")
3636
include("v1_21_R3")
3737
include("v1_21_R4")
3838
include("v1_21_R5")
39+
include("v1_21_R6")
40+

v1_21_R6/build.gradle.kts

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
/*
2+
* Copyright (c) 2024-2025. Foxikle
3+
*
4+
* Permission is hereby granted, free of charge, to any person obtaining a copy
5+
* of this software and associated documentation files (the "Software"), to deal
6+
* in the Software without restriction, including without limitation the rights
7+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
* copies of the Software, and to permit persons to whom the Software is
9+
* furnished to do so, subject to the following conditions:
10+
*
11+
* The above copyright notice and this permission notice shall be included in all
12+
* copies or substantial portions of the Software.
13+
*
14+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20+
* SOFTWARE.
21+
*/
22+
23+
plugins {
24+
id("java")
25+
id("io.papermc.paperweight.userdev") version "2.0.0-beta.19"
26+
id("io.freefair.lombok") version "9.0.0"
27+
}
28+
29+
repositories {
30+
mavenLocal()
31+
mavenCentral()
32+
maven("https://jitpack.io")
33+
maven("https://repo.extendedclip.com/content/repositories/placeholderapi/")
34+
}
35+
36+
dependencies {
37+
compileOnly("me.clip:placeholderapi:2.11.6")
38+
compileOnly(project(":core"))
39+
// TODO: Remove the "rc1-" part...
40+
paperweight.paperDevBundle("1.21.11-R0.1-SNAPSHOT")
41+
}
42+
43+
tasks {
44+
java {
45+
toolchain.languageVersion = JavaLanguageVersion.of(21)
46+
}
47+
48+
compileJava {
49+
options.release = 21
50+
}
51+
52+
jar {
53+
archiveClassifier = "v1_21_R5"
54+
}
55+
}

0 commit comments

Comments
 (0)