Plugin SkyWar Nukkit!!

Trollhunters501

Active Member
There will be a free plugin for Skywar's Nukkit that someone send me, I've been looking for one for months
I found one but no one wants to compile it, it's from 1.14 I think it works on PetteriM1's nukkit or maybe it still works
 

RoidiRZMC

Member
Hahaha don't get excited so quickly, as it's from 3 years ago it has several errors and things to fix I'm trying to repair it but I think I'm going well, I had a problem with the creation of directories saving the arena, once you configure everything, restart it is saved I'll fix that later, but there are a lot of things to adjust, the scoreboard appears when it wants and so on. (excuse me that I put it in Spanish but as you already know it is my language, but don't worry, I'm more interested in English)
 

Trollhunters501

Active Member
Hahaha don't get excited so quickly, as it's from 3 years ago it has several errors and things to fix I'm trying to repair it but I think I'm going well, I had a problem with the creation of directories saving the arena, once you configure everything, restart it is saved I'll fix that later, but there are a lot of things to adjust, the scoreboard appears when it wants and so on. (excuse me that I put it in Spanish but as you already know it is my language, but don't worry, I'm more interested in English)
Yo hablo español es mejor para mí xd
Y muchas gracias por actualizar el plugin 😃
 

RoidiRZMC

Member
Ah que bien, oye ese plugin tiene muchos errores su estructura y todo lo demas sale mas rentable crear uno desde ZERO lo logre actualizar para que cree la arena, spawn, sala de espera e inicio del juego, si quieres te paso todo lo que he hecho: tuve que reehacer todo desde CERO por eso veras todo en portugues de nuevo.
 

Attachments

Last edited:

Trollhunters501

Active Member
Ah que bien, oye ese plugin tiene muchos errores su estructura y todo lo demas sale mas rentable crear uno desde ZERO lo logre actualizar para que cree la arena, spawn, sala de espera e inicio del juego, si quieres te paso todo lo que he hecho: tuve que reehacer todo desde CERO por eso veras todo en portugues de nuevo.
Claro muchas gracias por favor si puedes enviarmelo aquí o en discord porfa donde te parezca más fácil
Mi discord es @Trollhunters501
 

RoidiRZMC

Member
Eh estado inactivo estaba desarrollando mi propio plugin de Skywar aqui te dejo el source para que veas como vas, esto lo logre en 1 dia, pero lo he parado por el trabajo.

el plugin toma mundos de la carpeta worlds.

/sw create {world_name}
/sw join {Arena_creada}


Aun le falta mucho, pero no tengo un flujo de trabajo bien organizado.
 

Attachments

RoidiRZMC

Member
Te di una version anterior, porque ya he hecho varios cambios, en esa no carga las arenas, osea tendras que crearlas cada vez que entres al juego, agrega esto a arena manager:
public void loadArenas() {
File arenasFolder = new File(plugin.getDataFolder() + "/Arenas/");
if (!arenasFolder.exists()) {
arenasFolder.mkdirs();
return;
}
File[] arenaFiles = arenasFolder.listFiles();
if (arenaFiles == null || arenaFiles.length == 0) {
return;
}
for (File arenaFile : arenaFiles) {
if (arenaFile.getName().endsWith(".yml")) {
String arenaName = arenaFile.getName().replace(".yml", "");
Config arenaConfig = new Config(arenaFile, Config.YAML);
String worldName = arenaConfig.getString("world");
Level level = plugin.getServer().getLevelByName(worldName);
if (level == null) {
plugin.getServer().loadLevel(worldName);
level = plugin.getServer().getLevelByName(worldName);
}
if (level != null) {
this.arenaWorlds.put(arenaName, level);
this.spawnPoints.put(arenaName, new ArrayList<>());
this.occupiedSpawns.put(arenaName, new HashSet<>());
this.playersInArena.put(arenaName, 0);
this.gameStates.put(arenaName, GameState.WAITING);
ConfigSection spawnsSection = arenaConfig.getRootSection().getSection("spawns");
if (spawnsSection != null) {
for (String spawnKey : spawnsSection.getKeys(false)) {
ConfigSection spawnSection = spawnsSection.getSection(spawnKey);
if (spawnSection != null) {
int x = spawnSection.getInt("x");
int y = spawnSection.getInt("y");
int z = spawnSection.getInt("z");
Block spawnBlock = level.getBlock(x, y, z);
if (spawnBlock != null) {
this.spawnPoints.get(arenaName).add(spawnBlock);
}
}
}
}
}
}
}
}
 

Trollhunters501

Active Member
Te di una version anterior, porque ya he hecho varios cambios, en esa no carga las arenas, osea tendras que crearlas cada vez que entres al juego, agrega esto a arena manager:
public void loadArenas() {
File arenasFolder = new File(plugin.getDataFolder() + "/Arenas/");
if (!arenasFolder.exists()) {
arenasFolder.mkdirs();
return;
}
File[] arenaFiles = arenasFolder.listFiles();
if (arenaFiles == null || arenaFiles.length == 0) {
return;
}
for (File arenaFile : arenaFiles) {
if (arenaFile.getName().endsWith(".yml")) {
String arenaName = arenaFile.getName().replace(".yml", "");
Config arenaConfig = new Config(arenaFile, Config.YAML);
String worldName = arenaConfig.getString("world");
Level level = plugin.getServer().getLevelByName(worldName);
if (level == null) {
plugin.getServer().loadLevel(worldName);
level = plugin.getServer().getLevelByName(worldName);
}
if (level != null) {
this.arenaWorlds.put(arenaName, level);
this.spawnPoints.put(arenaName, new ArrayList<>());
this.occupiedSpawns.put(arenaName, new HashSet<>());
this.playersInArena.put(arenaName, 0);
this.gameStates.put(arenaName, GameState.WAITING);
ConfigSection spawnsSection = arenaConfig.getRootSection().getSection("spawns");
if (spawnsSection != null) {
for (String spawnKey : spawnsSection.getKeys(false)) {
ConfigSection spawnSection = spawnsSection.getSection(spawnKey);
if (spawnSection != null) {
int x = spawnSection.getInt("x");
int y = spawnSection.getInt("y");
int z = spawnSection.getInt("z");
Block spawnBlock = level.getBlock(x, y, z);
if (spawnBlock != null) {
this.spawnPoints.get(arenaName).add(spawnBlock);
}
}
}
}
}
}
}
}
Hey me sale un error porque no está definido this.playersInArena
 
Top