Skip to content

Commit

Permalink
Merge pull request #4 from Boougouh/main
Browse files Browse the repository at this point in the history
Optimize Target Reset
  • Loading branch information
BongleXD authored Aug 29, 2022
2 parents ed88280 + d268e30 commit e80092f
Show file tree
Hide file tree
Showing 21 changed files with 122 additions and 161 deletions.
52 changes: 0 additions & 52 deletions build.gradle

This file was deleted.

61 changes: 61 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar

plugins {
java
id("com.github.johnrengelman.shadow") version "7.1.0"
}

group = "me.bloodyhan"
version = "5.0.1"

repositories {
mavenCentral()
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
maven("https://oss.sonatype.org/content/groups/public/")
maven("https://repo.extendedclip.com/content/repositories/placeholderapi/")
}

dependencies {
compileOnly("org.spigotmc:spigot-api:1.8.8-R0.1-SNAPSHOT")
implementation("com.zaxxer:HikariCP:4.0.3")
compileOnly("org.projectlombok:lombok:1.18.22")
compileOnly("me.clip:placeholderapi:2.10.10")

annotationProcessor("org.projectlombok:lombok:1.18.22")
testCompileOnly("org.projectlombok:lombok:1.18.22")
testAnnotationProcessor("org.projectlombok:lombok:1.18.22")
}

tasks {

withType<JavaCompile> {
options.encoding = "UTF-8"
}

val fatJar by named("shadowJar", ShadowJar::class) {
archiveFileName.set("${project.name}-${project.version}.jar")

dependencies {
exclude(dependency("org.slf4j:.*"))
}

relocate("com.zaxxer", "me.bloodyhan.libs.com.zaxxer")
minimize()
}

artifacts {
add("archives", fatJar)
}

processResources {
inputs.property("version", project.version)
filesMatching("plugin.yml") {
expand("version" to project.version)
}
}

build {
dependsOn(shadowJar)
}

}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
1 change: 0 additions & 1 deletion settings.gradle

This file was deleted.

1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rootProject.name = "BridgeLeveling"
1 change: 0 additions & 1 deletion src/main/java/me/bloodyhan/bridgeleveling/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.scheduler.BukkitTask;

/**
* @author Bloody_Han
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/me/bloodyhan/bridgeleveling/api/PlayerData.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,17 @@
import me.bloodyhan.bridgeleveling.database.SqlValue;
import me.bloodyhan.bridgeleveling.database.Value;
import me.bloodyhan.bridgeleveling.database.ValueType;
import me.bloodyhan.bridgeleveling.task.BridgeTask;
import me.bloodyhan.bridgeleveling.util.Method;
import me.clip.placeholderapi.PlaceholderAPI;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Sound;
import org.bukkit.entity.Player;

import java.util.*;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.UUID;

/**
* @author Bloody_Han
Expand All @@ -40,9 +42,7 @@ public class PlayerData {
private int levelUpCost;
private int killStreak = 0;
private int blockPlace = 0;
private Player lastDamager = null;
private Rank rank = null;
private BridgeTask task;
private static HashMap<UUID, PlayerData> dataMap = Maps.newHashMap();

public PlayerData(@NonNull UUID uuid){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ public PlayerKillEvent(Player player, Player killer) {

@Override
public HandlerList getHandlers() {
return handlers;
}
return handlers;
}

public static HandlerList getHandlerList() {
return handlers;
Expand Down
1 change: 0 additions & 1 deletion src/main/java/me/bloodyhan/bridgeleveling/api/Rank.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package me.bloodyhan.bridgeleveling.api;

import lombok.AccessLevel;
import lombok.Getter;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import me.bloodyhan.bridgeleveling.Main;
import me.bloodyhan.bridgeleveling.api.PlayerData;
import me.bloodyhan.bridgeleveling.config.MainConfig;
import me.bloodyhan.bridgeleveling.config.MessageConfig;
import me.bloodyhan.bridgeleveling.util.Method;
import me.clip.placeholderapi.PlaceholderAPI;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,15 @@
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.math.BigDecimal;
import java.util.*;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;

/**
* @author Bongle (Boougouh)
* @createDate 2020/04/05
* @version 2.1
* @createDate 2020/04/05
*/

public class CommandManager extends BukkitCommand {
Expand Down Expand Up @@ -284,4 +287,4 @@ public enum CommandOnly{

}

}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package me.bloodyhan.bridgeleveling.config;

import me.bloodyhan.bridgeleveling.Main;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.configuration.file.YamlConfiguration;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package me.bloodyhan.bridgeleveling.config;

import org.bukkit.Bukkit;
import org.bukkit.Sound;

/**
* @author Bloody_Han
*/
Expand Down
4 changes: 0 additions & 4 deletions src/main/java/me/bloodyhan/bridgeleveling/database/MySQL.java
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
package me.bloodyhan.bridgeleveling.database;

import com.google.common.base.Joiner;
import com.zaxxer.hikari.HikariConfig;
import com.zaxxer.hikari.HikariDataSource;
import me.bloodyhan.bridgeleveling.Main;
import me.bloodyhan.bridgeleveling.config.MainConfig;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.util.Arrays;
import java.util.stream.Collectors;

/**
* @author Bloody_Han
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,10 @@

import com.google.common.base.Joiner;
import com.google.common.collect.Lists;
import com.zaxxer.hikari.HikariConfig;
import com.zaxxer.hikari.HikariDataSource;
import me.bloodyhan.bridgeleveling.Main;
import org.bukkit.Bukkit;

import java.io.File;
import java.io.IOException;
import java.sql.*;
import java.util.Arrays;
import java.util.List;
Expand Down
Loading

0 comments on commit e80092f

Please sign in to comment.