Skip to content

Commit

Permalink
Stop relocating of slf4j to prevent annoying error print
Browse files Browse the repository at this point in the history
  • Loading branch information
Ste3et committed Jun 19, 2023
1 parent d9e7bff commit a9b7953
Show file tree
Hide file tree
Showing 16 changed files with 17 additions and 14 deletions.
Binary file modified .gradle/7.2/executionHistory/executionHistory.bin
Binary file not shown.
Binary file modified .gradle/7.2/executionHistory/executionHistory.lock
Binary file not shown.
Binary file modified .gradle/7.2/fileHashes/fileHashes.bin
Binary file not shown.
Binary file modified .gradle/7.2/fileHashes/fileHashes.lock
Binary file not shown.
Binary file modified .gradle/7.2/fileHashes/resourceHashesCache.bin
Binary file not shown.
Binary file modified .gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
Binary file modified .gradle/checksums/checksums.lock
Binary file not shown.
Binary file modified .gradle/checksums/md5-checksums.bin
Binary file not shown.
Binary file modified .gradle/checksums/sha1-checksums.bin
Binary file not shown.
7 changes: 3 additions & 4 deletions FurnitureLib-Core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ apply plugin: 'com.github.johnrengelman.shadow'

dependencies {
compileOnly 'org.spigotmc:spigot-api:1.20-R0.1-SNAPSHOT'

implementation "com.zaxxer:HikariCP:4.0.3"
implementation "org.slf4j:slf4j-simple:1.7.36"
implementation "org.slf4j:slf4j-simple:1.7.5"
implementation "net.kyori:adventure-text-minimessage:4.13.0"
implementation "net.kyori:adventure-platform-bukkit:4.3.0"
implementation "net.kyori:adventure-text-serializer-legacy:4.13.0"
Expand All @@ -42,8 +42,7 @@ shadowJar {
mergeServiceFiles()
archiveBaseName.set('FurnitureLib-Core')
archiveClassifier.set('')

relocate 'org.slf4j', 'de.Ste3et_C0st.FurnitureLib.Database.org.slf4j'

relocate 'com.zaxxer.hikari', 'de.Ste3et_C0st.FurnitureLib.Database.com.zaxxer.hikari'
relocate 'net.kyori', 'de.Ste3et_C0st.FurnitureLib.Paper.net.kyori'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import de.Ste3et_C0st.FurnitureLib.main.Type.SQLAction;
import org.bukkit.Bukkit;
import org.bukkit.World;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
Expand All @@ -24,21 +25,24 @@
import java.util.UUID;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.logging.Logger;

public abstract class Database {
public FurnitureLib plugin;
private final HikariConfig config;
private final HikariDataSource dataSource;
private final Converter converter;
public static final String TABLE_NAME = "furnitureLibData";
private Logger logger;

//Prepare debugPool to store the connection Objects
private static HashSet<Connection> connectionDebugPool = new HashSet<Connection>();

public Database(FurnitureLib instance, HikariConfig config) {
this.plugin = instance;
this.logger = instance.getLogger();
this.config = config;
this.dataSource = new HikariDataSource(config); //load 1
this.dataSource = new HikariDataSource(config);
this.converter = new Converter(this);
}

Expand Down Expand Up @@ -238,4 +242,8 @@ public void createTable(final String query) {
e.printStackTrace();
}
}

public Logger getLogger() {
return logger;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public void saveConvertedFile(String fileName, HashMap<String, String> language)
configuration.set(key, exportList);
}else {
configuration.set(key, serializeLegacyColors(value));
System.out.println(key + ":" + serializeLegacyColors(value));
//System.out.println(key + ":" + serializeLegacyColors(value));
}
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public static ItemStack patchStack(ItemStack stack) {
profileField.setAccessible(true);
final Object savedObject = profileField.get(craftBukkitMeta);
final WrappedGameProfile profile = WrappedGameProfile.fromHandle(savedObject);
System.out.println(profile.toString());
//System.out.println(profile.toString());
}catch (Exception e) {
e.printStackTrace();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ public NBTTagCompound getMetaData() {
//this.writeRotation(getLeftRotationObj(), transformation, "leftRotation");
this.writeRotation(getRightRotationObj(), transformation, "rightRotation");

System.out.println(transformation.toString());
//System.out.println(transformation.toString());

if(!transformation.isEmpty()) set("transformation", transformation);

Expand Down Expand Up @@ -328,19 +328,15 @@ public void loadMetadata(NBTTagCompound metadata) {
if(transformation.hasKeyOfType("leftRotation", 10)) {
final NBTTagCompound leftRotation = transformation.getCompound("leftRotation");
final AxisAngle4f axisAngle4f = new AxisAngle4f(leftRotation.getFloat("angle"), leftRotation.getFloat("x"), leftRotation.getFloat("y"), leftRotation.getFloat("z"));
System.out.println(axisAngle4f.toString());
//System.out.println(axisAngle4f.toString());
this.leftRotation.setValue(axisAngle4f);
}else {
System.out.println("transformation.hasKeyOfType(leftRotation, 10) == false");
}

if(transformation.hasKeyOfType("rightRotation", 10)) {
final NBTTagCompound rightRotation = transformation.getCompound("rightRotation");
final AxisAngle4f axisAngle4f = new AxisAngle4f(rightRotation.getFloat("angle"), rightRotation.getFloat("x"), rightRotation.getFloat("y"), rightRotation.getFloat("z"));
System.out.println(axisAngle4f.toString());
//System.out.println(axisAngle4f.toString());
this.rightRotation.setValue(axisAngle4f);
}else {
System.out.println("transformation.hasKeyOfType(rightRotation, 10) == false");
}

this.writeTransformation();
Expand Down
Binary file modified buildSrc/.gradle/7.2/executionHistory/executionHistory.lock
Binary file not shown.
Binary file modified buildSrc/.gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.

0 comments on commit a9b7953

Please sign in to comment.