Skip to content
This repository was archived by the owner on Aug 8, 2025. It is now read-only.

Commit 2d2a682

Browse files
Merge branch 'PlaceholderAPI:master' into master
2 parents 94a9d84 + 68f467a commit 2d2a682

File tree

58 files changed

+80
-60
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+80
-60
lines changed

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ license {
5656
encoding = "UTF-8"
5757

5858
ext {
59-
set("year", 2021)
59+
set("year", 2024)
6060
}
6161
}
6262

config/headers/jsonmessage.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2018-2021 Peter Blood
1+
Copyright (c) 2018-2024 Peter Blood
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
44

src/main/java/me/clip/placeholderapi/PlaceholderAPI.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* This file is part of PlaceholderAPI
33
*
44
* PlaceholderAPI
5-
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
5+
* Copyright (c) 2015 - 2024 PlaceholderAPI Team
66
*
77
* PlaceholderAPI free software: you can redistribute it and/or modify
88
* it under the terms of the GNU General Public License as published by

src/main/java/me/clip/placeholderapi/PlaceholderAPIPlugin.java

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* This file is part of PlaceholderAPI
33
*
44
* PlaceholderAPI
5-
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
5+
* Copyright (c) 2015 - 2024 PlaceholderAPI Team
66
*
77
* PlaceholderAPI free software: you can redistribute it and/or modify
88
* it under the terms of the GNU General Public License as published by
@@ -22,6 +22,7 @@
2222

2323
import com.tcoded.folialib.FoliaLib;
2424
import java.text.SimpleDateFormat;
25+
import java.util.Arrays;
2526
import java.util.HashMap;
2627
import java.util.Map;
2728
import me.clip.placeholderapi.commands.PlaceholderCommandRouter;
@@ -57,7 +58,18 @@ public final class PlaceholderAPIPlugin extends JavaPlugin {
5758
private static FoliaLib foliaLib;
5859

5960
static {
60-
final String version = Bukkit.getServer().getClass().getPackage().getName().split("\\.")[3];
61+
String version = Bukkit.getServer().getBukkitVersion().split("-")[0];
62+
String suffix;
63+
if (version.chars()
64+
.filter(c -> c == '.')
65+
.count() == 1) {
66+
suffix = "R1";
67+
version = 'v' + version.replace('.', '_') + '_' + suffix;
68+
} else {
69+
int minor = Integer.parseInt(version.split("\\.")[2].charAt(0) + "");
70+
version = 'v' + version.replace('.', '_').replace("_" + minor, "") + '_' + "R" + (minor - 1);
71+
}
72+
6173

6274
boolean isSpigot;
6375
try {
@@ -138,6 +150,7 @@ public static SimpleDateFormat getDateFormat() {
138150
}
139151
}
140152

153+
@Deprecated
141154
public static Version getServerVersion() {
142155
return VERSION;
143156
}

src/main/java/me/clip/placeholderapi/PlaceholderHook.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* This file is part of PlaceholderAPI
33
*
44
* PlaceholderAPI
5-
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
5+
* Copyright (c) 2015 - 2024 PlaceholderAPI Team
66
*
77
* PlaceholderAPI free software: you can redistribute it and/or modify
88
* it under the terms of the GNU General Public License as published by

src/main/java/me/clip/placeholderapi/commands/PlaceholderCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* This file is part of PlaceholderAPI
33
*
44
* PlaceholderAPI
5-
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
5+
* Copyright (c) 2015 - 2024 PlaceholderAPI Team
66
*
77
* PlaceholderAPI free software: you can redistribute it and/or modify
88
* it under the terms of the GNU General Public License as published by

src/main/java/me/clip/placeholderapi/commands/PlaceholderCommandRouter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* This file is part of PlaceholderAPI
33
*
44
* PlaceholderAPI
5-
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
5+
* Copyright (c) 2015 - 2024 PlaceholderAPI Team
66
*
77
* PlaceholderAPI free software: you can redistribute it and/or modify
88
* it under the terms of the GNU General Public License as published by

src/main/java/me/clip/placeholderapi/commands/impl/cloud/CommandECloud.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* This file is part of PlaceholderAPI
33
*
44
* PlaceholderAPI
5-
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
5+
* Copyright (c) 2015 - 2024 PlaceholderAPI Team
66
*
77
* PlaceholderAPI free software: you can redistribute it and/or modify
88
* it under the terms of the GNU General Public License as published by

src/main/java/me/clip/placeholderapi/commands/impl/cloud/CommandECloudClear.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* This file is part of PlaceholderAPI
33
*
44
* PlaceholderAPI
5-
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
5+
* Copyright (c) 2015 - 2024 PlaceholderAPI Team
66
*
77
* PlaceholderAPI free software: you can redistribute it and/or modify
88
* it under the terms of the GNU General Public License as published by

src/main/java/me/clip/placeholderapi/commands/impl/cloud/CommandECloudDownload.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* This file is part of PlaceholderAPI
33
*
44
* PlaceholderAPI
5-
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
5+
* Copyright (c) 2015 - 2024 PlaceholderAPI Team
66
*
77
* PlaceholderAPI free software: you can redistribute it and/or modify
88
* it under the terms of the GNU General Public License as published by

0 commit comments

Comments
 (0)