Commits

Jenkins Builder  committed 0f128b2

Updated files for v3.2

  • Participants
  • Parent commits a53fa0c

Comments (0)

Files changed (12)

File godPowers/bin/3.1changelog

-- Added /poseidon

File godPowers/bin/3.2changelog

+- Added /hermes
+- Fixed a bug where you got strength 3 while in water in godmode

File godPowers/bin/com/FriedTaco/taco/godPowers/godPowers$1.class

Binary file modified.

File godPowers/bin/com/FriedTaco/taco/godPowers/godPowers.class

Binary file modified.

File godPowers/bin/com/FriedTaco/taco/godPowers/godPowersPlayerListener.class

Binary file modified.

File godPowers/bin/com/FriedTaco/taco/godPowers/hermesCommand.class

Binary file added.

File godPowers/plugin.yml

 name: godPowers
 main: com.FriedTaco.taco.godPowers.godPowers
-version: 2.9
+version: 3.1
 author: Swift
 commands:
     godmode:
     poseidon:
         description: Gives you poseidon like powers while in water
         usage: /poseidon
+    hermes:
+        description: Gives you the powers of hermes
+        usage: /hermes
 permissions:
     godpowers.*:
         description: Gives access to all godpowers commands.
             godpowers.dupe: true
             godpowers.medusa: true
             godpowers.poseidon: true
+            godpowers.hermes: true
     godpowers.godmodeonlogin:
         description: Allows godmode upon login.
         default: op
     godpowers.poseidon:
         description: Gives permission to relevant command.
         default: op
+    godpowers.hermes:
+        description: Gives permission to relevant command.
+        default: op
     
        

File godPowers/src/3.1changelog

-- Added /poseidon

File godPowers/src/3.2changelog

+- Added /hermes
+- Fixed a bug where you got strength 3 while in water in godmode

File godPowers/src/com/FriedTaco/taco/godPowers/godPowers.java

 import org.bukkit.scheduler.BukkitTask;
 import org.bukkit.util.Vector;
 
+import com.FriedTaco.taco.godPowers.Metrics.Plotter;
+
 
 
 
 		public ArrayList<String> isJesus = new ArrayList<String>();
 		public ArrayList<MedusaPlayer> isUnderMedusaInfluence = new ArrayList<MedusaPlayer>();
 		public ArrayList<String> isInferno = new ArrayList<String>();
+		public ArrayList<String> isHermes = new ArrayList<String>();
 		public ArrayList<String> isPoseidon = new ArrayList<String>();
 		public ArrayList<String> isMedusa = new ArrayList<String>();
 		public ArrayList<String> superJumper = new ArrayList<String>();
 	    	try {
 	    	    Metrics metrics = new Metrics(this);
 	    	 // Plot the total amount of protections
-	    	    metrics.addCustomData(new Metrics.Plotter("Total Players using Godmode") {
+	    	    metrics.addCustomData(new Plotter("Total Players using Godmode") {
 
 	    	        @Override
 	    	        public int getValue() {
 	    	} catch(Exception e) {
 	    		System.out.println(error + "vulcan.");
 	    	}try{
-		    	getCommand("myballsareonfire").setExecutor(new VulcanCommand(this));
-		    	System.out.println(message + "vulcan.");
-		    	list.put("myballsareonfire", "- See vulcan.");
-	    	} catch(Exception e) {
-	    		System.out.println(error + "vulcan.");
-	    	}try{
 		    	getCommand("demigod").setExecutor(new DemiGodCommand(this));
 		    	System.out.println(message + "demigod.");
 		    	list.put("demigod", "- Allows you to take a small fraction of the damage you'd normally take.");
     		    System.out.println(error + "medusa.");
     	    }
 	        try{
+		    	getCommand("hermes").setExecutor(new hermesCommand(this));
+		    	System.out.println(message + "hermes.");
+		    	list.put("hermes", "- Gives you speed and the ability to send letters.");
+		    } catch(Exception e) {
+		    	System.out.println(error + "hermes.");
+		    }
+	        try{
 	    	getCommand("poseidon").setExecutor(new poseidonCommand(this));
 	    	System.out.println(message + "poseidon.");
 	    	list.put("poseidon", "- Gives you Poseidon like powers while in water.");
 	    	} catch(Exception e) {
 	    		System.out.println(error + "poseidon.");
 	    	}
+	       
 	    	loadConfig();
 	        PluginManager pm = getServer().getPluginManager();
 	        pm.registerEvents(new godPowersEntityListener(this), this);

File godPowers/src/com/FriedTaco/taco/godPowers/godPowersPlayerListener.java

     		event.getTo().getBlock().getRelative(0,-1,0).setTypeId(89);
     	}
     	*/
+    	if(plugin.isHermes.contains(event.getPlayer().getName())){
+    		event.getPlayer().addPotionEffect(new PotionEffect(PotionEffectType.SPEED,120,6));	
+    	}
     	if(plugin.isPoseidon.contains(event.getPlayer().getName())){
     	    Material m = event.getPlayer().getLocation().getBlock().getType();
     	    if (m == Material.STATIONARY_WATER || m == Material.WATER) {
     	if(plugin.godmodeEnabled.contains(event.getPlayer().getName())){
     	    Material m = event.getPlayer().getLocation().getBlock().getType();
     	    if (m == Material.STATIONARY_WATER || m == Material.WATER) {
-    	    event.getPlayer().addPotionEffect(new PotionEffect(PotionEffectType.INCREASE_DAMAGE,120,2));
     	    event.getPlayer().setRemainingAir(300);
     	    }	
     	}

File godPowers/src/com/FriedTaco/taco/godPowers/hermesCommand.java

+package com.FriedTaco.taco.godPowers;
+
+import org.bukkit.ChatColor;
+import org.bukkit.Material;
+import org.bukkit.command.Command;
+import org.bukkit.command.CommandExecutor;
+import org.bukkit.command.CommandSender;
+import org.bukkit.enchantments.Enchantment;
+import org.bukkit.entity.Player;
+import org.bukkit.inventory.ItemStack;
+import org.bukkit.inventory.meta.ItemMeta;
+
+public class hermesCommand implements CommandExecutor
+{
+	private Player player;
+	private final godPowers plugin;
+    public hermesCommand(godPowers instance) 
+    {
+        plugin = instance;
+    }
+
+    public boolean onCommand(CommandSender sender, Command command, String label, String[] args)
+    {
+    	String[] split = args;
+    	if(sender instanceof Player)
+    	{
+    		player = (Player) sender;
+    		if(player.hasPermission("godpowers.hermes"))
+    		{
+    			if(split.length > 0)
+    			{
+    				player.sendMessage(ChatColor.RED + "Incorrect syntax. Correct usage: '/hermes'");
+    				return true;
+    			}
+    			else
+    			{
+    				if(plugin.isHermes.contains(player.getName())){
+    				plugin.isHermes.remove(player.getName());	
+    				player.getInventory().setBoots(null);
+    	            player.sendMessage(ChatColor.AQUA+"You feel your hermes like powers slowly draining");
+    	            return true;
+    				}else{
+    				plugin.isHermes.add(player.getName());
+    		ItemStack feather = new ItemStack(Material.FEATHER,1);
+            ItemMeta meta = feather.getItemMeta();
+            meta.setDisplayName(ChatColor.AQUA+"Hermes boots");
+            feather.setItemMeta(meta);
+            feather.addUnsafeEnchantment(Enchantment.PROTECTION_FALL, 10);
+            player.getInventory().setBoots(feather);
+            player.sendMessage(ChatColor.AQUA+"You feel like you have speed like hermes");
+            return true;
+                 }
+    			}
+    		}
+    		else
+    		{
+    			player.sendMessage(ChatColor.DARK_RED + "The gods prevent you from using this command.");
+    		}
+    	}
+		return false;
+    }
+}