Compare commits

...
5 Commits
Author SHA1 Message Date
MD f104b6ec15 Release 2.19.4 2022-03-12 23:00:24 +00:00
MD 695546420f Run update check using Bukkit scheduler (#4839)
Fixes #4825.
2022-03-12 12:02:20 +00:00
Josh Roy 997fb1800e Fix preemptive setting of owner metadata on to trade signs (#4835)
Fixes #4836.
2022-03-08 15:08:34 +00:00
MD 3984bddd9d Fix 2.19.4 dev build version (#4834) 2022-03-06 00:06:48 +00:00
MD d92ce8bdfe Bump to 2.19.4 dev (#4831) 2022-03-05 18:33:04 +00:00
4 changed files with 19 additions and 17 deletions

No files matched your search

@@ -31,6 +31,7 @@ import java.util.Set;
import static com.earth2me.essentials.I18n.tl;
public class EssentialsSign {
private static final String SIGN_OWNER_KEY = "sign-owner";
protected static final BigDecimal MINTRANSACTION = new BigDecimal("0.01");
private static final Set<Material> EMPTY_SET = new HashSet<>();
protected transient final String signName;
@@ -166,19 +167,20 @@ public class EssentialsSign {
return;
}
final Sign sign = (Sign) signProvider.getBlock().getState();
ess.getSignDataProvider().setSignData(sign, "owner", user.getUUID().toString());
ess.getSignDataProvider().setSignData(sign, SIGN_OWNER_KEY, user.getUUID().toString());
}
public boolean isOwner(final IEssentials ess, final User user, final ISign signProvider, final int nameIndex, final String namePrefix) {
final Sign sign = (Sign) signProvider.getBlock().getState();
if (ess.getSignDataProvider() == null || ess.getSignDataProvider().getSignData(sign, "owner") == null) {
if (ess.getSignDataProvider() != null) {
ess.getSignDataProvider().setSignData(sign, "owner", user.getUUID().toString());
if (ess.getSignDataProvider() == null || ess.getSignDataProvider().getSignData(sign, SIGN_OWNER_KEY) == null) {
final boolean isLegacyOwner = FormatUtil.stripFormat(signProvider.getLine(nameIndex)).equalsIgnoreCase(getUsername(user));
if (ess.getSignDataProvider() != null && isLegacyOwner) {
ess.getSignDataProvider().setSignData(sign, SIGN_OWNER_KEY, user.getUUID().toString());
}
return FormatUtil.stripFormat(signProvider.getLine(nameIndex)).equalsIgnoreCase(getUsername(user));
return isLegacyOwner;
}
if (user.getUUID().toString().equals(ess.getSignDataProvider().getSignData(sign, "owner"))) {
if (user.getUUID().toString().equals(ess.getSignDataProvider().getSignData(sign, SIGN_OWNER_KEY))) {
signProvider.setLine(nameIndex, namePrefix + getUsername(user));
return true;
}
@@ -76,11 +76,11 @@ public final class UpdateChecker {
return pendingDevFuture;
}
pendingDevFuture = new CompletableFuture<>();
new Thread(() -> {
ess.runTaskAsynchronously(() -> {
pendingDevFuture.complete(cachedDev = fetchDistance(BRANCH, getVersionIdentifier()));
pendingDevFuture = null;
lastFetchTime = System.currentTimeMillis();
}).start();
});
return pendingDevFuture;
}
return CompletableFuture.completedFuture(cachedDev);
@@ -92,7 +92,7 @@ public final class UpdateChecker {
return pendingReleaseFuture;
}
pendingReleaseFuture = new CompletableFuture<>();
new Thread(() -> {
ess.runTaskAsynchronously(() -> {
catchBlock:
try {
final HttpURLConnection connection = tryRequestWithFallback(LATEST_RELEASE_URL, LATEST_RELEASE_PROXY_URL);
@@ -120,7 +120,7 @@ public final class UpdateChecker {
}
pendingReleaseFuture = null;
lastFetchTime = System.currentTimeMillis();
}).start();
});
return pendingReleaseFuture;
}
return CompletableFuture.completedFuture(cachedRelease);
+6 -6
View File
@@ -2,7 +2,7 @@
[<img alt="Dev Builds" src="https://img.shields.io/badge/-Download_dev_builds-D24939.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAdVBMVEVHcEz////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////qLaloAAAAJnRSTlMA/go0+C4DzJ2IHr/rlvBznq9cGClUqdEiQuR74RHcPbdqw15Ykw3WSecAAAENSURBVFjD7ZdJFoIwEERpEgUBRXCe577/EV2ahBi6dKUvf1//BbpoIEn+lsvI4QIKFuywQI9Q2vkrfA0DMvM0wO/C1RSUH9zGqSmYfiDITUEeBVEQBVHw04Jvd+J8Ygom8Fqf7e0Xy7bA8unKfbWtDkh+eOYO5RAQjNkDMIkde9lJ83fyC+gmy580v0Fv8ALYSOrgFgCtQ5pxkCztKUDDPZzDdXj05ZmCdahZQB34tiOJgFq8ALI6rCsWUs19+cORxRxnngGWDOB5tmuG6Iyi0FCedCFZISHGjqBCBZUzQoaxr0HhAmX/HeACe7ekGoyTdhZDgx6gcaagwCPoznZsIYP2PNJqmYlZqiTy4gka59N5SBiJlAAAAABJRU5ErkJggg==&style=flat-square&logoColor=white" height=32>](https://essentialsx.net/downloads.html)
[<img alt="Discord" src="https://img.shields.io/badge/-Chat_on_Discord-7289DA.svg?logo=discord&style=flat-square&logoColor=white" height=32>](https://discord.gg/casfFyh)
[<img alt="Discord" src="https://img.shields.io/badge/-Get_help_on_Discord-7289DA.svg?logo=discord&style=flat-square&logoColor=white" height=32>](https://discord.gg/casfFyh)
[<img alt="Patreon" src="https://img.shields.io/badge/-Support_on_Patreon-F96854.svg?logo=patreon&style=flat-square&logoColor=white" height=32>](https://www.patreon.com/essentialsx)
@@ -63,11 +63,11 @@ Releases are hosted on the Maven repo at `https://repo.essentialsx.net/releases/
To add EssentialsX to your build system, you should use the following artifacts:
| Type | Group ID | Artifact ID | Version |
|:---------------|:----------------|:------------|:----------------|
| Latest release | net.essentialsx | EssentialsX | 2.19.3 |
| Snapshots | net.essentialsx | EssentialsX | 2.19.3-SNAPSHOT |
| Older releases | net.ess3 | EssentialsX | 2.18.2 |
| Type | Group ID | Artifact ID | Version |
|:---------------|:------------------|:--------------|:------------------|
| Latest release | `net.essentialsx` | `EssentialsX` | `2.19.4` |
| Snapshots | `net.essentialsx` | `EssentialsX` | `2.19.4-SNAPSHOT` |
| Older releases | `net.ess3` | `EssentialsX` | `2.18.2` |
Note: up until `2.18.2`, EssentialsX used the `net.ess3` group ID, but starting with `2.19.0` snapshots, the group ID is now `net.essentialsx`.
When updating your plugin, make sure you use the correct group ID.
+1 -1
View File
@@ -3,7 +3,7 @@ plugins {
}
group = "net.essentialsx"
version = "2.19.3"
version = "2.19.4"
project.ext {
GIT_COMMIT = !indraGit.isPresent() ? "unknown" : indraGit.commit().abbreviate(7).name()