@@ -1,28 +1,19 @@
|
||||
--- a/net/minecraft/server/PersistentRaid.java
|
||||
+++ b/net/minecraft/server/PersistentRaid.java
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
public class PersistentRaid extends PersistentBase {
|
||||
|
||||
- private final Map<Integer, Raid> a = Maps.newHashMap();
|
||||
+ public final Map<Integer, Raid> a = Maps.newHashMap(); // PAIL rename raids, private -> public
|
||||
private final WorldServer b;
|
||||
private int c;
|
||||
private int d;
|
||||
@@ -92,19 +92,33 @@
|
||||
boolean flag = false;
|
||||
|
||||
if (!raid.j()) {
|
||||
if (!raid.isStarted()) {
|
||||
+ /* CraftBukkit - moved down
|
||||
if (!this.a.containsKey(raid.u())) {
|
||||
this.a.put(raid.u(), raid);
|
||||
if (!this.raids.containsKey(raid.getId())) {
|
||||
this.raids.put(raid.getId(), raid);
|
||||
}
|
||||
+ */
|
||||
|
||||
flag = true;
|
||||
- } else if (raid.m() < raid.l()) {
|
||||
- } else if (raid.getBadOmenLevel() < raid.getMaxBadOmenLevel()) {
|
||||
+ // CraftBukkit start - fixed a bug with raid: players could add up Bad Omen level even when the raid had finished
|
||||
+ } else if (raid.isInProgress() && raid.m() < raid.l()) {
|
||||
+ } else if (raid.isInProgress() && raid.getBadOmenLevel() < raid.getMaxBadOmenLevel()) {
|
||||
flag = true;
|
||||
+ // CraftBukkit end
|
||||
} else {
|
||||
@@ -37,8 +28,8 @@
|
||||
+ return null;
|
||||
+ }
|
||||
+
|
||||
+ if (!this.a.containsKey(raid.u())) {
|
||||
+ this.a.put(raid.u(), raid);
|
||||
+ if (!this.raids.containsKey(raid.getId())) {
|
||||
+ this.raids.put(raid.getId(), raid);
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
raid.a((EntityHuman) entityplayer);
|
||||
|
||||
Reference in New Issue
Block a user