Merge remote-tracking branch 'origin/1.1-R5'
This commit is contained in:
commit
392301706d
6 changed files with 0 additions and 34 deletions
|
@ -17,11 +17,7 @@
|
||||||
*/
|
*/
|
||||||
package de.jaschastarke.minecraft.limitedcreative.store;
|
package de.jaschastarke.minecraft.limitedcreative.store;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
|
||||||
import java.io.BufferedWriter;
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileReader;
|
|
||||||
import java.io.FileWriter;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import org.bukkit.configuration.file.YamlConfiguration;
|
import org.bukkit.configuration.file.YamlConfiguration;
|
||||||
|
@ -40,31 +36,6 @@ public class InvYamlStorage extends InvConfStorage {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void load(Inventory pinv, Target target) {
|
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)));
|
load(pinv, YamlConfiguration.loadConfiguration(getFile(pinv, target)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,6 @@ import org.bukkit.event.Event;
|
||||||
|
|
||||||
import de.jaschastarke.minecraft.worldguard.ApplicableRegions;
|
import de.jaschastarke.minecraft.worldguard.ApplicableRegions;
|
||||||
|
|
||||||
@SuppressWarnings("serial")
|
|
||||||
public abstract class PlayerAreaEvent extends Event {
|
public abstract class PlayerAreaEvent extends Event {
|
||||||
abstract public String getRegionHash();
|
abstract public String getRegionHash();
|
||||||
abstract public ApplicableRegions getRegionSet();
|
abstract public ApplicableRegions getRegionSet();
|
||||||
|
|
|
@ -24,7 +24,6 @@ import org.bukkit.event.player.PlayerTeleportEvent;
|
||||||
import de.jaschastarke.minecraft.worldguard.ApplicableRegions;
|
import de.jaschastarke.minecraft.worldguard.ApplicableRegions;
|
||||||
import de.jaschastarke.minecraft.worldguard.Interface;
|
import de.jaschastarke.minecraft.worldguard.Interface;
|
||||||
|
|
||||||
@SuppressWarnings("serial")
|
|
||||||
public class PlayerChangedAreaEvent extends PlayerNewLocationAreaEvent implements Cancellable {
|
public class PlayerChangedAreaEvent extends PlayerNewLocationAreaEvent implements Cancellable {
|
||||||
private PlayerMoveEvent event;
|
private PlayerMoveEvent event;
|
||||||
private String _previous_hash;
|
private String _previous_hash;
|
||||||
|
|
|
@ -24,7 +24,6 @@ import org.bukkit.event.HandlerList;
|
||||||
import de.jaschastarke.minecraft.worldguard.ApplicableRegions;
|
import de.jaschastarke.minecraft.worldguard.ApplicableRegions;
|
||||||
import de.jaschastarke.minecraft.worldguard.Interface;
|
import de.jaschastarke.minecraft.worldguard.Interface;
|
||||||
|
|
||||||
@SuppressWarnings("serial")
|
|
||||||
public class PlayerNewLocationAreaEvent extends PlayerAreaEvent {
|
public class PlayerNewLocationAreaEvent extends PlayerAreaEvent {
|
||||||
private Location location;
|
private Location location;
|
||||||
private Player player;
|
private Player player;
|
||||||
|
|
|
@ -24,7 +24,6 @@ import org.bukkit.event.HandlerList;
|
||||||
import de.jaschastarke.minecraft.worldguard.ApplicableRegions;
|
import de.jaschastarke.minecraft.worldguard.ApplicableRegions;
|
||||||
import de.jaschastarke.minecraft.worldguard.Interface;
|
import de.jaschastarke.minecraft.worldguard.Interface;
|
||||||
|
|
||||||
@SuppressWarnings("serial")
|
|
||||||
public class PlayerSetAreaEvent extends PlayerAreaEvent {
|
public class PlayerSetAreaEvent extends PlayerAreaEvent {
|
||||||
private Player player;
|
private Player player;
|
||||||
private String hash;
|
private String hash;
|
||||||
|
|
|
@ -24,7 +24,6 @@ import org.bukkit.event.HandlerList;
|
||||||
import de.jaschastarke.minecraft.worldguard.ApplicableRegions;
|
import de.jaschastarke.minecraft.worldguard.ApplicableRegions;
|
||||||
import de.jaschastarke.minecraft.worldguard.Interface;
|
import de.jaschastarke.minecraft.worldguard.Interface;
|
||||||
|
|
||||||
@SuppressWarnings("serial")
|
|
||||||
public class PlayerUpdateAreaEvent extends PlayerAreaEvent {
|
public class PlayerUpdateAreaEvent extends PlayerAreaEvent {
|
||||||
private String player;
|
private String player;
|
||||||
private String hash;
|
private String hash;
|
||||||
|
|
Loading…
Reference in a new issue