forked from SteamWar/SteamWar
Add arena map world name identifier for TowerRun and TNTLeague
This commit is contained in:
@@ -20,6 +20,8 @@
|
||||
package de.steamwar.towerrun;
|
||||
|
||||
import de.steamwar.command.SWCommand;
|
||||
import de.steamwar.core.Core;
|
||||
import de.steamwar.core.WorldIdentifier;
|
||||
import de.steamwar.linkage.AbstractLinker;
|
||||
import de.steamwar.linkage.LinkedInstance;
|
||||
import de.steamwar.linkage.SpigotLinker;
|
||||
@@ -56,6 +58,11 @@ public class TowerRun extends JavaPlugin {
|
||||
towerGenerator = new TowerGenerator(WorldConfig.TOWER_GENERATOR_CONFIG);
|
||||
}
|
||||
|
||||
String arenaMap = System.getProperty("arenaMap");
|
||||
if (arenaMap != null) {
|
||||
WorldIdentifier.set("fight/" + Core.getVersion() + "/" + arenaMap);
|
||||
}
|
||||
|
||||
SpigotLinker spigotLinker = new SpigotLinker(this, message) {
|
||||
@Override
|
||||
protected void linkObject(Object any) {
|
||||
@@ -64,6 +71,7 @@ public class TowerRun extends JavaPlugin {
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
try {
|
||||
spigotLinker.link();
|
||||
} catch (AbstractLinker.LinkException e) {
|
||||
|
||||
Reference in New Issue
Block a user