Merge remote-tracking branch 'origin/1.1-R5'

This commit is contained in:
Jascha Starke 2012-03-01 18:23:12 +01:00
commit 392301706d
6 changed files with 0 additions and 34 deletions

View file

@ -17,11 +17,7 @@
*/
package de.jaschastarke.minecraft.limitedcreative.store;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import org.bukkit.configuration.file.YamlConfiguration;
@ -40,31 +36,6 @@ public class InvYamlStorage extends InvConfStorage {
@Override
public void load(Inventory pinv, Target target) {
// BEGIN: VERY dirty Workaround for 1.1-R4-Bug (will be removed when r5 released)
try {
BufferedReader in = new BufferedReader(new FileReader(getFile(pinv, target)));
String line;
StringBuilder file = new StringBuilder();
Boolean changed = false;
while ((line = in.readLine()) != null) {
if (!line.matches("\\s*==:\\s+org\\.bukkit\\.inventory\\.ItemStack\\s*")) {
file.append(line);
file.append("\n");
} else {
changed = true;
}
}
in.close();
if (changed) {
BufferedWriter out = new BufferedWriter(new FileWriter(getFile(pinv, target)));
out.write(file.toString());
out.close();
}
} catch (IOException e1) {
e1.printStackTrace();
}
// END: workaround
load(pinv, YamlConfiguration.loadConfiguration(getFile(pinv, target)));
}

View file

@ -22,7 +22,6 @@ import org.bukkit.event.Event;
import de.jaschastarke.minecraft.worldguard.ApplicableRegions;
@SuppressWarnings("serial")
public abstract class PlayerAreaEvent extends Event {
abstract public String getRegionHash();
abstract public ApplicableRegions getRegionSet();

View file

@ -24,7 +24,6 @@ import org.bukkit.event.player.PlayerTeleportEvent;
import de.jaschastarke.minecraft.worldguard.ApplicableRegions;
import de.jaschastarke.minecraft.worldguard.Interface;
@SuppressWarnings("serial")
public class PlayerChangedAreaEvent extends PlayerNewLocationAreaEvent implements Cancellable {
private PlayerMoveEvent event;
private String _previous_hash;

View file

@ -24,7 +24,6 @@ import org.bukkit.event.HandlerList;
import de.jaschastarke.minecraft.worldguard.ApplicableRegions;
import de.jaschastarke.minecraft.worldguard.Interface;
@SuppressWarnings("serial")
public class PlayerNewLocationAreaEvent extends PlayerAreaEvent {
private Location location;
private Player player;

View file

@ -24,7 +24,6 @@ import org.bukkit.event.HandlerList;
import de.jaschastarke.minecraft.worldguard.ApplicableRegions;
import de.jaschastarke.minecraft.worldguard.Interface;
@SuppressWarnings("serial")
public class PlayerSetAreaEvent extends PlayerAreaEvent {
private Player player;
private String hash;

View file

@ -24,7 +24,6 @@ import org.bukkit.event.HandlerList;
import de.jaschastarke.minecraft.worldguard.ApplicableRegions;
import de.jaschastarke.minecraft.worldguard.Interface;
@SuppressWarnings("serial")
public class PlayerUpdateAreaEvent extends PlayerAreaEvent {
private String player;
private String hash;