Skip to content

Commit 2af90c6

Browse files
committed
Changes synced with 1.14.4 branch.
Signed-off-by: Pavel Erokhin (MairwunNx) <[email protected]>
1 parent 7399048 commit 2af90c6

File tree

15 files changed

+91
-59
lines changed

15 files changed

+91
-59
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,3 +150,4 @@ fabric.properties
150150
# Sonarlint plugin
151151
.idea/sonarlint
152152
!/gradle/wrapper/gradle-wrapper.jar
153+
!/libs/*

build.gradle

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,11 @@ minecraft {
7272
repositories {
7373
jcenter()
7474
mavenCentral()
75-
maven { url("https://minecraft.curseforge.com/api/maven/") }
7675
maven { url("https://libraries.minecraft.net") }
77-
maven { url("https://jitpack.io") }
7876
}
7977

8078
dependencies {
79+
implementation fileTree(dir: 'libs', include: ['*.jar'])
8180
minecraft(group: "net.minecraftforge", name: "forge", version: forge_version)
8281
compile(group: "com.mojang", name: "brigadier", version: brigadier_version)
8382
compile(
@@ -90,16 +89,6 @@ dependencies {
9089
name: "kotlin-stdlib-$kotlin_jdk_version_target",
9190
version: kotlin_version
9291
)
93-
compile(
94-
group: "com.github.projectessentials",
95-
name: "ProjectEssentials-Core",
96-
version: ess_core_version
97-
)
98-
compile(
99-
group: "com.github.projectessentials",
100-
name: "ProjectEssentials-Permissions",
101-
version: ess_permissions_version
102-
)
10392
}
10493

10594
dokka {
@@ -130,9 +119,3 @@ sourceCompatibility = targetCompatibility =
130119
compileKotlin.kotlinOptions.jvmTarget =
131120
compileTestKotlin.kotlinOptions.jvmTarget = project_jvm_version_target
132121

133-
//noinspection GroovyAssignabilityCheck
134-
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
135-
kotlinOptions {
136-
freeCompilerArgs += "-Xuse-experimental=kotlin.Experimental"
137-
}
138-
}

changelog.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,33 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
## [1.15.2-1.0.1] - 2020-03-13
10+
11+
### Added
12+
- `sendMessage` in `Messaging.kt` implemented.
13+
- Localization processing.
14+
- Libraries added as dependency in `build.gradle`.
15+
- Libraries added for `1.14.4` branch.
16+
17+
### Changed
18+
- `CooldownCommand.kt` cleanup. Now usings new messaging API.
19+
- `UseExperimental` annotation replaced with `OptIn` in `CooldownConfig` `CooldownAPI.getCooldownTimeLeft`.
20+
- `sendMsg` replaced with `sendMessage`.
21+
- Forge updated to `28.2.0` version.
22+
- Kotlin updated to `1.3.70` version.
23+
- dokka updated to `0.10.1`.
24+
- kotlinx serialization updated to `0.20.0`.
25+
26+
### Fixed
27+
- Incorrect permissions checking.
28+
29+
### Removed
30+
- `UseExperimental` annotation from `CooldownConfig` class.
31+
- curseforge removed from dependency repositories.
32+
- `jitpack.io` maven repo removed from repositories in `build.gradle`.
33+
- `kotlin.Experimental` compiler arg removed from buildscript.
34+
- `Project Essentials` dependencies removed from buildscript.
35+
936
## [1.15.2-1.0.0] - 2020-02-07
1037

1138
### Added

gradle.properties

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,10 @@ forge_mappings_channel_version=20190719-1.14.3
1111
brigadier_version=1.0.17
1212
kotlin_jdk_version_target=jdk8
1313
project_jvm_version_target=1.8
14-
kotlin_version=1.3.61
15-
kotlinx_serialization_version=0.14.0
16-
dokka_version=0.10.0
17-
ess_core_version=v1.15.2-1.0.0
18-
ess_permissions_version=v1.15.2-1.0.0
19-
module_version=1.15.2-1.0.0
14+
kotlin_version=1.3.70
15+
kotlinx_serialization_version=0.20.0
16+
dokka_version=0.10.1
17+
module_version=1.15.2-1.0.1
2018
module_name=Project Essentials Cooldown
2119
module_id=project_essentials_cooldown
2220
module_vendor=MairwunNx (Pavel Erokhin)
68.3 KB
Binary file not shown.
898 KB
Binary file not shown.

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ You can also use the API, for example, as a delay in the use of an item or the l
1010

1111
### One more step
1212

13-
#### [Download mod](https://github.com/ProjectEssentials/ProjectEssentials-Cooldown/releases/download/v1.15.2-1.0.0/Project.Essentials.Cooldown-1.15.2-1.0.0.jar) · [How to install](https://mairwunnx.gitbook.io/project-essentials/project-essentials-cooldown#how-to-install) · [Commands](https://mairwunnx.gitbook.io/project-essentials/project-essentials-cooldown#commands) · [Configuration](https://mairwunnx.gitbook.io/project-essentials/project-essentials-cooldown#configuration) · [API Usage](https://mairwunnx.gitbook.io/project-essentials/project-essentials-cooldown#applying-aliases) · [Troubleshooting](https://github.com/ProjectEssentials/ProjectEssentials-Cooldown/issues/new/choose) · [Change log](./changelog.md)
13+
#### [Download mod](https://github.com/ProjectEssentials/ProjectEssentials-Cooldown/releases/download/v1.15.2-1.0.1/Project.Essentials.Cooldown-1.15.2-1.0.1.jar) · [How to install](https://mairwunnx.gitbook.io/project-essentials/project-essentials-cooldown#how-to-install) · [Commands](https://mairwunnx.gitbook.io/project-essentials/project-essentials-cooldown#commands) · [Configuration](https://mairwunnx.gitbook.io/project-essentials/project-essentials-cooldown#configuration) · [API Usage](https://mairwunnx.gitbook.io/project-essentials/project-essentials-cooldown#applying-aliases) · [Troubleshooting](https://github.com/ProjectEssentials/ProjectEssentials-Cooldown/issues/new/choose) · [Change log](./changelog.md)
1414

1515
<a href="https://ko-fi.com/mairwunnx" target="_blank"><img src="./assets/support_social.png"></a>
1616

src/main/kotlin/com/mairwunnx/projectessentials/cooldown/CooldownAPI.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ object CooldownAPI {
2121
* @since 1.14.4-1.0.0.0
2222
*/
2323
const val DEFAULT_COOLDOWN = 5
24+
2425
/**
2526
* Default cooldown literals.
2627
* It literals what replaced cooldowns for
@@ -88,7 +89,7 @@ object CooldownAPI {
8889
* @return left cooldown time in seconds for command.
8990
* @since 1.14.4-1.0.0.0
9091
*/
91-
@UseExperimental(ExperimentalTime::class)
92+
@OptIn(ExperimentalTime::class)
9293
fun getCooldownTimeLeft(nickname: String, command: String): Double {
9394
if (cooldownTable.get(nickname, command) != null) {
9495
val commandExecutionTime = cooldownTable.get(nickname, command)

src/main/kotlin/com/mairwunnx/projectessentials/cooldown/CooldownConfig.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,10 @@ package com.mairwunnx.projectessentials.cooldown
33
import com.mairwunnx.projectessentials.cooldown.models.CooldownModel
44
import com.mairwunnx.projectessentials.core.helpers.MOD_CONFIG_FOLDER
55
import com.mairwunnx.projectessentials.core.helpers.jsonInstance
6-
import kotlinx.serialization.UnstableDefault
76
import org.apache.logging.log4j.LogManager
87
import java.io.File
98
import java.io.FileNotFoundException
109

11-
@UseExperimental(UnstableDefault::class)
1210
internal object CooldownConfig {
1311
private val logger = LogManager.getLogger()
1412
internal var config = CooldownModel()

src/main/kotlin/com/mairwunnx/projectessentials/cooldown/CooldownUtils.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package com.mairwunnx.projectessentials.cooldown
22

33
import com.mairwunnx.projectessentials.cooldown.essentials.CommandsAliases
44
import com.mairwunnx.projectessentials.core.extensions.empty
5-
import com.mairwunnx.projectessentials.core.extensions.sendMsg
65
import com.mairwunnx.projectessentials.core.extensions.source
76
import com.mairwunnx.projectessentials.core.helpers.COOLDOWN_NOT_EXPIRED
87
import net.minecraftforge.event.CommandEvent
@@ -65,8 +64,7 @@ internal object CooldownUtils {
6564
.replace("%0", commandSenderNickName)
6665
.replace("%1", command)
6766
)
68-
sendMsg(
69-
"cooldown",
67+
sendMessage(
7068
commandEvent.source,
7169
"not_expired",
7270
commandCooldown.minus(

0 commit comments

Comments
 (0)