1.7.5 compat
This commit is contained in:
parent
9ea73846e4
commit
16fc6b94e5
@ -8,7 +8,7 @@ import java.util.Map.Entry;
|
|||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.SimpleCommandMap;
|
import org.bukkit.command.SimpleCommandMap;
|
||||||
import org.bukkit.craftbukkit.v1_7_R1.CraftServer;
|
import org.bukkit.craftbukkit.v1_7_R2.CraftServer;
|
||||||
import org.bukkit.plugin.Plugin;
|
import org.bukkit.plugin.Plugin;
|
||||||
|
|
||||||
import com.massivecraft.mcore.cmd.MCommand;
|
import com.massivecraft.mcore.cmd.MCommand;
|
||||||
|
@ -2,8 +2,8 @@ package com.massivecraft.mcore.adapter;
|
|||||||
|
|
||||||
import java.lang.reflect.Type;
|
import java.lang.reflect.Type;
|
||||||
|
|
||||||
import org.bukkit.craftbukkit.v1_7_R1.inventory.CraftInventoryCustom;
|
import org.bukkit.craftbukkit.v1_7_R2.inventory.CraftInventoryCustom;
|
||||||
import org.bukkit.craftbukkit.v1_7_R1.inventory.CraftInventoryPlayer;
|
import org.bukkit.craftbukkit.v1_7_R2.inventory.CraftInventoryPlayer;
|
||||||
import org.bukkit.inventory.Inventory;
|
import org.bukkit.inventory.Inventory;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.inventory.PlayerInventory;
|
import org.bukkit.inventory.PlayerInventory;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package com.massivecraft.mcore.inventory;
|
package com.massivecraft.mcore.inventory;
|
||||||
|
|
||||||
import net.minecraft.server.v1_7_R1.EntityHuman;
|
import net.minecraft.server.v1_7_R2.EntityHuman;
|
||||||
import net.minecraft.server.v1_7_R1.ItemStack;
|
import net.minecraft.server.v1_7_R2.ItemStack;
|
||||||
import net.minecraft.server.v1_7_R1.PlayerInventory;
|
import net.minecraft.server.v1_7_R2.PlayerInventory;
|
||||||
|
|
||||||
import org.bukkit.inventory.InventoryHolder;
|
import org.bukkit.inventory.InventoryHolder;
|
||||||
|
|
||||||
@ -28,7 +28,7 @@ import org.bukkit.inventory.InventoryHolder;
|
|||||||
* pickup(ItemStack) (2 matches)
|
* pickup(ItemStack) (2 matches)
|
||||||
* PlayerInventory(EntityHuman)
|
* PlayerInventory(EntityHuman)
|
||||||
*
|
*
|
||||||
* As of 1.6.1 and 1.6.2 and 1.6.4 and 1.7.2 these are the references:
|
* As of 1.6.1 and 1.6.2 and 1.6.4 and 1.7.2 and 1.7.5 these are the references:
|
||||||
*
|
*
|
||||||
* a(EntityHuman) (2 matches)
|
* a(EntityHuman) (2 matches)
|
||||||
* a(float)
|
* a(float)
|
||||||
|
@ -5,12 +5,12 @@ import java.util.Map;
|
|||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import java.util.AbstractMap.SimpleEntry;
|
import java.util.AbstractMap.SimpleEntry;
|
||||||
|
|
||||||
import net.minecraft.server.v1_7_R1.BiomeBase;
|
import net.minecraft.server.v1_7_R2.BiomeBase;
|
||||||
import net.minecraft.server.v1_7_R1.Chunk;
|
import net.minecraft.server.v1_7_R2.Chunk;
|
||||||
import net.minecraft.server.v1_7_R1.WorldServer;
|
import net.minecraft.server.v1_7_R2.WorldServer;
|
||||||
|
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
import org.bukkit.craftbukkit.v1_7_R1.CraftWorld;
|
import org.bukkit.craftbukkit.v1_7_R2.CraftWorld;
|
||||||
|
|
||||||
public class BiomeUtil
|
public class BiomeUtil
|
||||||
{
|
{
|
||||||
|
@ -4,8 +4,8 @@ import java.util.HashMap;
|
|||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.craftbukkit.v1_7_R1.inventory.CraftInventoryCustom;
|
import org.bukkit.craftbukkit.v1_7_R2.inventory.CraftInventoryCustom;
|
||||||
import org.bukkit.craftbukkit.v1_7_R1.inventory.CraftInventoryPlayer;
|
import org.bukkit.craftbukkit.v1_7_R2.inventory.CraftInventoryPlayer;
|
||||||
import org.bukkit.entity.HumanEntity;
|
import org.bukkit.entity.HumanEntity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
import org.bukkit.event.inventory.InventoryClickEvent;
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
package com.massivecraft.mcore.util;
|
package com.massivecraft.mcore.util;
|
||||||
|
|
||||||
import net.minecraft.server.v1_7_R1.WorldServer;
|
import net.minecraft.server.v1_7_R2.WorldServer;
|
||||||
|
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.craftbukkit.v1_7_R1.CraftWorld;
|
import org.bukkit.craftbukkit.v1_7_R2.CraftWorld;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find the method by going through CraftBlock.setTypeId()
|
* Find the method by going through CraftBlock.setTypeId()
|
||||||
|
@ -19,7 +19,7 @@ import java.util.Set;
|
|||||||
import java.util.SortedSet;
|
import java.util.SortedSet;
|
||||||
import java.util.TreeSet;
|
import java.util.TreeSet;
|
||||||
|
|
||||||
import net.minecraft.server.v1_7_R1.DedicatedServer;
|
import net.minecraft.server.v1_7_R2.DedicatedServer;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
@ -27,7 +27,7 @@ import org.bukkit.Material;
|
|||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
import org.bukkit.block.BlockFace;
|
import org.bukkit.block.BlockFace;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.craftbukkit.v1_7_R1.CraftServer;
|
import org.bukkit.craftbukkit.v1_7_R2.CraftServer;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.entity.Projectile;
|
import org.bukkit.entity.Projectile;
|
||||||
@ -44,6 +44,7 @@ import org.bukkit.inventory.meta.PotionMeta;
|
|||||||
import org.bukkit.potion.Potion;
|
import org.bukkit.potion.Potion;
|
||||||
import org.bukkit.potion.PotionEffect;
|
import org.bukkit.potion.PotionEffect;
|
||||||
import org.bukkit.potion.PotionEffectType;
|
import org.bukkit.potion.PotionEffectType;
|
||||||
|
import org.bukkit.projectiles.ProjectileSource;
|
||||||
|
|
||||||
import com.massivecraft.mcore.EngineMainMCore;
|
import com.massivecraft.mcore.EngineMainMCore;
|
||||||
import com.massivecraft.mcore.MCore;
|
import com.massivecraft.mcore.MCore;
|
||||||
@ -283,7 +284,12 @@ public class MUtil
|
|||||||
Entity ret = edbeEvent.getDamager();
|
Entity ret = edbeEvent.getDamager();
|
||||||
if (ret instanceof Projectile)
|
if (ret instanceof Projectile)
|
||||||
{
|
{
|
||||||
ret = ((Projectile)ret).getShooter();
|
Projectile projectile = (Projectile)ret;
|
||||||
|
ProjectileSource projectileSource = projectile.getShooter();
|
||||||
|
if (projectileSource instanceof Entity)
|
||||||
|
{
|
||||||
|
ret = (Entity)projectileSource;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -5,11 +5,11 @@ import java.util.Map;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.concurrent.ConcurrentSkipListSet;
|
import java.util.concurrent.ConcurrentSkipListSet;
|
||||||
|
|
||||||
import net.minecraft.server.v1_7_R1.EntityPlayer;
|
import net.minecraft.server.v1_7_R2.EntityPlayer;
|
||||||
import net.minecraft.server.v1_7_R1.PacketPlayOutUpdateHealth;
|
import net.minecraft.server.v1_7_R2.PacketPlayOutUpdateHealth;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_7_R1.entity.CraftPlayer;
|
import org.bukkit.craftbukkit.v1_7_R2.entity.CraftPlayer;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
|
@ -8,7 +8,7 @@ import java.util.Map;
|
|||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import java.util.TreeMap;
|
import java.util.TreeMap;
|
||||||
|
|
||||||
import net.minecraft.server.v1_7_R1.MinecraftServer;
|
import net.minecraft.server.v1_7_R2.MinecraftServer;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.GameMode;
|
import org.bukkit.GameMode;
|
||||||
@ -17,7 +17,7 @@ import org.bukkit.command.BlockCommandSender;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.command.ConsoleCommandSender;
|
import org.bukkit.command.ConsoleCommandSender;
|
||||||
import org.bukkit.command.RemoteConsoleCommandSender;
|
import org.bukkit.command.RemoteConsoleCommandSender;
|
||||||
import org.bukkit.craftbukkit.v1_7_R1.CraftServer;
|
import org.bukkit.craftbukkit.v1_7_R2.CraftServer;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import com.massivecraft.mcore.MCore;
|
import com.massivecraft.mcore.MCore;
|
||||||
|
Loading…
Reference in New Issue
Block a user