mirror of
https://github.com/arcadiadevs/hubcore.git
synced 2025-02-19 18:31:26 +01:00
Fixed inventory bugs
This commit is contained in:
parent
84d3cad940
commit
76a73ceae6
@ -7,6 +7,7 @@
|
||||
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/slf4j/slf4j-api/1.7.5/slf4j-api-1.7.5.jar" path-in-jar="/" />
|
||||
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/slf4j/slf4j-simple/1.6.4/slf4j-simple-1.6.4.jar" path-in-jar="/" />
|
||||
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/com/github/cryptomorin/XSeries/5.3.1/XSeries-5.3.1.jar" path-in-jar="/" />
|
||||
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/projectlombok/lombok/1.18.12/lombok-1.18.12.jar" path-in-jar="/" />
|
||||
</root>
|
||||
</artifact>
|
||||
</component>
|
@ -2,6 +2,7 @@
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<annotationProcessing>
|
||||
<profile default="true" name="Default" enabled="true" />
|
||||
<profile name="Maven default annotation processors profile" enabled="true">
|
||||
<sourceOutputDir name="target/generated-sources/annotations" />
|
||||
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||
|
6
.idea/discord.xml
Normal file
6
.idea/discord.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="DiscordProjectSettings">
|
||||
<option name="show" value="PROJECT_FILES" />
|
||||
</component>
|
||||
</project>
|
13
.idea/libraries/Maven__org_projectlombok_lombok_1_18_12.xml
Normal file
13
.idea/libraries/Maven__org_projectlombok_lombok_1_18_12.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Maven: org.projectlombok:lombok:1.18.12">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/projectlombok/lombok/1.18.12/lombok-1.18.12.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/projectlombok/lombok/1.18.12/lombok-1.18.12-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/projectlombok/lombok/1.18.12/lombok-1.18.12-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
@ -18,5 +18,6 @@
|
||||
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:slf4j-simple:1.6.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.cryptomorin:XSeries:5.3.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.projectlombok:lombok:1.18.12" level="project" />
|
||||
</component>
|
||||
</module>
|
Binary file not shown.
@ -1,5 +0,0 @@
|
||||
mysql:
|
||||
hostname: 127.0.0.1
|
||||
username: web
|
||||
password: webmaster
|
||||
database: playerservers
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,6 +0,0 @@
|
||||
name: PSHubCore
|
||||
main: os.arcadiadevs.playerservers.hubcore.PSHubCore
|
||||
version: 1.0.0
|
||||
author: OpenSource
|
||||
|
||||
softdepend: [PlaceholderAPI]
|
5
pom.xml
5
pom.xml
@ -45,6 +45,11 @@
|
||||
<artifactId>XSeries</artifactId>
|
||||
<version>5.3.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.18.12</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<groupId>PlayerServersHubCore</groupId>
|
||||
|
@ -1,5 +1,6 @@
|
||||
package os.arcadiadevs.playerservers.hubcore;
|
||||
|
||||
import lombok.SneakyThrows;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
@ -16,6 +17,7 @@ public class PSHubCore extends JavaPlugin {
|
||||
|
||||
public static Plugin PSH;
|
||||
|
||||
@SneakyThrows
|
||||
@Override
|
||||
public void onEnable() {
|
||||
PSH = this;
|
||||
@ -33,7 +35,7 @@ public class PSHubCore extends JavaPlugin {
|
||||
new PlayerCount(this).register();
|
||||
}
|
||||
|
||||
this.getServer().getMessenger().registerOutgoingPluginChannel(this, "BungeeCord");
|
||||
getServer().getMessenger().registerOutgoingPluginChannel(this, "BungeeCord");
|
||||
Bukkit.getPluginManager().registerEvents(new ClickEvent(), this);
|
||||
Bukkit.getPluginManager().registerEvents(new JoinEvent(), this);
|
||||
Bukkit.getPluginManager().registerEvents(new HubEvents(), this);
|
||||
|
@ -13,7 +13,7 @@ public class DataSource
|
||||
public static HikariDataSource hikari;
|
||||
|
||||
@SuppressWarnings("ConstantConditions")
|
||||
public void registerDataSource() {
|
||||
public void registerDataSource() throws SQLException {
|
||||
|
||||
Plugin pl = Bukkit.getPluginManager().getPlugin("PSHubCore");
|
||||
|
||||
@ -21,15 +21,20 @@ public class DataSource
|
||||
String name = pl.getConfig().getString("mysql.database");
|
||||
String username = pl.getConfig().getString("mysql.username");
|
||||
String password = pl.getConfig().getString("mysql.password");
|
||||
Boolean useSSL = pl.getConfig().getBoolean("mysql.useSSL");
|
||||
|
||||
hikari = new HikariDataSource();
|
||||
hikari.setPoolName("PSHubCore");
|
||||
hikari.setMaximumPoolSize(10);
|
||||
hikari.setLoginTimeout(10);
|
||||
hikari.setConnectionTimeout(10000);
|
||||
hikari.setDataSourceClassName("com.mysql.jdbc.jdbc2.optional.MysqlDataSource");
|
||||
hikari.addDataSourceProperty("serverName", address);
|
||||
hikari.addDataSourceProperty("port", "3306");
|
||||
hikari.addDataSourceProperty("databaseName", name);
|
||||
hikari.addDataSourceProperty("user", username);
|
||||
hikari.addDataSourceProperty("password", password);
|
||||
hikari.addDataSourceProperty("useSSL", useSSL);
|
||||
}
|
||||
|
||||
public static Connection getConnection() throws SQLException {
|
||||
|
@ -47,7 +47,7 @@ public class ClickEvent implements Listener {
|
||||
e.setCancelled(true);
|
||||
|
||||
else if (e.getView().getTitle().equalsIgnoreCase(translate("&aServer Selector"))) {
|
||||
if (e.getCurrentItem().getItemMeta() != null && e.getCurrentItem().getItemMeta().getLore() != null) {
|
||||
if (e.getCurrentItem() != null && e.getCurrentItem().getItemMeta() != null && e.getCurrentItem().getItemMeta().getLore() != null) {
|
||||
if (e.getCurrentItem().getType() == XMaterial.EMERALD_BLOCK.parseMaterial()) {
|
||||
String UUID = e.getCurrentItem().getItemMeta().getLore().get(1).split(" ")[1].replaceAll("§7", "");
|
||||
ByteArrayDataOutput out = ByteStreams.newDataOutput();
|
||||
|
@ -13,8 +13,6 @@ public class HubEvents implements Listener {
|
||||
@EventHandler
|
||||
public void weatherChange(WeatherChangeEvent e) {
|
||||
if (PSH.getConfig().getBoolean("disable-weather")) {
|
||||
e.getWorld().setThundering(false);
|
||||
e.getWorld().setStorm(false);
|
||||
e.setCancelled(true);
|
||||
}
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ mysql:
|
||||
username: web
|
||||
password: webmaster
|
||||
database: playerservers
|
||||
useSSL: true
|
||||
|
||||
enable-compass: true
|
||||
compass-name: "&aQuick Compass"
|
||||
|
@ -1,6 +1,6 @@
|
||||
name: PSHubCore
|
||||
main: os.arcadiadevs.playerservers.hubcore.PSHubCore
|
||||
version: 1.3.0
|
||||
version: 1.4.3
|
||||
author: OpenSource
|
||||
|
||||
softdepend: [PlaceholderAPI]
|
||||
|
@ -3,6 +3,7 @@ mysql:
|
||||
username: web
|
||||
password: webmaster
|
||||
database: playerservers
|
||||
useSSL: true
|
||||
|
||||
enable-compass: true
|
||||
compass-name: "&aQuick Compass"
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,6 +1,6 @@
|
||||
name: PSHubCore
|
||||
main: os.arcadiadevs.playerservers.hubcore.PSHubCore
|
||||
version: 1.3.0
|
||||
version: 1.4.3
|
||||
author: OpenSource
|
||||
|
||||
softdepend: [PlaceholderAPI]
|
||||
|
Loading…
Reference in New Issue
Block a user