RecordSystem (Beta) #199
@ -413,6 +413,6 @@ public class Config {
|
|||||||
return CheckSchemID != 0;
|
return CheckSchemID != 0;
|
||||||
}
|
}
|
||||||
public static boolean recording(){
|
public static boolean recording(){
|
||||||
return event();
|
return event() && SpectateSystem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,7 @@ public class EventRecordListener extends BasicListener {
|
|||||||
private static final Random random = new Random();
|
private static final Random random = new Random();
|
||||||
|
|
||||||
public EventRecordListener() {
|
public EventRecordListener() {
|
||||||
super(Config.event() ? EnumSet.allOf(FightState.class) : EnumSet.noneOf(FightState.class));
|
super(Config.recording() ? EnumSet.allOf(FightState.class) : EnumSet.noneOf(FightState.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||||
|
@ -19,8 +19,8 @@
|
|||||||
|
|
||||||
package de.steamwar.fightsystem.record;
|
package de.steamwar.fightsystem.record;
|
||||||
|
|
||||||
import de.steamwar.fightsystem.FightSystem;
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
|
import org.bukkit.World;
|
||||||
|
|
||||||
import java.io.DataOutputStream;
|
import java.io.DataOutputStream;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@ -35,7 +35,8 @@ public class FileRecorder extends Recorder {
|
|||||||
|
|
||||||
public FileRecorder(){
|
public FileRecorder(){
|
||||||
super();
|
super();
|
||||||
File file = new File(FightSystem.getPlugin().getDataFolder(), "recording.recording");
|
World world = Bukkit.getWorlds().get(0);
|
||||||
|
File file = new File(world.getWorldFolder(), world.getName() + ".recording");
|
||||||
try{
|
try{
|
||||||
file.createNewFile();
|
file.createNewFile();
|
||||||
outputStream = new DataOutputStream(new GZIPOutputStream(new FileOutputStream(file), 4096));
|
outputStream = new DataOutputStream(new GZIPOutputStream(new FileOutputStream(file), 4096));
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren