mirror of
https://github.com/darksaid98/AlathranWars.git
synced 2026-12-03 22:15:24 +00:00
Removed several Siege features not needed for Raids
(cherry picked from commit 81e0ca47cd)
This commit is contained in:
1 parent
471a03bb7b
commit
dcad9611d6
2 files changed
+23
-4
No files matched your search
@@ -15,7 +15,6 @@ import org.bukkit.plugin.Plugin;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
|
||||||
/* RAID EXPLANATION
|
/* RAID EXPLANATION
|
||||||
|
|
||||||
Raids are run by raiding parties, who gather at a separate town,
|
Raids are run by raiding parties, who gather at a separate town,
|
||||||
@@ -120,8 +119,7 @@ public class Raid {
|
|||||||
|
|
||||||
// Creates 10 second looping function for Raid
|
// Creates 10 second looping function for Raid
|
||||||
this.bukkitId[0] = Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask((Plugin) Main.getInstance(),
|
this.bukkitId[0] = Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask((Plugin) Main.getInstance(),
|
||||||
(Runnable) new Runnable() {
|
(Runnable) new Runnable() {
|
||||||
int homeBlockControl = 0;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
@@ -150,6 +148,27 @@ public class Raid {
|
|||||||
Main.raidData.getConfig().set("Raids." + String.valueOf(Raid.this.id) + ".raidticks",
|
Main.raidData.getConfig().set("Raids." + String.valueOf(Raid.this.id) + ".raidticks",
|
||||||
(Object) Raid.this.raidTicks);
|
(Object) Raid.this.raidTicks);
|
||||||
Main.raidData.saveConfig();
|
Main.raidData.saveConfig();
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
if (homeBlock != null) {
|
||||||
|
town.setHomeBlock(homeBlock);
|
||||||
|
town.setSpawn(townSpawn);
|
||||||
|
}
|
||||||
|
|
||||||
|
// If time runs out, stops scheduled task.
|
||||||
|
if (Raid.this.raidTicks >= Raid.this.MAXRAIDTICKS) {
|
||||||
|
Bukkit.getServer().getScheduler().cancelTask(Raid.this.bukkitId[0]);
|
||||||
|
if (Raid.this.raiderPoints > Raid.this.defenderPoints) {
|
||||||
|
Raid.this.raidersWin(Raid.this.owner);
|
||||||
|
} else {
|
||||||
|
Raid.this.defendersWin();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
final Raid this$0 = Raid.this;
|
||||||
|
Raid.access$7(this$0, this$0.raidTicks + 200);
|
||||||
|
Main.raidData.getConfig().set("Raids." + String.valueOf(Raid.this.id) + ".raidticks",
|
||||||
|
(Object) Raid.this.raidTicks);
|
||||||
|
Main.raidData.saveConfig();
|
||||||
|
|
||||||
//check and start travel phase
|
//check and start travel phase
|
||||||
if (Raid.this.raidTicks >= RaidPhase.TRAVEL.startTick && Raid.this.phase != RaidPhase.TRAVEL) {
|
if (Raid.this.raidTicks >= RaidPhase.TRAVEL.startTick && Raid.this.phase != RaidPhase.TRAVEL) {
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ public class War {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getId() {
|
public int getId() {
|
||||||
return this.id;
|
return this.id;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user