Ver Fonte

updated to minecraft 1.10

linus há 8 anos atrás
pai
commit
841a445fa2

+ 1 - 0
TimeIsMoney2/.classpath

@@ -14,5 +14,6 @@
 	<classpathentry kind="lib" path="/home/linus/api/spigot_server1.9.jar"/>
 	<classpathentry kind="lib" path="/home/linus/api/Vault 1.8.1.jar"/>
 	<classpathentry kind="lib" path="/home/linus/api/spigot-1.9.2.jar"/>
+	<classpathentry kind="lib" path="/home/linus/api/spigot-1.10.jar"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>

+ 38 - 0
TimeIsMoney2/src/config.yml~

@@ -0,0 +1,38 @@
+give_money_every_second: 600
+afk_payout: false
+#You can add more payouts by copy and paste them. Don't forget to change the numbers!
+store-money-in-bank: false
+#Set choose-payout-by-chance to true in order to choose the payouts by chances. Replace the "permission" to "chance", e.g. chance: 20. 
+choose-payout-by-chance: false
+payouts:
+  1:
+    payout_amount: 50
+    max_payout_per_day: 1000
+    #chance: 10
+    permission:
+  2:
+    payout_amount: 100
+    max_payout_per_day: 10000
+    commands:
+      - /give %player% diamond 1
+    #chance: 90
+    permission: tim.vip
+message: "&aYou earned &c%money% &afor 10 minutes online time!"
+message_payoutlimit_reached: "&cYou have reached the payout limit today. You earned 0$"
+message_afk: "&cYou havn't earned money because you were afk!"
+message_actionbar: "&aYou earned &c%money% &afor 10 minutes online time!"
+message_payoutlimit_reached_actionbar: "&cYou have reached the payout limit today. You got 0$"
+message_afk_actionbar: "&cYou havn't earned money because you were afk!"
+display-messages-in-chat: true
+display-messages-in-actionbar: true
+display-messages-in-actionbar-time: 10
+#ATM -> Place down a sign with [atm] on the first line to use it!
+message_atm_noperms: "&cYou don't have the permission to use ATM's!"
+message_atm_nomoneyinbank: "&cYou don't have enough money in bank!"
+message_atm_nomoney: "&cYou don't have enough money!"
+atm_title: "&cATM"
+atm_withdraw: "&cWithdraw"
+atm_deposit: "&cDeposit"
+atm_balance: "&cBank balance:"
+auto-update: true
+configuration-version: 12

+ 1 - 1
TimeIsMoney2/src/de/Linus122/TimeIsMoney/Main.java

@@ -45,7 +45,7 @@ public class Main extends JavaPlugin{
 	ConsoleCommandSender clogger = this.getServer().getConsoleSender();
 	
 	public static int cfg_version = 12;
-	public static int pl_version = 1925;
+	public static int pl_version = 1926;
 	//1925 19.05.16
 	int currentDay = 0;
 	

+ 17 - 0
TimeIsMoney2/src/v1_10_R1/NBTUtils.java

@@ -0,0 +1,17 @@
+package v1_10_R1;
+
+import org.bukkit.craftbukkit.v1_9_R1.entity.CraftPlayer;
+import org.bukkit.entity.Player;
+
+import de.Linus122.TimeIsMoney.Utils;
+import net.minecraft.server.v1_9_R1.IChatBaseComponent;
+import net.minecraft.server.v1_9_R1.PacketPlayOutChat;
+
+public class NBTUtils implements Utils{
+  public void sendActionBarMessage(Player p, String message)
+  {
+	    IChatBaseComponent icbc = IChatBaseComponent.ChatSerializer.a("{\"text\": \"" + message.replace('&', '§') + "\"}");
+	    PacketPlayOutChat bar = new PacketPlayOutChat(icbc, (byte)2);
+	    ((CraftPlayer)p).getHandle().playerConnection.sendPacket(bar);
+  }
+}

+ 3 - 3
TimeIsMoney2/src/v1_9_R1/NBTUtils.java

@@ -1,11 +1,11 @@
 package v1_9_R1;
 
-import org.bukkit.craftbukkit.v1_9_R1.entity.CraftPlayer;
+import org.bukkit.craftbukkit.v1_10_R1.entity.CraftPlayer;
 import org.bukkit.entity.Player;
 
 import de.Linus122.TimeIsMoney.Utils;
-import net.minecraft.server.v1_9_R1.IChatBaseComponent;
-import net.minecraft.server.v1_9_R1.PacketPlayOutChat;
+import net.minecraft.server.v1_10_R1.IChatBaseComponent;
+import net.minecraft.server.v1_10_R1.PacketPlayOutChat;
 
 public class NBTUtils implements Utils{
   public void sendActionBarMessage(Player p, String message)