Compare commits

..

9 Commits

Author SHA1 Message Date
Auxilor
af198d30f7 Updated to 6.27.3 2022-03-08 08:25:45 +00:00
Auxilor
637b239c66 Fixed MiniMessage on 1.18.2 2022-03-08 08:25:25 +00:00
Auxilor
9a66e78dcd Merge remote-tracking branch 'origin/master' 2022-03-07 10:29:15 +00:00
Auxilor
0fcf229bfb Fixed missing javadoc jar 2022-03-07 10:28:59 +00:00
Will FP
d2ffc43b17 Update README.md 2022-03-07 10:25:50 +00:00
Auxilor
c50f69b372 Fixed javadoc 2022-03-07 10:16:52 +00:00
Will FP
f5eafafc4c Update README.md 2022-03-06 15:50:39 +00:00
Auxilor
39372c9b1a Updated to 6.27.2 2022-03-06 13:59:51 +00:00
Auxilor
4c64f03aa1 Fixed isCustomItem 2022-03-06 13:59:42 +00:00
7 changed files with 24 additions and 14 deletions

View File

@@ -39,7 +39,7 @@ and many more.
# For developers
## Javadoc
The 6.13.0 Javadoc can be found [here](https://javadoc.jitpack.io/com/willfp/eco/6.13.0/javadoc/)
The 6.27.2 Javadoc can be found [here](https://javadoc.jitpack.io/com/willfp/eco/6.27.2/javadoc/)
## Plugin Information
@@ -68,7 +68,7 @@ dependencies {
}
```
Replace `Tag` with a release tag for eco, eg `6.13.0`.
Replace `Tag` with a release tag for eco, eg `6.27.2`.
Maven:
@@ -88,7 +88,7 @@ Maven:
</dependency>
```
Replace `Tag` with a release tag for eco, eg `6.13.0`.
Replace `Tag` with a release tag for eco, eg `6.27.2`.
## Build locally:

View File

@@ -12,6 +12,10 @@ dependencies {
group 'com.willfp'
version rootProject.version
java {
withJavadocJar()
}
build.dependsOn publishToMavenLocal
publishing {

View File

@@ -40,9 +40,9 @@ public abstract class CustomGoal<T extends Mob> implements EntityGoal<T>, Target
/**
* Tick the goal.
* <p>
* Runs ever tick as long as {@link this#canUse()} returns true.
* Runs ever tick as long as canUse returns true.
* <p>
* Runs after {@link this#start()}.
* Runs after start().
*/
public void tick() {
// Override when needed.
@@ -51,7 +51,7 @@ public abstract class CustomGoal<T extends Mob> implements EntityGoal<T>, Target
/**
* Start the goal.
* <p>
* Runs once {@link this#canUse()} returns true.
* Runs once canUse() returns true.
*/
public void start() {
// Override when needed.
@@ -60,7 +60,7 @@ public abstract class CustomGoal<T extends Mob> implements EntityGoal<T>, Target
/**
* Stop the goal.
* <p>
* Runs once {@link this#canUse()} returns false.
* Runs once canUse() returns false.
*/
public void stop() {
// Override when needed.

View File

@@ -298,7 +298,7 @@ public final class Items {
* @param itemStack The itemStack to check.
* @return If is recipe.
*/
public static boolean isCustomItem(@NotNull final ItemStack itemStack) {
public static boolean isCustomItem(@Nullable final ItemStack itemStack) {
return getCustomItem(itemStack) != null;
}
@@ -309,7 +309,11 @@ public final class Items {
* @return The custom item, or null if not exists.
*/
@Nullable
public static CustomItem getCustomItem(@NotNull final ItemStack itemStack) {
public static CustomItem getCustomItem(@Nullable final ItemStack itemStack) {
if (itemStack == null) {
return null;
}
return CACHE.get(HashedItem.of(itemStack)).map(Items::getOrWrap).orElse(null);
}

View File

@@ -16,7 +16,7 @@ public interface LookupHandler<T extends Testable<?>> {
* <p>
* You shouldn't override this method unless you're doing something
* technically interesting or weird. This is the entry point for all
* lookup parsers, {@link this#parse(String[])} is to specify implementation-specific
* lookup parsers, parse() is to specify implementation-specific
* parsing.
*
* @param key The key.
@@ -56,7 +56,7 @@ public interface LookupHandler<T extends Testable<?>> {
/**
* Get the failsafe object.
* <p>
* A failsafe object should never pass {@link this#validate(Testable)}, as this will
* A failsafe object should never pass validate(), as this will
* cause issues with segment parsers. See {@link com.willfp.eco.core.items.ItemsLookupHandler} and
* {@link com.willfp.eco.core.recipe.parts.EmptyTestableItem} for examples.
*

View File

@@ -22,8 +22,10 @@ class MiniMessageTranslator : MiniMessageTranslatorProxy {
).toLegacy()
}.getOrNull() ?: mut
if (startsWithPrefix) {
mut = Display.PREFIX + miniMessage
mut = if (startsWithPrefix) {
Display.PREFIX + miniMessage
} else {
miniMessage
}
return mut

View File

@@ -1,3 +1,3 @@
version = 6.27.1
version = 6.27.3
plugin-name = eco
kotlin.code.style = official