浏览代码

Merge branch 'master' into master

MasterCake 5 月之前
父节点
当前提交
7a1a8e79ca

+ 4 - 4
Plugin/pom.xml

@@ -7,7 +7,7 @@
 	<parent>
 		<groupId>de.Linus122.TimeIsMoney</groupId>
 		<artifactId>parent</artifactId>
-		<version>1.9.10</version>
+		<version>1.9.11</version>
 		<relativePath>../pom.xml</relativePath>
 	</parent>
 
@@ -76,7 +76,7 @@
 		<dependency>
 			<groupId>org.spigotmc</groupId>
 			<artifactId>spigot-api</artifactId>
-			<version>1.18-R0.1-SNAPSHOT</version>
+			<version>1.13.2-R0.1-SNAPSHOT</version>
 			<scope>provided</scope>
 		</dependency>
 		<dependency>
@@ -104,7 +104,7 @@
 		<dependency>
 			<groupId>xyz.spaceio</groupId>
 			<artifactId>SpaceGUI</artifactId>
-			<version>0.0.4-SNAPSHOT</version>
+			<version>0.0.8-SNAPSHOT</version>
 			<scope>compile</scope>
 		</dependency>
 		<!--SpaceIO Metrics -->
@@ -116,7 +116,7 @@
 		<dependency>
 			<groupId>de.Linus122.TimeIsMoney</groupId>
 			<artifactId>Tools</artifactId>
-			<version>1.9.10</version>
+			<version>1.9.11</version>
 		</dependency>
         <dependency>
             <groupId>org.jetbrains</groupId>

+ 2 - 2
Plugin/src/main/java/de/Linus122/TimeIsMoney/ATM.java

@@ -91,8 +91,8 @@ public class ATM implements Listener, CommandExecutor {
 		plugin.getServer().getPluginManager().registerEvents(this, plugin);
 		
 		worths = Doubles.toArray(Main.finalconfig.getDoubleList("atm_worth_gradation"));
-		
-		gui = new SpaceGUI().title("§cATM").size(9*3).fillBackground(new SpaceItem().setStack(DecorationMaterial.GRAY_STAINED_GLASS_PANE.get()));
+		gui = new SpaceGUI().title("§cATM").size(9*3);
+		gui.fillBackground(new SpaceItem().setStack(DecorationMaterial.GRAY_STAINED_GLASS_PANE.get()));
 		
 		FileConfiguration fileConfig = new YamlConfiguration();
 	

+ 5 - 4
Plugin/src/main/java/de/Linus122/TimeIsMoney/Main.java

@@ -553,13 +553,14 @@ public class Main extends JavaPlugin {
 	}
 	
 	private void sendSingleActionbarMessage(final Player player, final String message) {
-		String packageName = this.getServer().getClass().getPackage().getName();
-        int version = Integer.parseInt(packageName.substring(packageName.lastIndexOf('.') + 1).split("_")[1]);
-        if(version == 8 || version == 9) {
+		String[] minorMajorVersion = Bukkit.getBukkitVersion().split("-")[0].split("\\.");
+
+        int majorVersion = Integer.parseInt(minorMajorVersion[1]);
+        if(majorVersion == 8 || majorVersion == 9) {
         	// 1_8 -> 1_9
         	sendActionbarReflect(player, message);
         	return;
-        } else if (version < 8) {
+        } else if (majorVersion < 8) {
         	// no action bar support
         	return;
         }

+ 2 - 2
Plugin/src/main/java/de/Linus122/TimeIsMoney/data/MySQLPluginData.java

@@ -78,7 +78,7 @@ public class MySQLPluginData extends PluginData{
         playerData.getPayoutDataMap().forEach((payoutID, payoutData) -> {
             try {
                 PreparedStatement preparedStatement = connection
-                        .prepareStatement("REPLACE INTO playerData (uuid, payout_id receivedToday, secondsSinceLastPayout, lastPayoutDate) VALUES (?, ?, ?, ? ,?)");
+                        .prepareStatement("REPLACE INTO payoutData (uuid, payout_id receivedToday, secondsSinceLastPayout, lastPayoutDate) VALUES (?, ?, ?, ? ,?)");
                 preparedStatement.setString(1, uuid.toString());
                 preparedStatement.setInt(1, payoutID);
                 preparedStatement.setDouble(2, payoutData.getReceivedToday());
@@ -114,7 +114,7 @@ public class MySQLPluginData extends PluginData{
         try{
             PlayerData playerData = new PlayerData();
             // get data from DB
-            ResultSet result = connection.prepareStatement("SELECT * FROM playerData WHERE uuid='" + player.getUniqueId() + "'").executeQuery();
+            ResultSet result = connection.prepareStatement("SELECT * FROM payoutData WHERE uuid='" + player.getUniqueId() + "'").executeQuery();
             while(result.next()) {
                 UUID uuid = UUID.fromString(result.getString("uuid"));
                 int payoutID = result.getInt("payout_id");

+ 4 - 0
Plugin/src/main/resources/plugin.yml

@@ -4,8 +4,12 @@ description: Gives money for online time
 author: Linus122
 website: "https://www.spigotmc.org/resources/time-is-money.12409/"
 main: de.Linus122.TimeIsMoney.Main
+<<<<<<< master
 api-version: 1.13
 folia-supported: true
+=======
+api-version: 1.13.2
+>>>>>>> master
 
 depend: [Vault]
 softdepend: [Essentials, PlaceholderAPI]

+ 1 - 1
README.md

@@ -7,7 +7,7 @@
 [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5ATDE93C6J3WE&source=url)
 
 ## Welcome to the TimeIsMoney GitHub repository!
-TimeIsMoney is a Spigot plugin compatible with Spigot versions 1.7 through 1.18.*, that gives players money for their time online!
+TimeIsMoney is a Spigot plugin compatible with Spigot versions 1.7 through 1.20.6, that gives players money for their time online!
 
 In order for everyone to have the best experience possible, we have a few guidelines that everyone must follow.    
 - For all things on GitHub, please make sure you follow the [code of conduct](CODE_OF_CONDUCT.md).  

+ 1 - 1
Tools/pom.xml

@@ -7,7 +7,7 @@
     <parent>
         <groupId>de.Linus122.TimeIsMoney</groupId>
         <artifactId>parent</artifactId>
-        <version>1.9.10</version>
+        <version>1.9.11</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 

+ 1 - 1
pom.xml

@@ -6,7 +6,7 @@
 
     <groupId>de.Linus122.TimeIsMoney</groupId>
     <artifactId>parent</artifactId>
-    <version>1.9.10</version>
+    <version>1.9.11</version>
     <name>TimeIsMoney</name>
     <url>https://www.spigotmc.org/resources/time-is-money.12409/</url>
     <packaging>pom</packaging>