Skip to content

Commit 5abb4ef

Browse files
committed
Added claim message per chunk in mass claim
1 parent ad66d11 commit 5abb4ef

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/main/java/dev/lars/utilsmanager/features/chunk/ChunkCommand.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ public void execute(@NotNull CommandSourceStack stack, @NotNull String[] args) {
4141
String subCommand = args[0].toLowerCase();
4242

4343
switch (subCommand) {
44-
case "claimspawnchunks" -> handleClaimSpawnChunks(player, loc);
4544
case "claim" -> {
4645
if (args.length > 1) {
4746
String posArg = args[1].toLowerCase();
@@ -235,6 +234,12 @@ private void claimArea(Player player, Location pos1, Location pos2) {
235234

236235
if (chunkOwner == null) {
237236
ChunkAPI.getApi().claimChunk(player, claimChunk);
237+
238+
sendMessage(player,
239+
"Du hast den Chunk " + formatChunkCoordinates(claimChunk) + " beansprucht!",
240+
"You claimed the Chunk " + formatChunkCoordinates(claimChunk) + " !",
241+
NamedTextColor.WHITE);
242+
238243
if (!isAdmin) {
239244
LimitAPI.getApi().increaseMaxChunks(player, 1);
240245
}
@@ -244,6 +249,10 @@ private void claimArea(Player player, Location pos1, Location pos2) {
244249
} else {
245250
if (isAdmin) {
246251
ChunkAPI.getApi().claimChunk(player, claimChunk);
252+
sendMessage(player,
253+
"Du hast den Chunk " + formatChunkCoordinates(claimChunk) + " beansprucht!",
254+
"You claimed the Chunk " + formatChunkCoordinates(claimChunk) + " !",
255+
NamedTextColor.WHITE);
247256
claimed++;
248257
} else {
249258
ownedByOthers++;

0 commit comments

Comments
 (0)