Switching from UTF-8 to cp1252.

This commit is contained in:
Kristian S. Stangeland 2012-10-12 00:49:47 +02:00
parent 8e70a56768
commit fe3a69bd3d
7 changed files with 12 additions and 4 deletions

View File

@ -6,6 +6,10 @@
<name>Item Disguise</name>
<description>Change the appearance of inventory items.</description>
<properties>
<project.build.sourceEncoding>cp1252</project.build.sourceEncoding>
</properties>
<repositories>
<repository>
<id>bukkit-rep</id>

View File

@ -110,6 +110,9 @@ public class HideEnchantmentsListener {
}
private void removeEnchantments(ItemStack stack) {
if (stack == null)
return;
Object[] copy = stack.getEnchantments().keySet().toArray();
for (Object enchantment : copy) {

View File

@ -67,7 +67,7 @@ public class ItemDisguiseMod extends JavaPlugin {
write(2, player.getLocation().getZ());
fakeExplosion.getSpecificModifier(float.class).
write(0, 3.0F);
protocolManager.sendServerPacket(player, fakeExplosion);
} catch (Exception e) {

View File

@ -7,7 +7,7 @@
<description>Provides read/write access to the Minecraft protocol.</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.build.sourceEncoding>cp1252</project.build.sourceEncoding>
</properties>
<parent>

View File

@ -142,7 +142,7 @@ public class PacketContainer implements Serializable {
* @return A modifier for ItemStack fields.
*/
public StructureModifier<ItemStack> getItemModifier() {
// Convert from and to the Bukkit wrapper
// Convert to and from the Bukkit wrapper
return structureModifier.<ItemStack>withType(net.minecraft.server.ItemStack.class,
getIgnoreNull(new EquivalentConverter<ItemStack>() {
public Object getGeneric(ItemStack specific) {

View File

@ -28,3 +28,4 @@ public interface EquivalentConverter<TType> {
public Object getGeneric(TType specific);
public Class<TType> getSpecificType();
}

View File

@ -19,7 +19,7 @@ lead to more subtle bugs.
Building
--------
You can compile this project yourself by using the latest version of Maven.
You can compile this project yourself by using the latest version of Maven.
A new API