This is 6.5.0_dev

This commit is contained in:
Olof Larsson 2013-07-02 10:28:00 +02:00
parent 94d2c1d46d
commit c7d42419e0
12 changed files with 51 additions and 26 deletions

View File

@ -1,6 +1,6 @@
main: com.massivecraft.mcore.MCore main: com.massivecraft.mcore.MCore
name: mcore name: mcore
version: 6.4.1 version: 6.5.0_dev
website: http://massivecraft.com/mcore website: http://massivecraft.com/mcore
authors: [Cayorion] authors: [Cayorion]
description: §eMCore stands for MassiveCraft Core and is a plugin that contains libraries and features that other plugins make use of. §aCayorion §efrom the minecraft server §aMassiveCraft §eis the lead programmer. Feel free to visit us at §bhttp://massivecraft.com description: §eMCore stands for MassiveCraft Core and is a plugin that contains libraries and features that other plugins make use of. §aCayorion §efrom the minecraft server §aMassiveCraft §eis the lead programmer. Feel free to visit us at §bhttp://massivecraft.com

View File

@ -2,8 +2,8 @@ package com.massivecraft.mcore.adapter;
import java.lang.reflect.Type; import java.lang.reflect.Type;
import org.bukkit.craftbukkit.v1_5_R3.inventory.CraftInventoryCustom; import org.bukkit.craftbukkit.v1_6_R1.inventory.CraftInventoryCustom;
import org.bukkit.craftbukkit.v1_5_R3.inventory.CraftInventoryPlayer; import org.bukkit.craftbukkit.v1_6_R1.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;

View File

@ -1,10 +1,10 @@
package com.massivecraft.mcore.inventory; package com.massivecraft.mcore.inventory;
import org.bukkit.inventory.InventoryHolder; import net.minecraft.server.v1_6_R1.EntityHuman;
import net.minecraft.server.v1_6_R1.ItemStack;
import net.minecraft.server.v1_6_R1.PlayerInventory;
import net.minecraft.server.v1_5_R3.EntityHuman; import org.bukkit.inventory.InventoryHolder;
import net.minecraft.server.v1_5_R3.ItemStack;
import net.minecraft.server.v1_5_R3.PlayerInventory;
/** /**
* This is an extended version of the NMS.PlayerInventory. * This is an extended version of the NMS.PlayerInventory.
@ -27,6 +27,16 @@ import net.minecraft.server.v1_5_R3.PlayerInventory;
* m() (2 matches) * m() (2 matches)
* pickup(ItemStack) (2 matches) * pickup(ItemStack) (2 matches)
* PlayerInventory(EntityHuman) * PlayerInventory(EntityHuman)
*
* As of 1.6.1 these are the references:
*
* a(EntityHuman) (2 matches)
* a(float)
* getOwner()
* k() (2 matches)
* m() (2 matches)
* pickup(ItemStack) (2 matches)
* PlayerInventory(EntityHuman)
*/ */
public class MCorePlayerInventory extends PlayerInventory public class MCorePlayerInventory extends PlayerInventory
{ {
@ -62,11 +72,11 @@ public class MCorePlayerInventory extends PlayerInventory
// This method handles damage dealt to the armor inside the inventory. // This method handles damage dealt to the armor inside the inventory.
// We simply ignore damage if there is no player. // We simply ignore damage if there is no player.
@Override @Override
public void g(int arg0) public void a(float arg0)
{ {
if (this.player == null) return; if (this.player == null) return;
super.g(arg0); super.a(arg0);
} }
// If the player is null there is no owner. // If the player is null there is no owner.

View File

@ -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_5_R3.BiomeBase; import net.minecraft.server.v1_6_R1.BiomeBase;
import net.minecraft.server.v1_5_R3.Chunk; import net.minecraft.server.v1_6_R1.Chunk;
import net.minecraft.server.v1_5_R3.WorldServer; import net.minecraft.server.v1_6_R1.WorldServer;
import org.bukkit.World; import org.bukkit.World;
import org.bukkit.craftbukkit.v1_5_R3.CraftWorld; import org.bukkit.craftbukkit.v1_6_R1.CraftWorld;
public class BiomeUtil public class BiomeUtil
{ {

View File

@ -6,7 +6,7 @@ import java.util.Map;
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_5_R3.CraftServer; import org.bukkit.craftbukkit.v1_6_R1.CraftServer;
public class BukkitCommandUtil public class BukkitCommandUtil
{ {

View File

@ -3,8 +3,8 @@ package com.massivecraft.mcore.util;
import java.util.HashMap; import java.util.HashMap;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.craftbukkit.v1_5_R3.inventory.CraftInventoryCustom; import org.bukkit.craftbukkit.v1_6_R1.inventory.CraftInventoryCustom;
import org.bukkit.craftbukkit.v1_5_R3.inventory.CraftInventoryPlayer; import org.bukkit.craftbukkit.v1_6_R1.inventory.CraftInventoryPlayer;
import org.bukkit.event.inventory.InventoryClickEvent; import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.event.inventory.InventoryType; import org.bukkit.event.inventory.InventoryType;
import org.bukkit.event.inventory.InventoryType.SlotType; import org.bukkit.event.inventory.InventoryType.SlotType;

View File

@ -1,10 +1,10 @@
package com.massivecraft.mcore.util; package com.massivecraft.mcore.util;
import net.minecraft.server.v1_5_R3.WorldServer; import net.minecraft.server.v1_6_R1.WorldServer;
import org.bukkit.World; import org.bukkit.World;
import org.bukkit.block.Block; import org.bukkit.block.Block;
import org.bukkit.craftbukkit.v1_5_R3.CraftWorld; import org.bukkit.craftbukkit.v1_6_R1.CraftWorld;
/** /**
* Find the method by going through CraftBlock.setTypeId() * Find the method by going through CraftBlock.setTypeId()

View File

@ -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_5_R3.DedicatedServer; import net.minecraft.server.v1_6_R1.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_5_R3.CraftServer; import org.bukkit.craftbukkit.v1_6_R1.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;

View File

@ -8,11 +8,11 @@ import java.util.Map.Entry;
import java.util.concurrent.ConcurrentSkipListMap; import java.util.concurrent.ConcurrentSkipListMap;
import java.util.concurrent.ConcurrentSkipListSet; import java.util.concurrent.ConcurrentSkipListSet;
import net.minecraft.server.v1_5_R3.EntityPlayer; import net.minecraft.server.v1_6_R1.EntityPlayer;
import net.minecraft.server.v1_5_R3.Packet8UpdateHealth; import net.minecraft.server.v1_6_R1.Packet8UpdateHealth;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_5_R3.entity.CraftPlayer; import org.bukkit.craftbukkit.v1_6_R1.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;

View File

@ -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_5_R3.MinecraftServer; import net.minecraft.server.v1_6_R1.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_5_R3.CraftServer; import org.bukkit.craftbukkit.v1_6_R1.CraftServer;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import com.massivecraft.mcore.MCore; import com.massivecraft.mcore.MCore;

View File

@ -25,7 +25,7 @@ public class TextWrapper
private static final char COLOR_CHAR = '\u00A7'; private static final char COLOR_CHAR = '\u00A7';
private static final int CHAT_WINDOW_WIDTH = 320; private static final int CHAT_WINDOW_WIDTH = 320;
private static final int CHAT_STRING_LENGTH = 119; private static final int CHAT_STRING_LENGTH = 119;
private static final String allowedChars = net.minecraft.server.v1_5_R3.SharedConstants.allowedCharacters; private static final String allowedChars = net.minecraft.server.v1_6_R1.SharedConstants.allowedCharacters;
public static int getCharPixelWidth(char ch) public static int getCharPixelWidth(char ch)
{ {

View File

@ -350,6 +350,21 @@ public class Txt
return isVowel(noun) ? "an" : "a"; return isVowel(noun) ? "an" : "a";
} }
// -------------------------------------------- //
// START COLORS
// -------------------------------------------- //
// This method never returns null
public static final String START_COLORS_REGEX = "^((?:§.)+).*$";
public static final Pattern START_COLORS_PATTERN = Pattern.compile(START_COLORS_REGEX);
public static String getStartColors(String string)
{
Matcher matcher = START_COLORS_PATTERN.matcher(string);
if (!matcher.find()) return "";
return matcher.group(1);
}
// -------------------------------------------- // // -------------------------------------------- //
// Material name tools // Material name tools
// -------------------------------------------- // // -------------------------------------------- //