Skip to content

Commit

Permalink
Update database
Browse files Browse the repository at this point in the history
  • Loading branch information
LioRael committed Jan 14, 2022
1 parent c3d3a36 commit c36a329
Show file tree
Hide file tree
Showing 15 changed files with 38 additions and 53 deletions.
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

This file was deleted.

This file was deleted.

This file was deleted.

22 changes: 0 additions & 22 deletions src/main/kotlin/com/faithl/faithllevel/internal/core/Function.kt

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ open class PureLevel() : TempLevel() {
expIncrease = value
}

override fun getLevel(target: String): Int {
return levelData.getOrPut(target) { Database.INSTANCE.getLevel(target, FaithlLevelAPI.getName(this)) }
}

override fun getExp(target: String): Int {
return expData.getOrPut(target) { Database.INSTANCE.getExp(target, FaithlLevelAPI.getName(this)) }
}

companion object {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import java.util.concurrent.ConcurrentHashMap
**/
class DatabaseSQL : Database() {

val host = FaithlLevel.setting.getHost("storage.source.sql")
val host = FaithlLevel.setting.getHost("storage.source.mysql")
val dataSource = host.createDataSource()

val tableTarget = Table("${name}_target", host) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package com.faithl.faithllevel.module.compat

object AttributePlus {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package com.faithl.faithllevel.module.compat

object MythicMobs {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package com.faithl.faithllevel.module.compat

object PlaceholderAPI {
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
package com.faithl.faithllevel.internal.trait

import com.faithl.faithllevel.api.event.ChangeType
import com.faithl.faithllevel.api.event.ExpUpdateEvent
import com.faithl.faithllevel.api.event.LevelUpdateEvent
import com.faithl.faithllevel.internal.core.impl.BasicLevel
import com.faithl.faithllevel.internal.util.run
import taboolib.common.platform.event.SubscribeEvent
package com.faithl.faithllevel.module.trait

internal object Event {
//
Expand All @@ -28,4 +21,5 @@ internal object Event {
// ?.run(e.player, BasicLevel.getPlayerData(e.basicLevel, e.player).playerLevel)
// }
// }

}
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
package com.faithl.faithllevel.internal.trait

import com.faithl.faithllevel.api.FaithlLevelAPI
import com.faithl.faithllevel.api.event.ChangeType
import com.faithl.faithllevel.api.event.ExpUpdateEvent
import com.faithl.faithllevel.api.event.LevelUpdateEvent
import com.faithl.faithllevel.internal.core.impl.BasicLevel
import taboolib.common.platform.event.SubscribeEvent
package com.faithl.faithllevel.module.trait

internal object Permission {

Expand Down
9 changes: 8 additions & 1 deletion src/main/resources/lang/zh_CN.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,11 @@ command-reload: '&7[&bFaithlLevel&7] &r插件已重载完成.'

command-level-description: '等级管理 &8(faithllevel.level)'
command-exp-description: '经验管理 &8(faithllevel.exp)'
command-reload-description: '重载插件 &8(faithllevel.reload)'
command-reload-description: '重载插件 &8(faithllevel.reload)'

level-update:
add:
take:
exp-update:
add:
take:
2 changes: 1 addition & 1 deletion src/main/resources/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ storage:
player-index: uuid
prefix: faithllevel
source:
sql:
mysql:
host: localhost
port: 3306
user: root
Expand Down

0 comments on commit c36a329

Please sign in to comment.